delete/hide a row from a report under a condition

Hi

How to delete or hide the row in a report. scenario: if Value ==0 then the whole row must not appear on the report.

Please help!!!

Thanks

Sinoyolo

Hi,

You have 2 possible scenarios:

-Your report is populated with a fetch() method, just add a test in the sql query where your field != 0, the corresponding lines won’t be fetched

-Your do not have a fetch() method, so you can manage display in execute section: add an executeSection() method in your section with the following code :

if(your_field > 0)

super();

regards,

Thomas

Hi Thomas

Thank you for your response.

When I do this on executeSection:

if (LineAmount !=0)

super();

OR

if(LineAmount >0)

super();

my report comes up empty…no data at all, just the headings and only only one page comes up out of hundreds.

I don’t really get what is going on here, because your solution should help. confused

Thank you

Sinoyolo

try to test your values inside the executeSection() with an info() statement (info(strfmt("%1",YourDataSourceTable.YourField)):wink: then put the super() in a condition, you should test your datasource instead of a variable (lineAmount seems to be a variable in your exemple)

Hi Thomas

It worked out fine. Sorry I took long to verify, I’m scooped with too much, I’m actually overwhelmed, as an intern I never thought I’d be so under pressure.

Thanks

Sinoyolo