Zero values are shown

Stimulsoft Reports.NET discussion
IskandarAir
Posts: 105
Joined: Thu Aug 17, 2017 12:07 pm

Zero values are shown

Post by IskandarAir »

Hi,

The issue number 1:
I use Stimulsoft 2019.3.4 version for my .NET application. I want to generate a report like this:
Image
But 0:00 values must not be shown. I put separators in the code like this:
Image
When the user selects decimal hour format, then I put "." between the numbers, when "HH:MM" is selected, I put ":" between them. I changed ":" to "." in the second part of if statement and got this result:
Image
Here is what I changed. The other code is literally the same:
Image
Why the view is changing depending on the separator? I need to get result as given in the second picture but with ":" separator, zero values must be ignored.

The issue number 2:
In order to prevent such cases, I added event that should have ignored zero values when hour format is "HH:MM". However, instead of getting numeric values, I get formula for calculating it.
This is the result from a static column where calculations are not implemented:
Image
This the result from a dynamic column where calculations are implemented:
Image

Could you please help with these issues?

Best regards.
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Zero values are shown

Post by Lech Kulikowski »

Hello,

Please send us a sample with test data that reproduces the issue for analysis.

Thank you.
IskandarAir
Posts: 105
Joined: Thu Aug 17, 2017 12:07 pm

Re: Zero values are shown

Post by IskandarAir »

Hi,

Here is the sample mrt file. To see the difference, select Data.Code => Text Format => Decimal Separator set to ":" or ".". There issue happens. Zero values must be hidden.

Best Regards.
Attachments
test-sample.mrt
(15.18 KiB) Downloaded 109 times
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Zero values are shown

Post by Lech Kulikowski »

Hello,

We have found the issue with ":" separator and HideZeros property. We will investigate it.

At the current moement, you can use the following expresion:
{IIF(Data.Code == 0, "", Data.Code)}

Thank you.
IskandarAir
Posts: 105
Joined: Thu Aug 17, 2017 12:07 pm

Re: Zero values are shown

Post by IskandarAir »

Hi,

Thank you for your response. Hope to hear from you soon with ":" separator and HideZeros=true property.

Best Regards.
IskandarAir
Posts: 105
Joined: Thu Aug 17, 2017 12:07 pm

Re: Zero values are shown

Post by IskandarAir »

Hi,

One more point. I have tried to hide zero values with events as I showed above. I want to hide them after printing values on the report. But for some reason, it shows the formula instead of values.
Adding if statement could have side-effects, cause the formula itself is too complex and it is used in many places. The best solutions could be hiding with ":" separator or with events. Could you, please, help with it?

Best regards.
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Zero values are shown

Post by Lech Kulikowski »

Hello,

Please send us a sample that reproduces the issue for analysis.

Thank you.
IskandarAir
Posts: 105
Joined: Thu Aug 17, 2017 12:07 pm

Re: Zero values are shown

Post by IskandarAir »

Hi,

Again, the same sample file can be used to reproduce the issue. I tried to change the value of Text1 on After Print event by setting the values manually. That did not work. What I need is that, on whatever event, if the value of the cell is "0:00", then it must be hidden or replaced with empty string. This should be done with events.

Best regards.
Attachments
test-sample.mrt
(15.18 KiB) Downloaded 92 times
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Zero values are shown

Post by Lech Kulikowski »

Hello,

Please check the attached report.

Thank you.
Attachments
test-sample2.mrt
(16.06 KiB) Downloaded 73 times
IskandarAir
Posts: 105
Joined: Thu Aug 17, 2017 12:07 pm

Re: Zero values are shown

Post by IskandarAir »

Hi,

okay. seems cumbersome for our task.
1. Can you tell the event which will be triggered after formula is calculated to final result, so we will check upon there?
2. Is there an event which will be triggered when all texts are rendered and we can check for "0:00" there? In other words, when all formulas, variables and sql execution are finished, pages are rendered and StiText has showing final result ? So again we would be able to check upon there?
Post Reply