Performance of StimulReport

Stimulsoft Reports.NET discussion
Post Reply
nelson chai
Posts: 16
Joined: Mon Jan 08, 2007 4:01 am

Performance of StimulReport

Post by nelson chai »

Hi, Good Day,

I had a performance issue. Hope can help to solve.

I had a PC Hardware are
P4 3.0Ghz Processor, 512MB DDR2 RAM, 80GB HDD, DVD-ROM, Floppy

Software Environment are
Windows XP SP2, MSSQL2005 Express, .Net Framework 2.0, Running a program developed using VB.net 2005 + Stimulreport.Net, DBF Base program.

I saw that running from the program that i developed and calling stimulreport.net. but when i preview or print a report, it quite slow. i had to wait about 40 saat and above to generate a report with data preview.

what is possibility to cause this problem? and how should i to improve the performance?

Thanks a lot.

Regards,
Nelson Chai
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Performance of StimulReport

Post by Vital »

Please show code which you are use for report showing or printing.

Thank you.
nelson chai
Posts: 16
Joined: Mon Jan 08, 2007 4:01 am

Performance of StimulReport

Post by nelson chai »

Hi,
This is a button preview Event

Private Sub btnPreview_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPreview.Click
If gvwSelectReport.FocusedRowHandle > -1 Then
Dim rptPreview As New Stimulsoft.Report.StiReport
'Apply Settings To Report
rptPreview.CacheAllData = MiscResource.bCacheAllData
Try
rptPreview.ClearAllStates
If Me.gvwSelectReport.GetRowCellValue(gvwSelectReport.FocusedRowHandle,"Category").ToString.ToUpper = "SYSTEM" Then
Dim rptPath As String = Application.StartupPath & "\ReportTemplate\" & _
gvwSelectReport.GetRowCellValue(gvwSelectReport.FocusedRowHandle,"ReportName") & ".mrt"
rptPreview.Load(rptPath)
End If
If Me.gvwSelectReport.GetRowCellValue(gvwSelectReport.FocusedRowHandle,"Category").ToString.ToUpper = "USER" Then
Dim byteReport As Byte() = Me.gvwSelectReport.GetRowCellValue(gvwSelectReport.FocusedRowHandle,"Template")
Dim rptpath As New System.IO.MemoryStream(byteReport)
rptPreview.Load(rptPath)
End If
rptPreview.Dictionary.Databases.Clear
rptPreview.Dictionary.Databases.Add(New Stimulsoft.Report.Dictionary.StiSqlDatabase("SQLConnection",sDBConnection))
rptPreview.Compile
rptPreview("CompanyCode") = MiscResource.sCompanyID
rptPreview("CompanyName") = MiscResource.sCompanyName

ReportParameters(gvwSelectReport.GetRowCellValue(gvwSelectReport.FocusedRowHandle,"ReportName"),rptPreview)
rptPreview.Show
Catch ex As Exception
MessageBox.Show(ex.Message,MiscResource.sPrgTitleShort,MessageBoxButtons.OK,MessageBoxIcon.Warning)
rptPreview.Show
End Try
'Close
End If
End Sub

And This is Button Print Event
Private Sub btnPrint_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
If gvwSelectReport.FocusedRowHandle > -1 Then Exit Sub
Dim rptPrint As New Stimulsoft.Report.StiReport
rptPrint.CacheAllData = MiscResource.bCacheAllData
Try
rptPrint.ClearAllStates
If Me.gvwSelectReport.GetRowCellValue(gvwSelectReport.FocusedRowHandle,"Category").ToString.ToUpper = "SYSTEM" Then
Dim rptPath As String = Application.StartupPath & "\ReportTemplate\" & _
gvwSelectReport.GetRowCellValue(gvwSelectReport.FocusedRowHandle,"ReportName") & ".mrt"
rptPrint.Load(rptPath)
End If
If Me.gvwSelectReport.GetRowCellValue(gvwSelectReport.FocusedRowHandle,"Category").ToString.ToUpper = "USER" Then
Dim byteReport As Byte() = Me.gvwSelectReport.GetRowCellValue(gvwSelectReport.FocusedRowHandle,"Template")
Dim rptPath As New System.IO.MemoryStream(byteReport)
rptPrint.Load(rptPath)
End If
rptPrint.Dictionary.Databases.Clear
rptPrint.Dictionary.Databases.Add(New Stimulsoft.Report.Dictionary.StiSqlDatabase("SQLConnection",sDBConnection))
rptPrint.Compile
rptPrint("CompanyCode") = MiscResource.sCompanyID
rptPrint("CompanyName") = MiscResource.sCompanyName
rptPrint.Print(True)
Catch ex As Exception
MessageBox.Show(ex.Message,MiscResource.sPrgTitleShort,MessageBoxButtons.OK,MessageBoxIcon.Warning)
rptPrint.Print(True)
End Try
End Sub

Thanks a lot.

Regards,
Nelson Chai
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Performance of StimulReport

Post by Brendan »

Does running your application outside Visual Studio while previewing the report still produce slow performance?

Sometimes when the debugger is attached to your running application and your report contains DateTime fields that might be null it can write lots of debug information to the Output window in visual studio and this can produce a slow preview. I know I have found this to happen with 1 or 2 or my reports but with a release build this doesn't cause performance issues because the debug info isn't written to an output.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Performance of StimulReport

Post by Edward »

Please also read the following topic about increasing performance:

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

There is another way to increase the performance:

This method is based on using of NGEN utility. To start using this utility, please run installer.exe which is included in the standard delivery of StimulReport.Net.

And the best way to have a good performance on all kind of reports is using precompilation of the report:

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

Thank you.
nelson chai
Posts: 16
Joined: Mon Jan 08, 2007 4:01 am

Performance of StimulReport

Post by nelson chai »

Brendan wrote:Does running your application outside Visual Studio while previewing the report still produce slow performance?

Sometimes when the debugger is attached to your running application and your report contains DateTime fields that might be null it can write lots of debug information to the Output window in visual studio and this can produce a slow preview. I know I have found this to happen with 1 or 2 or my reports but with a release build this doesn't cause performance issues because the debug info isn't written to an output.
Hi Brendan,

Yes. I running my application outside Visual Studio. Actually application already deploy to user environment. The performance slow was feedback by user.
And I try at user PC. It slow.

Yeap. The debugger really make application slow down. i had build a release. so far so good.

Thanks your helping!!

Regards
Nelson Chai
Post Reply