on 07-23-2009 12:16 PM
Hi.
We've written a client/server solution, using Crystal Reports.
The server are running the code below, to populate the report, and save it with data.
After this function are executed, the file are sent to the client, and viewed en CrystalReportsViewer.
If there's no subreports in the report, everything words fine.
If there's one ore more subreports, the CrystalReportsViewer comes up with a "Database Login" dialog.
It seems that the SetDataSource doesnt have any effect on the subreports... :o(
Private Shared Function RunReport(ByVal Filename As String, ByVal Dset As DataSet)
Dim tmpfilename As String = My.Computer.FileSystem.GetTempFileName() & ".rpt"
Dim RPT As New ReportDocument
RPT.FileName = Filename
RPT.SetDataSource(Dset)
For Each subreport As ReportDocument In RPT.Subreports
subreport.SetDataSource(Dset)
Next
RPT.SaveAs(tmpfilename, True)
Dset.Dispose()
RPT.Dispose()
Return tmpfilename
End Function
Any suggestions?
Best regards
Karsten Balle
See [this|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/13270] [original link is broken] [original link is broken] [original link is broken]; blog for troubleshooting tips re. .NET datasets and Crystal Reports.
Ludek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.