Table properties, change before print

Stimulsoft Reports.NET discussion
Post Reply
owainesau
Posts: 7
Joined: Wed Jul 19, 2017 1:02 am

Table properties, change before print

Post 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!
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: Table properties, change before print

Post 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
Post Reply