Summary Page

Stimulsoft Reports.WPF discussion
Post Reply
mhudnall
Posts: 12
Joined: Tue Oct 20, 2009 2:20 pm
Location: Tuscaloosa, AL

Summary Page

Post by mhudnall »

If I have a report with 3 'designer' pages, say XYZ, and I wanted page Z to display summary information about how many pages of page X and how many pages of page Y were printed/rendered, how would I do that?

I can get the values in C# after the report is generated, but I need the values embedded into the report and I don't want to have to regenerate the report again just to have those values. Any thoughts???
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Summary Page

Post by Edward »

Hi

Yes, that is possible. Please create two variables in the Dictionary with integer type.

Then in the Page1 and Page2 'Rendering event' add the following lines of code:

MyVariable1++;

and

MyVariable2++;

so when the report engine is in rendering the third page, information about amount of pages which have been printed will be available.

Thank you.
mhudnall
Posts: 12
Joined: Tue Oct 20, 2009 2:20 pm
Location: Tuscaloosa, AL

Summary Page

Post by mhudnall »

As usual, it worked great, thanks!

How do I find out what all code I am allowed to put into an event?

For example:
-Is everything that the base framework supports allowed, or only certain operations (for, foreach, ToString, etc.)?
-What about includes?
-What about local variable declarations?

Thanks again for the quick response. Your company has great tech support and that really goes a long way.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Summary Page

Post by Edward »

Hi
As usual, it worked great, thanks!
Thanks again for the quick response. Your company has great tech support and that really goes a long way.
You are very welcome :)

Thank you very much for the nice words.

There is a very simple answer for this question. One report is just a .Net class. All components inside of that class are being stored in the code of the report.

So event handlers are absolutely the same as they could be in the Visual Studio project plus some functions we have in the 'Functions' panel.

If you need to declare additional methods to the report class then it is possible to do using 'Code' Tab. All code must be added outside this region:

#region StiReport Designer generated code - do not modify

as all code inside of this region is being replaced automatically when changes to the report template is being made.

You can add your own namespaces to the report class as in regular c#/VB.Net class with help: using or Imports keywords.

And if additional assemblies must be added to the report than:

1) They must be placed together with Stimulsoft assemblies
2) Reference to them must be added to ReferenceAssemblies property of the report object in the property editor.

Please let us know if you need any help.

Thank you.
mhudnall
Posts: 12
Joined: Tue Oct 20, 2009 2:20 pm
Location: Tuscaloosa, AL

Summary Page

Post by mhudnall »

Sounds great, thanks!
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Summary Page

Post by Edward »

You are very welcome :)
Post Reply