I am programming my web page to accept a range of crystal reports and display them.
My problem is it simply is not working and i have been wrecking my brain about it for the past two days.
Below is a copy of my cope and error displayed, it is also worth knowing that that the login details are correct not matter what the error page says! lol
Before i let you at i believe the problem may be with the way i set up my login, is there some code i have to enter between the .reportsource and the .bind?
Thanks in advance
My problem is it simply is not working and i have been wrecking my brain about it for the past two days.
Below is a copy of my cope and error displayed, it is also worth knowing that that the login details are correct not matter what the error page says! lol
Before i let you at i believe the problem may be with the way i set up my login, is there some code i have to enter between the .reportsource and the .bind?
Thanks in advance
Code:
Dim strGenericAddress As String = ConfigurationSettings.AppSettings("ReportsLocation")
Report.Load(strGenericAddress & ddlDepartment.SelectedValue & "\" & ddlReport.SelectedValue, OpenReportMethod.OpenReportByTempCopy)
If Report.IsLoaded Then
Dim i As Integer
For i = 0 To (myParmNameList.Count - 1) Step 1
Report.SetParameterValue(CStr(myParmNameList.Item(i)), myParmValueList.Item(i))
Next
Dim strLoginDetails() As String = Split(ConfigurationSettings.AppSettings("CRLogin"), ",")
Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo
myConnectionInfo.ServerName = strLoginDetails(0)
myConnectionInfo.DatabaseName = strLoginDetails(1)
myConnectionInfo.UserID = strLoginDetails(2)
myConnectionInfo.Password = strLoginDetails(3)
SetDBLogonForReport(myConnectionInfo, Report)
crv.ReportSource = Report
crv.DataBind()
crv.Visible = True
Session("Report") = Report
End If
Code:
Private Sub SetDBLogonForReport(ByVal myConnectionInfo As ConnectionInfo, ByRef myReport As ReportDocument)
Dim myTables As Tables = myReport.Database.Tables
For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables
Dim myTableLogonInfo As TableLogOnInfo = myTable.LogOnInfo
myTableLogonInfo.ConnectionInfo = myConnectionInfo
myTable.ApplyLogOnInfo(myTableLogonInfo)
Next
End Sub
Code:
Server Error in /DGSFactoryV2 Application.
--------------------------------------------------------------------------------
Error in File C:\Test Environments\DGS Reports\Factory\mp_whsCycleCountFound.rpt: Unable to connect: incorrect log on parameters.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnException: Error in File C:\Test Environments\DGS Reports\Factory\mp_whsCycleCountFound.rpt: Unable to connect: incorrect log on parameters.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[LogOnException: Error in File C:\Test Environments\DGS Reports\Factory\mp_whsCycleCountFound.rpt:
Unable to connect: incorrect log on parameters.]
.L(String , EngineExceptionErrorID )
.G(Int16
, Int32 )
.F(Int16 )
CrystalDecisions.CrystalReports.Engine.FormatEngine.GetPage(PageRequestContext reqContext)
CrystalDecisions.ReportSource.LocalReportSourceBase.GetPage(PageRequestContext pageReqContext)
CrystalDecisions.Web.ReportAgent.{(Boolean C)
CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e)
System.Web.UI.Control.PreRenderRecursiveInternal()
System.Web.UI.Control.PreRenderRecursiveInternal()
System.Web.UI.Control.PreRenderRecursiveInternal()
System.Web.UI.Page.ProcessRequestMain()
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032