cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to fix a checkbox parameter, with two data sets with a beforefactory script. its stuck as false.

kelli2
Discoverer
0 Kudos
180

This is the first time I have tried making a custom report with two different data sets driven by a parameter.  I feel like I have something missing, when I run this it will only run "WithoutSubQuals" no matter if I check or uncheck the include sub qual checkbox.  Thank you for any ideas you have.

The parameter: Its a checkbox, datatype boolean, default as false, static and not required called "Includesubqual". 

The body Table name is: curriculumItemStatus

the datasets: WithoutSubQuals and WithSubQuals (for both I can run the sql and see results in preview datasets). Both sqls have the same column/field names.

I have a script set as beforefactory:

curriculumItem = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("curriculumItemStatus");
 
if (BirtComp.equalTo(params["Includesubqual"], true)) 
{ curriculumItem.setProperty( "dataSet", "WithSubQuals" ); }
else 
{ curriculumItem.setProperty( "dataSet", "WithoutSubQuals" ); }

Accepted Solutions (0)

Answers (1)

Answers (1)

PL1
Product and Topic Expert
Product and Topic Expert
0 Kudos

@kelli2, you can post this situation here as well: SAP SuccessFactors Learning Custom Report Exchange.