Reports very slow.

Stimulsoft Reports.WEB discussion
shilpa
Posts: 21
Joined: Thu Aug 11, 2011 8:03 am
Location: India

Reports very slow.

Post by shilpa »

I am using stimulsoft reports in my website.I have more than 5000 records in my report.But the reports are not displayed.There is no error on the page.But, the report displayed is blank report even if the dataset contains the records.
Below is my sample code

strPrintFilePath = GetPrintFilePath(MyReportModule, strGrpBy)

Dim ssoftRpt As New Stimulsoft.Report.StiReport


ssoftRpt.RegData("MyTable", dsReport)

enddatebeforeloadingpath = ", Date before loading path: " & Convert.ToString(Date.Now)
strlogerror = strlogerror & enddatebeforeloadingpath
ssoftRpt.Load(Server.MapPath(strPrintFilePath))
ssoftRpt.Compile()
ssoftRpt("DateRangeFilter") = "Date Range: " & StartDate & " - " & EndDate
'ssoftRpt.Dictionary.Variables("DateRangeFilter").Value = "Date Range: " & StartDate & " - " & EndDate
ssoftRpt.Render(False)
svwrReport.Report = ssoftRpt


Kindly help me with this.I am not getting any solution for this.
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Reports very slow.

Post by Ivan »

Hello,

Can you please send us a sample report template with data or a simple test project, which reproduces the issue?

Thank you.
shilpa
Posts: 21
Joined: Thu Aug 11, 2011 8:03 am
Location: India

Reports very slow.

Post by shilpa »

Private Sub ShowReport()
Dim stackTrace As New StackTrace(New StackFrame(True))
Dim methodBase As MethodBase = stackTrace.GetFrame(0).GetMethod
Dim strlogerror As String = ""
Try

Dim dtMain As DataTable = Nothing
Dim strSortBy As String = SortOrder
Dim intTsp_id As Integer = TSPId
Dim myReport As IFacilityCriteria = Nothing
FormReportFromFolderInfoObject(myReport, FolderId)



If IsNothing(myReport) = False Then
'CONSTRUCTING "where clause" USING THE QUERYSTRING PARAMETERS
Dim strExtraWC As String = ClsRptParameters.ConstructQueryString(myCollection, FolderName)
Dim dsMain As DataSet = Nothing
Dim fServer As New ImplFilterServer

If (SortOrder = "Default") Then
strSortBy = "Companyname"
End If

Dim dtstartdate As Date = FormatDateTime(StartDate, DateFormat.ShortDate)
Dim dtendate As Date = FormatDateTime(EndDate, DateFormat.ShortDate)
Dim intTimeZoneVal As Integer = TimeZoneValue

dsMain = fServer.GetDataFromFolderCriteria(myReport, GetLoggedInUser, myAppTitle, strExtraWC, dtstartdate, dtendate, intTimeZoneVal, strSortBy, TSPId)
'dsMain.Tables.Count > 0
If dsMain.Tables(0).Rows.Count > 0 Then

'Dim strSortBy As String = GroupBy & " " & SortOrder
'Dim dvReport As New DataView(dsMain.Tables(0), "", strSortBy, DataViewRowState.OriginalRows)
Dim dvReport As New DataView(dsMain.Tables(0), "", "", DataViewRowState.OriginalRows)

Dim dsReportMRT As New DataSet
dsReportMRT.Tables.Add(dvReport.ToTable)
'lblReoordCount.Text = "Total " & dvReport.ToTable.Rows.Count & " Record/s. "
LoadReport(dsReportMRT)

'End If
Else
Response.Redirect("NoRecord.aspx")
End If
End If

Catch ex As Exception
Dim strClass As String = stackTrace.GetFrame(0).GetFileName.ToString
LogError(strClass, methodBase.Name, "", ex, LogType.ERROR)
End Try

End Sub
===================================================
Private Sub LoadReport(ByVal dsReport As DataSet)
Dim stackTrace As New StackTrace(New StackFrame(True))
Dim methodBase As MethodBase = stackTrace.GetFrame(0).GetMethod
Dim strlogerror As String = ""
Try

Dim strPrintFilePath As String = ""
Dim strGrpBy As String = GroupBy
Dim MyReportModule As enumReportModules


Dim startdtforlog As String = "LoadReport Details Local: Start Date: " & Convert.ToString(Date.Now)
Dim enddatebeforeloadingpath As String = ""
Dim enddateafterloadingreport As String = ""
strlogerror = strlogerror & startdtforlog

Select Case AppModuleId
Case 1
Select Case strGrpBy
Case "None"
MyReportModule = enumReportModules.LineCount
Case "Companyname"
MyReportModule = enumReportModules.LineCountComp
Case "Departmentname"
MyReportModule = enumReportModules.LineCountDept
Case "Username"
MyReportModule = enumReportModules.LineCountDoctor
End Select

'Case 2
' MyReportModule = enumReportModules.ActualLineCount
Case 5
MyReportModule = enumReportModules.ActualLineCountDS
Case 6
MyReportModule = enumReportModules.ActualLineCountTSPName
Case 7
MyReportModule = enumReportModules.ActualLineCountSummary
Case 8
Select Case strGrpBy
'Case "None"
' MyReportModule = enumReportModules.ACL
Case "DSName"
MyReportModule = enumReportModules.ACLDS
Case "TSPName"
MyReportModule = enumReportModules.ACLTSP
'Case "GroupName"
' MyReportModule = enumReportModules.ACLGrp
End Select
End Select

strPrintFilePath = GetPrintFilePath(MyReportModule, strGrpBy)

Dim ssoftRpt As New Stimulsoft.Report.StiReport

ssoftRpt.Load(Server.MapPath(strPrintFilePath))
ssoftRpt.RegData("MyTable", dsReport)


ssoftRpt.Compile()
ssoftRpt("DateRangeFilter") = "Date Range: " & StartDate & " - " & EndDate
'ssoftRpt.Dictionary.Variables("DateRangeFilter").Value = "Date Range: " & StartDate & " - " & EndDate
ssoftRpt.Render(False)
svwrReport.Report = ssoftRpt

'ssoftRpt.Dictionary.DataStore.ClearReportDatabase()
'ssoftRpt.CompiledReport.DataStore.ClearReportDatabase()
Dim strClass As String = stackTrace.GetFrame(0).GetFileName.ToString
Catch ex As Exception
Dim strClass As String = stackTrace.GetFrame(0).GetFileName.ToString
LogError(strClass, methodBase.Name, "", ex, LogType.ERROR)
End Try

End SubImage
Attachments
1255.0-0-ActualLineCountName.mrt
(105.7 KiB) Downloaded 750 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Reports very slow.

Post by HighAley »

Hello.

We couldn't reproduce this bug. Please send us a simple project with data to reproduce your issue.

Thank you.
shilpa
Posts: 21
Joined: Thu Aug 11, 2011 8:03 am
Location: India

Reports very slow.

Post by shilpa »

The thing is sometimes we get the report .And, sometimes we dnt see the report.The report that we get is blank.But we can scroll down the report as if there is some data in it.While debugging, there is no error.

Can't get the solution for this.What could be the reson for this?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Reports very slow.

Post by HighAley »

Hello.
shilpa wrote:The thing is sometimes we get the report .And, sometimes we dnt see the report.The report that we get is blank.But we can scroll down the report as if there is some data in it.While debugging, there is no error.

Can't get the solution for this.What could be the reson for this?
How many blank pages in your report? It can be problem with getting data from database. But for more detailed answer we need to reproduce you issue.

Thank you.
shilpa
Posts: 21
Joined: Thu Aug 11, 2011 8:03 am
Location: India

Reports very slow.

Post by shilpa »

No, the data from database is not blank.Because while debugging, we get the data in the dataset.The functions posted before for loading & showing the data also works perfect without ant error.

But, what we get get is the blank report.The whole report is blank from page-1.

Today, I was getting the report.But, after a while, I could not.Dnt know the exact cause.I have attched the print screen of blank report .Please have a look at it.
Attachments

[The extension bmp has been deactivated and can no longer be displayed.]

HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Reports very slow.

Post by HighAley »

Hello.

There are several reason for this issue. To know it i must to reproduce your issue.

Some part of memory is used for each ASPX process. Usually this memory is very limited. Therefore, big reports which require much memory.

You may try to do the following:
1. Enable the AjaxWithCache mode.
2. Do not call the WebViewer in the Page_Load event (for example, to call by pressing the button)
3. Decrease the cache timeout to 5 minutes (by default it is 15 minutes)
4. If does not help, then split big reports into smaller ones.

Maybe you can send us a rendered report in debug mode?

Thank you.
shilpa
Posts: 21
Joined: Thu Aug 11, 2011 8:03 am
Location: India

Reports very slow.

Post by shilpa »

Hi,

-> I tried using cache rendermode as "AjaxWithCache mode" before.Still the reports was not visible.

-> Regarding calling the WebViewer in the Page_Load event , that is our requirement.After clicking one button from one page, we need the report to be displayed.So, this cannot be done.

-> We also had set the timeout of filterservice.timeout=-1( function to call the report store procedure is in webservice-filterservice) so that we can get the whole data from the database before the time is out.

But, still the data is not displayed.

I changed the store procedure to get a small chunk of data.Then I opened the report.The report was displayed.That means there is some problem in loading large amout of data.

Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Reports very slow.

Post by Vladimir »

Hello,

The report size is critical for web. You can make the following steps to improve the report generation:
1. Enable caching by setting the ReportCacheMode property of a report to On or Auto.
2. For Stimulsoft Reports.Web allocate much memory in the report server for the process.
3. Decrease the amount of records in a report and split it into several parts.

These recommendations are common.

Thank you.
Post Reply