The difference between two ways ??

Stimulsoft Reports.NET discussion
Post Reply
lampson
Posts: 42
Joined: Wed Dec 30, 2009 4:28 am

The difference between two ways ??

Post by lampson »

the first:

Code: Select all

 CP.LoadStyle(style);
               CP.Reports.CompiledReport.DataStore.Clear();

                CP.Reports.CompiledReport.RegData(dvtitle.Table.TableName, dvtitle);
                CP.Reports.CompiledReport.RegData(dvdetail.Table.TableName, dvdetail);

                CP.Reports.CompiledReport.Render();

                CP.Reports.CompiledReport.Print();
the second :

Code: Select all

 CP.LoadStyle(style);
               CP.Reports.CompiledReport.DataStore.Clear();

                CP.Reports.CompiledReport.RegData(dvtitle.Table.TableName, dvtitle);
                CP.Reports.CompiledReport.RegData(dvdetail.Table.TableName, dvdetail);

                StiReportV2Builder.RenderSingleReport(CP.Reports.CompiledReport, new StiRenderState(true));

                CP.Reports.CompiledReport.Print();
thank you .
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

The difference between two ways ??

Post by Jan »

Hello,

StiReportV2Builder.RenderSingleReport method used for report rendering when this report don't have SubReports (SubReports property of report) and this report use EngineV2. Please use Render method.

Thank you.
lampson
Posts: 42
Joined: Wed Dec 30, 2009 4:28 am

The difference between two ways ??

Post by lampson »

Thank you for your answer .

If there is no SubReport, it will use the second method the efficiency of higher ??
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

The difference between two ways ??

Post by Jan »

Hello,

No. Second method is internal use only. Please use common way.

Thank you.
lampson
Posts: 42
Joined: Wed Dec 30, 2009 4:28 am

The difference between two ways ??

Post by lampson »

Hello .
Sometimes, I used the first way to print data, will not respond, restart the application, they can use. This phenomenon is random .

When normal ,this is the contents of the Report.log :
2010:04:29, 11:03: StiReport: Compiling report
2010:04:29, 11:03: repots: Rendering report
2010:04:29, 11:03: repots: Rendering print

When no response,this is the contents of the Report.log :
2010:04:29, 11:03: StiReport: Compiling report .


This is my machine configuration: Celeron's CPU, 256 MB of memory,is a relationship with the machine configuration?

Thank you.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

The difference between two ways ??

Post by Jan »

Hello,

Please read following topic:

http://forum.stimulsoft.com/Default.aspx?g=posts&t=142

Thank you.
lampson
Posts: 42
Joined: Wed Dec 30, 2009 4:28 am

The difference between two ways ??

Post by lampson »

Hello ,
Save the report as class and add it to project. In this case compiling occurs together with project.

I have tested , this seems to be higher efficiency ,but, not tested long-running situation..

Thank you for your answer.
Post Reply