cancel
Showing results for 
Search instead for 
Did you mean: 

Script function isResultSetEmpty() doesn't work properly in 1.6

Former Member
0 Kudos

Hello Experts,

   I'm using the script function isResultSetEmpty() to check if there is any data in my data source but I don't get the right result.

   Example:

     I have 2 drop downs and 1 crosstab in my application. I have assigned data source DS_1 to the crosstab. DS_1 is a query with 2 input (optional variables - I set these variables with the values selected in the drop downs. I want to hide the table when the source is initial. When I start the application there is no data so crosstab is invisible, when I change the selection in one of the drop downs data source is not initial but table is still invisible because the function isResultSetEmpty() returns "true". My check is in the "On result set change event" of the data source.

if (DS_1.isResultSetEmpty() == true) {

  CROSSTAB_1.setVisible(false);}

else { CROSSTAB_1.setVisible(true); }

If I remove this code the table is visible - first time it's initial and second time, when I select the same value like in the example above - table with the data is displayed.

  Do you have any ideas how if there is any other way to check the result set? Or why the script function doesn't work?

Aylin

Accepted Solutions (0)

Answers (1)

Answers (1)

TammyPowlas
Active Contributor
0 Kudos

Aylin - Karol makes some good suggestions in this thread:

Could you review his responses with your application?

Former Member
0 Kudos

Hello Tammy,

  

   Thanks for the quick reply!

   My code is in "On Result Set Change" event of the data source - first suggestion.

   I already tried with some debugging statements. I mentioned that the script function returns "True" when there is data.

"When I start the application there is no data so crosstab is invisible, when I change the selection in one of the drop downs data source is not initial but table is still invisible because the function isResultSetEmpty() returns "true".

TammyPowlas
Active Contributor
0 Kudos

Strange; I just tested this with 1.6 SP1 - I put your code here at the data source level:

and it works both ways

Maybe it's something with the variables?  I used a filter line and no issue

Former Member
0 Kudos

Yes, same - my code here

First selection - there is no data so table is invisible

Second selection - there is data, but table is still invisible

And here is the result with the same (second) selection after the check with the function isResultSetEmpty()  is removed from "On Result Set Changed"

TammyPowlas
Active Contributor
0 Kudos

Are you on SP1? 

I also see a fix coming for something related coming for SP2 - https://launchpad.support.sap.com/#/notes/2272231/E

Former Member
0 Kudos

SAP BusinessObjects Design Studio

Release 1.6 (Version: 16.0.5)

TammyPowlas
Active Contributor
0 Kudos

Could you try it with SP1?  You are on SP0 - no guarantees but we can rule that out

Former Member
0 Kudos

Thank you very much for your help Tammy!

Unfortunately I'm not able to try with SP1 - I'm working on customer site. When the customer decide to upgrade Design Studio I'll check if the check with the function isResultSetEmpty() works.