cancel
Showing results for 
Search instead for 
Did you mean: 

No valid report source is available.

Former Member
0 Kudos

I am using Crystal Reports for Visual Studio 2010.

I want to prompt for some input from my .aspx page and allow the user to click a botton to run the report.

The following code works from the Page_Load subroutine but when I try to run the code from the click event of the button. I answer my Crystal parameter prompt and the report page displays the message:

"No valid report source is available."

Here is the visual basic code:

Protected Sub PreviewLabels_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles PreviewLabels.Click

If (Session("report") Is Nothing) Then

Dim rd As New ReportDocument

rd.Load(Server.MapPath("ExpirationNoticesMailingLabels.rpt"))

Dim boConnectionInfo As CrystalDecisions.Shared.IConnectionInfo

For Each boConnectionInfo In rd.DataSourceConnections

boConnectionInfo.SetLogon("Username", "Password")

Next

Session.Add("report", rd)

End If

CrystalReportViewer1.ReportSource = Session("report")

End Sub

Accepted Solutions (1)

Accepted Solutions (1)

former_member188030
Active Contributor
0 Kudos

Hi Mark,

Looks like the application is not able to access the rpt file.

things you could try

- Apply [CR for VS 2010 SP2.|http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_2.exe]

- Check if the path of the report is correct.-

- Check if the application is able to access the report file, check the permissions for the app.

- Try removing the sessions, and see if the app can access the report.

Hope this helps,

Bhushan.

Edited by: Bhushan Hyalij on Jan 9, 2012 5:51 PM

Answers (0)