Hello Community,
I have a problem with a total row in a report.
I just work for some training on a very simple report.
For this I created
- a table, called "Cars"
- a page (List), which is related to that table
- a report, which have to show a cars.
For my testing scenario, I created e simple records.
I added a tablix object into the body section of the report, where I placed my fields
- Manufacturer
- Model
- PS (or in english, HP)
- Color
In the last row, I want to show the total amount of hp. For this I added a global variable "g_decTotalPS".
Behind the "Cars - OnAfterGetRecord" trigger, I added the following code:
g_decTotalPS += Cars.PS;
I set the following dataitems into my report:
- Integer <Cars Header> (Indentation 0)
- Cars <Cars> (Indentation 1)
- Integer <Total> (Indentation 1)
Under the DataItem "Total" I set my global "g_decTotalPS".
When I set a messagebox behind the trigger "Total - On AfterGetRecord", I see that there is a value inside this variable.
But then I set the variable into my row inside the rdlc-report, it is still empty.
I put a static text ("Total PS") one cell before the TotalPS, in the same row. This value is visible when
I print the report. When I use the SUM method inside the rdlc report, it works pretty well.
But there have to be a possibility to print own variables.
I have no idea what I can do to fix this issue. Hope you can help me to solve it.
Here is a link where you can download my fob-file:
http://www.file-upload.net/download-818 ... e.zip.html