Row Number

Stimulsoft Ultimate discussion
Post Reply
jaynner
Posts: 18
Joined: Fri May 25, 2018 2:08 am

Row Number

Post by jaynner »

I want to add a custom row number on databand without using the system variable Line.
If I met a certain condition e.g if ID is divisible by 2 then the row number will increment.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: Row Number

Post by Edward »

Hi Jaynner,

Please open the attached report in our online demo http://demo.stimulsoft.com/#Net/SimpleList or in Viewer.exe which comes with a standard installation package.
There I created a variable v1i the report's Dictionary and in the BeforePrint event of the DataBand1 I added the following;

Code: Select all

if (Customers.CompanyName[0] == 'A' || Customers.CompanyName[0] == 'B')
{
   v1 = v1 + 1;
}
DataBand1_BeforePrint.png
DataBand1_BeforePrint.png (130.84 KiB) Viewed 3541 times
BeforePrintDataBand1.mrt
(35.16 KiB) Downloaded 311 times
Thank you,
Edward
jaynner
Posts: 18
Joined: Fri May 25, 2018 2:08 am

Re: Row Number

Post by jaynner »

Edward wrote: Thu May 31, 2018 5:18 am Hi Jaynner,

Please open the attached report in our online demo http://demo.stimulsoft.com/#Net/SimpleList or in Viewer.exe which comes with a standard installation package.
There I created a variable v1i the report's Dictionary and in the BeforePrint event of the DataBand1 I added the following;

Code: Select all

if (Customers.CompanyName[0] == 'A' || Customers.CompanyName[0] == 'B')
{
   v1 = v1 + 1;
}
DataBand1_BeforePrint.png

BeforePrintDataBand1.mrt

Thank you,
Edward
Thank you very much edward. How do I find the BeforePrint event?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: Row Number

Post by Edward »

Hi Jaynner,

No problem at all, please check some similar steps in the video of using the 'Click' Event in the Windows Forms application as follows;
https://www.youtube.com/watch?v=3BfDdBR6TFE

You could find the BeforePrint event in the exact same way in the web-based designer if you would like to follow the live demo in the following link;
http://demo.stimulsoft.com/#Net/SimpleList

Then please click Edit button on the right-hand side to enter the designer of the displayed report.
To open the attached above report template there, go to File-Open-Browse and select the BeforePrintDataBand1.mrt file there.
Also, you could check the report component names, assigned events and the report structure in the Report Tree:
https://www.stimulsoft.com/en/documenta ... t_tree.htm

Once you have an idea about the report structure, the easiest way to access the components and their properties and events by using the Property Editor as in the video I mentioned above.

Please do let us know if you need any help.

Thank you,
Edward
jaynner
Posts: 18
Joined: Fri May 25, 2018 2:08 am

Re: Row Number

Post by jaynner »

Edward wrote: Thu Jun 07, 2018 7:41 am Hi Jaynner,

No problem at all, please check some similar steps in the video of using the 'Click' Event in the Windows Forms application as follows;
https://www.youtube.com/watch?v=3BfDdBR6TFE

You could find the BeforePrint event in the exact same way in the web-based designer if you would like to follow the live demo in the following link;
http://demo.stimulsoft.com/#Net/SimpleList

Then please click Edit button on the right-hand side to enter the designer of the displayed report.
To open the attached above report template there, go to File-Open-Browse and select the BeforePrintDataBand1.mrt file there.
Also, you could check the report component names, assigned events and the report structure in the Report Tree:
https://www.stimulsoft.com/en/documenta ... t_tree.htm

Once you have an idea about the report structure, the easiest way to access the components and their properties and events by using the Property Editor as in the video I mentioned above.

Please do let us know if you need any help.

Thank you,
Edward
You are so kind. Thank you very much. :D
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: Row Number

Post by Lech Kulikowski »

Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.
Post Reply