Thursday, March 29, 2012

Failed to open a rowset (Crystal Reports)

I am using Visual Studio .NET 2003 and the version of Crystal that comes with it. I have a problem that when a report is displayed and it doesn't have any data I receive the following error message "Failed to open a rowset" and only a blank screen is shown. I need at least the Header labels to show. How can I make it show at least the header labels.Ok, I figured it out. The stored procedure that runs the report gathers data into a temp table. If the there isn't any data it made the report error out. I rewrote the SP to not use a temp table and all is working well.|||hey,
i am having the same problem with Crystal reports.
i have a few Crystal Reports that were being used as stand-alone reports.
Now i would like to develop an application (WITHOUT including the reports into the application) that shows all the reports that are in a specific directory (done!), list all the report names in a listview (done), and when the user clicks on a reportname.... i want the application to open the report.

Currently i have the following code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
'Dim report As ReportDocument = New ReportDocument
Dim ReportName As String
ReportName = Me.ListView1.SelectedItems(0).Text
report.Load(ConfigurationSettings.AppSettings("DirPath") & ReportName & ".rpt")
report.SetDatabaseLogon("testLogin", "testPassword")

Dim frm As New frmViewer
frm.Show()
End Sub

I rewrote the SP to not use a temp table and all is working well
how exactly was this done?

Thanks..... i hope you solve my problem!

No comments:

Post a Comment