Page 1 of 1

Table properties, change before print

Posted: Fri Aug 11, 2017 1:16 am
by owainesau
Hi,

I have a report that prints out quarterly statistics, i need to be able to set the hide zeros property to false if the current date is below a given quarter:

The blank values here should show 0 because Q1 has passed.
Image

Here it should be null
Image

Both images are using the same table.

Thanks!

Re: Table properties, change before print

Posted: Fri Aug 11, 2017 2:51 am
by Edward
Hi Owainesau

I think you could use a ternary operation or IIF function to check whether you need to show the value or not, as per the following approach:

https://www.stimulsoft.com/en/documenta ... ssions.htm

So the expression in the textbox might look like:

Code: Select all

{IIF(MyDataSource.MyDateColumn < Today, "", "1")}
Or, alternatively you can check for the correct date range using conditions of each individual text component to hide it from the report:
https://www.stimulsoft.com/en/documenta ... atting.htm

That is a simple approach if you do not need to calculate totals. If you need to calculate totals, then probably you could just hide them with a similar approach?

Thank you,
Edward