I developed an application using VB.NET and ODBC connection to SAGE/SWAN DB files, part of the application searches for .rpt files on the drive and shows the found reports as a list. When the user clicks on one of them the report should open (after asking for parameters!)
Before my application the reports were created using Crystal 7 and used to be viewed with Crystal Passage.
Problem 1: Why does the report always ask for a Username and Password? Is this setting coming from the report or the connection?
Problem 2: After inputting the admin password i keep getting the error: "Failed to open a rowset"
Thanks and should you need any more info let me know1 you need to supply those info from VB.Net
2 Make sure the report is pointing to the relevent database|||Well these reports were created as stand alone reports using Crystal 7 and/or 10 with an ODBC connection to a SAGE database (files). The reports were never opened through a VB application.... but were used on their own!
What I am trying to do is to call a report from a VB.NET application. And I have the following code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
If Me.ListView1.SelectedItems.Count <> 0 Then
Dim ReportName As String
ReportName = Me.ListView1.SelectedItems(0).Text
Dim frm As New frmViewer
frm.CrystalReportViewer1.ReportSource = ConfigurationSettings.AppSettings("DirPath") & ReportName & ".rpt"
frm.Show()
End If
End Sub
the red line gets the file path (C:\test\myReport.rpt) of the specified report.
The main thing I want in this application is that the user would not need to add any code for a new report..... he would just have to throw the report in a specified directory and select it from there.
Thanks
No comments:
Post a Comment