need more Ram for my Reports ?? phenomenon ??

Stimulsoft Reports.NET discussion
McCoy
Posts: 2
Joined: Tue Aug 29, 2006 9:28 am
Location: /

need more Ram for my Reports ?? phenomenon ??

Post by McCoy »

:boom:
I work with very large Reports. And there is a phenomenon in the Reports. Also in the Demo Version.
When you work a long time with the Reports , or with a lot of data the Report engine need a lot of "Ram" and "virtual main memory" over 2GB ("virtual main memory") and 800Mb Ram from 1024 installed.
After 2 hours the System get very slow.

To try ; open the Taskmanager -> the Demoversion 1.6 of the Reports needs now 30MB to 50MB , open a Report and get to preview and then on refresch,10times later the Reports needs now 170MB of my Ram.
When I work with a msSQL Database in background for the data in my Reports by the first Preview I need 600MB Ram!!!!!

and so on ...... 2 hours later my system is very very slow. :tire:

by smal Reports i have no probs.

A another phenomenon is ; when i forgot to close the Report , in background an msSQL database->the data for my Reports -> 4 hours later (nothing go´s on my PC) Failer => my system has not enough virtual main memory ???

my "msSQL" server needs now 270MB Ram (befor 10MB) and he give the memory not free, half houer later the same , my mssql server needs now more ram.
and so on......

McCoy
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

need more Ram for my Reports ?? phenomenon ??

Post by Vital »

You can solve this problems. I need describe some principles of the functioning the StimulReport.Net.

1. Source code of the report is formed. Forming based on the grounds of meta description of the report
2. This source code is compiled in to assembly
3. Assembly is loaded in to memory
4. Create object of the report from loaded assemblies
5. Report is rendered
6. Report is showed

The loaded assembly occupies place in memories. If ten once produce compiling the report,
that will be ten are once created assembly of the report and loaded in memory. How to correct?
Regrettably .Net Framework does not give the possibility to unload the assembly from memory
(only together with application domain, but this method has much restrictions).

1. Save the report as class and add it to project. In this case compiling occurs
together with project.
2. Save the report as assembly. Before building of the report its necessary to load
from assembly with method StiReport.GetReportFromAssembly.

Method has two variants of the work:

1.

Code: Select all

StiReport report = StiReport.GetReportFromAssembly("myreport.dll");
Report will is loaded in memory exactly so much once how much will is caused this method,
but at file of the assembly of the report will not be locked.

2.

Code: Select all

StiReport report = StiReport.GetReportFromAssembly("myreport.dll", true);
Report will is loaded in memory only once even though cause the method over and over again.
At file of the assembly will be locked before closing of application (blocking leaves only after
closing of application). Use of this method does not cause the memory leaks since assembly
of the report is loaded in memory only once.

Loading the reports from assemblies has one unpleasant minus - it is necessary beforehand to
prepare the assemblies of the reports. But minus possible easy avoid. Idea is concluded in that
to produce compiling the report under the first start the report on building:

1. Check, there is file of the compiled report on disk?
2. If file there is, that loads report from assembly and start on execution
3. File does not exist, then compile the report in to file (compiling will is made in any cases)
and start the report on execution.

Under following start the report on execution he will is loaded from file. Example of the code:

Code: Select all

StiReport report = null;
					
string compiledReportFile = "report.dll";

if (File.Exists(compiledReportFile))
{
report = StiReport.GetReportFromAssembly(compiledReportFile, true);
	report.RegData(“MyData”, dataSet);
	report.Render();
}
else
{
	report = new StiReport();
	report.Load(file);
		
	report.RegData(“MyData”, dataSet);
										
        report.Compile(compiledReportFile);						
			
	report.Render();
}
Note: If report is loaded from assembly, that speed of the building of the reports
much above since compiling is not required.

About data. If object of the report iexist in memory long time, that necessary to clean
the references to data after building of the report is finished:

Code: Select all

Report.Dictionary.DataStore.Clear();
If report was compiled, that in addition:

Code: Select all

Report.CompiledReport.DataStore.Clear();
Thanks.


McCoy
Posts: 2
Joined: Tue Aug 29, 2006 9:28 am
Location: /

need more Ram for my Reports ?? phenomenon ??

Post by McCoy »

ok Thanks.
I´ll try it.

:feelgood:
Anuranjani
Posts: 112
Joined: Wed Aug 27, 2014 12:36 pm

Re: need more Ram for my Reports ?? phenomenon ??

Post by Anuranjani »

Hello,

We have met the same problem not exact,while generating PDF exception thrown as "Out Of Memory" though having maximum RAM and Disk space.we Have viewed the solution,but can't get the solution clearly.will U please explain it clearly.How to save the report as Project.Help us improve.

Thank You
Thank You,
Darsana.R
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: need more Ram for my Reports ?? phenomenon ??

Post by Alex K. »

Hello,

Can you please describe your issue in more details.
How many pages in your rendered report? Also please try to turn on the CacheMode for the report.

Thank you.
Anuranjani
Posts: 112
Joined: Wed Aug 27, 2014 12:36 pm

Re: need more Ram for my Reports ?? phenomenon ??

Post by Anuranjani »

Hello,
We are generating more than 600 pages.After checked with the new Pre-release for build on 12-9-2014.We are unable to generate PDF,Its throws exception as "Out Of Memory".I have turned on the Cache Mode for the report.Please Help Us to improve.
Thank You,
Darsana.R
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: need more Ram for my Reports ?? phenomenon ??

Post by Alex K. »

Hello,

Can you please send us a sample which reproduce the issue for analysis.

Thank you.
Anuranjani
Posts: 112
Joined: Wed Aug 27, 2014 12:36 pm

Re: Integration Issue

Post by Anuranjani »

Hello,

How to integrate pre release build 12-9-2014 with the latest offical build 2014.1.1900.We are using Licensed version of 2014.1.1900 build.Please kindly help us improve.

Thank You.
Thank You,
Darsana.R
Anuranjani
Posts: 112
Joined: Wed Aug 27, 2014 12:36 pm

Re: Build Integration of pre release and Offical Release

Post by Anuranjani »

Hello,

Let me know one thing that,How to integrate pre-release build 2014.2.1924( released date of 12-9-2014 )with the latest offical build 2014.1.1900.We are using Licensed version of 2014.1.1900 build.
Our Previous Index Page Number Issue has got resoled only in pre-release build of 2014.2.1924 build not in 2014.1.1900.Kindly help us to integrate the build with steps.
Please help us improve.

Thank You.
Thank You,
Darsana.R
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: need more Ram for my Reports ?? phenomenon ??

Post by Alex K. »

Hello,

Please make following steps:
1. Uninstall Stimulsoft Reports.
2. Check GAC and if need remove Stimulsoft Assemblies from GAC.
3. Install new version.
4. Update references in your projects.

Thank you.
Post Reply