Page 1 of 1
Disable a specific band in the report using designer within the code and display grouped totals
Posted: Fri Nov 16, 2018 12:09 pm
by devanshsaini
Hello,
I was using Stimulsoft Reports and Stimulsoft Viewer to make a report. I was using the Designer Windows application to make an MRT file and i was binding the data to the MRT file using an object in my code. I was able to bind all the data to the report and now i wanted to add conditions to enable and disable the bands within the report by CODE and NOT in the Designer application. I wanted to enable the footer and header bands when a certain value was true. I wanted to set the Behavior's property 'Enabled' in the code when a certain value was true.
Thank You
Re: Disable a specific band in the report using designer within the code
Posted: Sun Nov 18, 2018 7:49 pm
by Alex K.
Hello,
You can find a sample which shows how to work with a report from code:
https://www.stimulsoft.com/en/samples/j ... -from-code
Thank you.
Re: Disable a specific band in the report using designer within the code
Posted: Wed Dec 05, 2018 3:22 pm
by devanshsaini
Hello there,
Is it possible to calculate sum in a Stimulsoft Report for a particular group then add that sum to the sum of the next group and keep doing that till the last group. I know this is a function for SumRunning in the Stimulsoft Designer but that is not working.
I have data in the following format:
Interest
// Group 1 starts
500
600
500
400
Sum = 2000
Running Total = 2000
//Group 2 starts
100
200
300
500
200
400
Sum = 1700
Running Total = previous Running Total + sum of this group = 2000 + 1700 = 3700
I need to do it in the code. Please check the attachment.
And also can you please let me know how can i access the Sum which was calculated in the designer.
P.S.: Sum here depict the Running Totals for a group.
Thank you
Re: Disable a specific band in the report using designer within the code and display grouped totals
Posted: Fri Dec 07, 2018 9:14 am
by Lech Kulikowski
Hello,
You can use additional variables for necessary summing in the expression:
{SumVariable = SumVariable + DataSourceName.ColumnName}
Thank you.
Re: Disable a specific band in the report using designer within the code and display grouped totals
Posted: Tue Dec 18, 2018 11:37 am
by devanshsaini
Hello,
I tried that but it does not work because the sum is within the column. It looks like Running Sum.
Thank You
Re: Disable a specific band in the report using designer within the code and display grouped totals
Posted: Tue Dec 18, 2018 8:37 pm
by Lech Kulikowski
Hello,
Sample report in the attachment.
If you need reset sum for group, you can add text expression {SumVariable = 0}
Thank you.