Dear All
I had try develop new project using wisej framework about 6 month, i had trouble using Crystall Report.
When user open crystall report for 3-4 times or sometimes click next page, couse web crash (i am searching this problem in 2 month), don’t knowing what cause this problem (i had try to clear memory after viewing report, it same).
There someone have experience using crystall report asp.net with some problem? Can you share how to solve this problem or there another good report tools to replace crystall report.
Thanks a lot
Nicky
You can try this help. It worked for me when PrintJobLimit
1. Open Command prompt with Run as….
2. Run command:
REG ADD “HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.2\Report Application Server\Server” /v PrintJobLimit /d 9999 /f
REG ADD “HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\9.0\Report App\Server” /v PrintJobLimit /d 99999 /f
REG ADD “HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Report Application Server\InprocServer” /v PrintJobLimit /d 99999 /f
REG ADD “HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Report Application Server\Server” /v PrintJobLimit /d 9999 /f
REG ADD “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Crystal Decisions\10.2\Report Application Server\InProcServer” /v PrintJobLimit /d 99999 /f
REG ADD “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Crystal Decisions\10.2\Report Application Server\Server” /v PrintJobLimit /d 99999 /f
REG ADD “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Crystal Decisions\9.0\Report App\InprocServer” /v PrintJobLimit /d 99999 /f
REG ADD “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Crystal Decisions\9.0\Report App\Server” /v PrintJobLimit /d 99999 /f
REG ADD “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Report Application Server\InprocServer” /v PrintJobLimit /d 99999 /f
REG ADD “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Report Application Server\Server” /v PrintJobLimit /d 9999 /f
Dear Alaa
This example of mycode in asp.net.
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports CrystalDecisions.Web
Imports System.Data
Imports System.Data.SqlClientPublic Class FrmUserPrint
Inherits System.Web.UI.Page
Public DSMaster1 As New DSMaster
Private cprt As New ReportDocument
Private scon As SqlConnection, scom As SqlCommand, strsql, strobra, strocomp, strousernm As String
Private POS1 As New Pos
Private strklik As StringPrivate Sub FrmUserPrint_PreInit(sender As Object, e As EventArgs) Handles Me.PreInit
strklik = Request(“klik”)
strobra = Request(“branch”)
strocomp = Request(“company”)
strousernm = Request(“username”)
If strklik = “” Then
Label1.Visible = False
DropExport.Visible = False
BtnExport.Visible = False
Return
End If
PTampil()
cprt.Load(Server.MapPath(“/rpt/Master/Rpt_Master_User.rpt”))
cprt.SetDataSource(DSMaster1.Tables(“DtMUser”))
cprt.SetParameterValue(“strprinted”, “Dicetak oleh : ” & strousernm & ” / ” & Now.ToString(“yyyy-MMM-dd HH:mm:ss”))
CRV.ReportSource = cprt
Label1.Visible = True
DropExport.Visible = True
BtnExport.Visible = True
End SubPrivate Sub BtnExport_Click(sender As Object, e As EventArgs) Handles BtnExport.Click
Try
Select Case DropExport.Text.ToLower.Trim
Case “pdf”
cprt.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, False, “List_User”)
Case “word”
cprt.ExportToHttpResponse(ExportFormatType.WordForWindows, Response, False, “List_User”)
Case “excel”
cprt.ExportToHttpResponse(ExportFormatType.Excel, Response, False, “List_User”)
Case “excel 2007”
cprt.ExportToHttpResponse(ExportFormatType.ExcelWorkbook, Response, False, “List_User”)
Case “csv”
cprt.ExportToHttpResponse(ExportFormatType.CharacterSeparatedValues, Response, False, “List_User”)
Case “rtf”
cprt.ExportToHttpResponse(ExportFormatType.RichText, Response, False, “List_User”)
Case “rtf editable”
cprt.ExportToHttpResponse(ExportFormatType.EditableRTF, Response, False, “List_User”)
Case “text”
cprt.ExportToHttpResponse(ExportFormatType.Text, Response, False, “List_User”)
End Select
Catch ex As Exception
cprt.Close()
cprt.Dispose()
GC.Collect()
End TryEnd Sub
Sub PTampil()
Dim srdr As SqlDataReader
scon = POS1.F_con()
DSMaster1.Tables(“DtMUser”).Rows.Clear()
Try
scon.Open()
strsql = “select userid,nama,group_access,last_login,host_login,ip_login,[status] from m_user order by [status],nama”
scom = New SqlCommand(strsql, scon)
srdr = scom.ExecuteReader()
While srdr.Read()
Dim arw As DataRow
arw = DSMaster1.Tables(“DtMUser”).NewRow
arw(0) = IIf(IsDBNull(srdr.Item(“userid”)) = True, “”, srdr.Item(“userid”))
arw(1) = IIf(IsDBNull(srdr.Item(“nama”)) = True, “”, srdr.Item(“nama”))
arw(2) = IIf(IsDBNull(srdr.Item(“group_access”)) = True, “”, srdr.Item(“group_access”))
arw(3) = IIf(IsDBNull(srdr.Item(“status”)) = True, 0, srdr.Item(“status”))
arw(4) = srdr.Item(“last_login”)
arw(5) = IIf(IsDBNull(srdr.Item(“host_login”)) = True, “”, srdr.Item(“host_login”))
arw(6) = IIf(IsDBNull(srdr.Item(“ip_login”)) = True, “”, srdr.Item(“ip_login”))
DSMaster1.Tables(“DtMUser”).Rows.Add(arw)
End While
srdr.Close()
srdr.Dispose()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
scon.Close()
scon.Dispose()
End SubPrivate Sub FrmUserPrint_Unload(sender As Object, e As EventArgs) Handles Me.Unload
If cprt IsNot Nothing Then
cprt.Close()
cprt.Dispose()
GC.Collect()
End If
End SubPrivate Sub BtnExport_Unload(sender As Object, e As EventArgs) Handles BtnExport.Unload
If cprt IsNot Nothing Then
cprt.Close()
cprt.Dispose()
GC.Collect()
End If
End Sub
End Class
Hi Nicky,
We use Crystal Reports and have had tons of problems. We are in a transition to Stimulsoft Reports but have to support Crystal for some time. We built a library to take the report parameters and convert it to a PDF, we then deliver that PDF to the front end. If this would work for you I’m happy to share the source code for that library with you (it takes a database connection string, the report filename, the PDF filename etc.).
There’s also a limit of how many reports you can see in one session – I think the default is 20, then you get all sorts of issues. There are registry keys to get round this, but you’ll see memory leaks etc. from Crystal. It hasn’t progressed at all since SAP bought it.
Regards,
Neil.
Hi Nicky,
Would you be able to wrap-up a small reproducible test case for us to check the issue?
Best,
Alaa
Please login first to submit.