ResetRenderedState

Stimulsoft Reports.NET discussion
Post Reply
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

ResetRenderedState

Post by EDV Gradl »

I tried to use ResetRenderedState, but somehow it does not work.

I used something like this:

StiReport MyReport = new StiReport();
MyReport.Load(@"C:\File1.mdc");
MyReport.Compile();
MyReport.Render(false);
MyReport.Show(true);
MyReport.ResetRenderedState();
MyReport.Render(false) <---- here I get an error, saying that false and true and not valid in the context.

Or do I use the method in a wrong way?

Thanks!
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

ResetRenderedState

Post by Edward »

Here the code of the ResetRenderedState method

Code: Select all

public void ResetRenderedState()
{			
	isRenderedValue = false;
	CompiledReport = null;
	CompilerResults = null;
	RenderedPages.Clear();
}
This code tells to the report engine, that the report was not prepared for showing, the collection of the Rendered Pages is empty and report was not compiled.
The report for the previewing may be got from the template
MyReport.Load(@"C:\File1.mrt");
or from the collection of the Rendered pages:
MyReport.LoadDocument(@"C:\File1.mdc");

We cannot reproduce the error. Please send to us a sample, or provide with more detail.

Thank you.


EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

ResetRenderedState

Post by EDV Gradl »

No need to. I already see my error. I had to use RenderedPages.Clear() :-)

Thanks, Marco
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

ResetRenderedState

Post by Edward »

Let us know, if you need any help.

Thank you.
Post Reply