ارتباط کریستال ریپورت و asp.net

sama15661

New Member
با سلام خدمت دوستان گرامی
برای گزارشگیری در asp.net من یک گزارش به نام crystalreport1.rpt درست کرده ام حالا می خواهم این گزارش را به یک فرم در aspx ارتباط بدم و از کد زیر برای برقراری ارتباط هم استفاده کرده ام .
Dim strConnection As String = "workstation id=. ;packet size=4096;integrated security=SSPI;initial catalog=AMOZESH;persist security info=False"
Dim Connection As New SqlConnection(strConnection)
Dim strSQL As String = "Select * From sabt85"
Dim DA As New SqlDataAdapter(strSQL, Connection)
Dim DS As New DataSet
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
DA.Fill(DS)
strReportName = "CrystalReport1"
'Get the Report Location
Dim strReportPath As String = "D:\inetpub\wwwroot\hozor\CrystalReport1.rpt"
'Check file exists
If Not IO.File.Exists(strReportPath) Then
Throw (New Exception("Unable to locate report file:" & vbCrLf & strReportPath))
End If
'Assign the datasource and set the properties for Report viewer
Dim rptDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent
rptDocument.Load(" D:\inetpub\wwwroot\hozor\CrystalReport1.rpt")
rptDocument.SetDataSource(DS.Tables(0))
rptViewer.ReportSource = rptDocument
End Sub

ولی خطا می دهد که
A Crystal Reports job failed because a free license could not be obtained in the time allocated. More licenses can be purchased direct from Crystal Decisions or through the Crystal Decisions Online Store. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: CrystalDecisions.CrystalReports.Engine.OutOfLicens eException: A Crystal Reports job failed because a free license could not be obtained in the time allocated. More licenses can be purchased direct from Crystal Decisions or through the Crystal Decisions Online Store.

Source Error:


Line 48: 'Assign the datasource and set the properties for Report viewer
Line 49: Dim rptDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent
Line 50: rptDocument.Load(" D:\inetpub\wwwroot\hozor\CrystalReport1.rpt")
Line 51: rptDocument.SetDataSource(DS.Tables(0))
Line 52: rptViewer.ReportSource = rptDocument

من متوجه این خطا نمی شوم چون فایل گزارش را پیدا می کند ولی خطای که می گیرد برای من نامفهوم است ؟
 

جدیدترین ارسال ها

بالا