Report requires further information - CR (logon...;))

manared

Well-known member
Joined
Jun 1, 2006
Messages
84
Programming Experience
1-3
I created a crystal report and added it to my VS2008 web application. I thought I did it the same as all the other reports I've done (this is actually only my 3rd crystal report, so i'm a beginner!), but I keep getting this screen asking for more information. It asks for Server, Database, and User names, and a password, a checkbox to Use Integrated Security and a Log On button. Here's the code I used for the web app report page:

VB.NET:
Partial Class PrintER

Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

lblerid.Text = Session("erid")

lblname.Text = Session("name")

BuildReport()

End Sub

Private Rep As New CrystalDecisions.CrystalReports.Engine.ReportDocument


Private Sub BuildReport()

Dim dt As Data.DataTable

Dim DBObj As New JobMastModel.DBClasses.DBTools

 

'create datatable, then load into report viewer

Dim strSQL As String

strSQL = "SELECT * FROM tblERmain WHERE er_id = '" & lblerid.Text & "'"

 

dt = DBObj.CreateDT(strSQL, JobMastModel.DBClasses.DBTools.DB.DW)

 

Rep.Load(Request.PhysicalApplicationPath & "\Reports\ER.rpt")

 

Rep.SetDataSource(dt)

crViewER.ReportSource = Rep

crViewER.DataBind()

 

End Sub

Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload

Rep.Close()

Rep.Dispose()

End Sub

End Class

Does anyone know why I get a log on page instead of my report? Thank you very much!!!
 
Back
Top