Page 1 of 1
How can i load partial data in a report viewer control?
Posted: Thu Jan 12, 2012 4:00 pm
by gustavo
I made my report using a SQL database connection...
but i'm getting an error about OutOfMemoryException when rendering it, because my table has about 50.000 lines.
Question 1: How can i make to StiSLViewerControl load data as needed?
exemple:
Show only the first page...
when it moves to the next page, then it makes a new connection to load the data
To avoid load all the 50.000 lines at same time... and I can't split my report to smaller ones.
Question 2: And when it request to export... then i'll need all the 50.000 lines data to be exported...
Is there a simple way to create this two solutions?
How can i load partial data in a report viewer control?
Posted: Fri Jan 13, 2012 7:50 am
by HighAley
Hello.
gustavo wrote:I made my report using a SQL database connection...
but i'm getting an error about OutOfMemoryException when rendering it, because my table has about 50.000 lines.
Question 1: How can i make to StiSLViewerControl load data as needed?
exemple:
Show only the first page...
when it moves to the next page, then it makes a new connection to load the data
To avoid load all the 50.000 lines at same time... and I can't split my report to smaller ones.
Question 2: And when it request to export... then i'll need all the 50.000 lines data to be exported...
Is there a simple way to create this two solutions?
Please, try to set the PageLoadingMode="OnePage" propery of StiWebViewerSL and StiWebDesignerSL then pages will be loaded as needed.
Thank you.
How can i load partial data in a report viewer control?
Posted: Fri Jan 13, 2012 8:37 am
by gustavo
But i'm using this property...
but the problem is when it calls webservice method...
The LoadReport method... calls a helper RenderingReportHelper.CheckReportOnInteractions - (same as the sample project)
and it return a huge string... looks like it has all the pages at same time...
This is the code:
Public Function LoadReport(reportName As String) As String
If Not String.IsNullOrEmpty(reportName) Then
Dim report As New StiReport()
report.Load("Reports\" & reportName)
report.Render(False)
Dim r2 = RenderingReportHelper.CheckReportOnInteractions(report, True)
Return r2
End If
Return Nothing
End Function
And at the end, it calls:
viewer.ApplyRenderedReport(e.Result);
but before this las call, it throws an exception about OutOfMemoryException
what i'm doing wrong to make OnePage property works?
How can i load partial data in a report viewer control?
Posted: Fri Jan 13, 2012 11:26 am
by Anton Lozovskiy
Hello,
Can you please send us a sample application with data, which reproduce the issue?
Thank you.
How can i load partial data in a report viewer control?
Posted: Fri Jan 13, 2012 11:54 am
by gustavo
it is the Stimulsoft.Reports.Samples.WCF... that i downloaded from this forum.
i just create a new report (4 columns from 1 table) and i tryed to render ir...
the query should return about 50.000 lines...
but it throws OutOFMemoryException
then i read something about use PageLoadingMode = "OnePage" property... but i don't know how to use it...
i put it in my code and nohting changed...
Do you have some sample project or code using PageLoadingMode and SQL Connections? or could you create a sample project and share it here? please!
How can i load partial data in a report viewer control?
Posted: Tue Jan 17, 2012 2:30 am
by HighAley
Hello.
gustavo wrote:it is the Stimulsoft.Reports.Samples.WCF... that i downloaded from this forum.
i just create a new report (4 columns from 1 table) and i tryed to render ir...
the query should return about 50.000 lines...
but it throws OutOFMemoryException
then i read something about use PageLoadingMode = "OnePage" property... but i don't know how to use it...
i put it in my code and nohting changed...
Do you have some sample project or code using PageLoadingMode and SQL Connections? or could you create a sample project and share it here? please!
The PageLoadingMode="OnePage" property doesn't work now. This problem is in our to-do list.
To help you with Out of Memory Exception we need to see your working project and analyse it.
Thank you.
How can i load partial data in a report viewer control?
Posted: Wed Jan 18, 2012 8:48 am
by gustavo
Any ideia when this property will be avaliable in silverlight?
i'm getting this exception when i call a huge report... mode than 1200 pages... the memory goes to the limit...
because of this i wanted to implement one page mode.
the only method that i have is:
Code: Select all
In my service:
Public Function LoadReport(reportName As String) As String
If Not String.IsNullOrEmpty(reportName) Then
Dim report As New StiReport()
report.Load(reportName)
report.Render(False)
Return RenderingReportHelper.CheckReportOnInteractions(report, True) <-- Here it returns the huge result
End If
Return Nothing
End Function
and then... it return to my ViewPage
Code: Select all
report.ApplyRenderedReport(e.result) <-- here it throws the exception
very simple code at the moment...
is there any workaround until be possible to load one page at time?
How can i load partial data in a report viewer control?
Posted: Wed Jan 18, 2012 9:32 am
by Alex K.
Hello,
Unfortunately, but on the current moment this cannot be implemented. You can use filtering or split it the report on several parts.
Thank you.