I'm modifying an ASP.Net Application to use a new version of crystal reports (13) in Visual Studio 2012. The reports work when I run it locally and they work on an internal test server but they dont' work on our external facing production server where this application has to live.
I get a database login prompt... but I shouldn't because I'm using the "push" method by assigning a datasource to the report. I've combed over every field and I can't imagine what would be mismatched between the dataset and the database and the crystal report. We have also made sure the new version of crystal reports is on the failing server.
Here's the code that loads up the report:
Dim dsWaitsrc As New dsWaitlistDetail
Using dbConn As New System.Data.SqlClient.SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("CS_eRegdbConnectionString").ConnectionString)
Dim cmd As New System.Data.SqlClient.SqlCommand("SELECT CL_Index.CL_ID, CL_EMail, CL_Contact, CL_Surname, CL_FirstName, CL_Gender, CL_BirthDate, CL_Income, CL_Reason, CL_Language, CL_Interpretor, CL_WorkingAt, CL_SchoolAt, CL_Marital, CL_Surname2, CL_FirstName2, CL_Gender2, CL_BirthDate2, CL_Income2, CL_Reason2, CL_WorkingAt2, CL_SchoolAt2, CL_Date_Submitted, CL_Index.Updated, CL_Prokids, CL_Resource, CL_ChildCare, CL_Phone, CL_Type, CL_Extension, CL_Phone2, CL_Type2, CL_Extension2, CL_Phone3, CL_Type3, CL_Extension3, (CASE WHEN (CL_Index.CL_Income = 'Ontario Works ( Social Assistance )') THEN '0' + CONVERT(VARCHAR, CL_Index.CL_Date_Submitted) + STR(CL_Index.CL_ID) ELSE '1' + CONVERT(VARCHAR, CL_Index.CL_Date_Submitted) + STR(CL_Index.CL_ID) END) AS rpt_sort, Comments, CL_Camp, PreferredTime, Camp_Type, CL_Behavior, Preference, OtherSource, CH_Surname, CH_FirstName, CH_Gender, CH_BirthDate, CH_Service, ADD_Address, ADD_Unit, ADD_Postal, CL_City FROM CL_Index LEFT OUTER JOIN CL_Addresses ON CL_Index.CL_ID = CL_Addresses.Index_CL_ID LEFT OUTER JOIN CL_City ON CL_Addresses.City_CL_ID = CL_City.CL_ID LEFT OUTER JOIN CL_Children ON CL_Index.CL_ID = CL_Children.Index_CL_ID WHERE CL_Index.CL_ID = " & Request("CL_ID"), dbConn)
cmd.Connection.Open()
Using rs As System.Data.SqlClient.SqlDataReader = cmd.ExecuteReader
While rs.Read
dsWaitsrc.Tables("CL_Index").Rows.Add(DBString(rs!CL_Contact), DBString(rs!CL_Surname), DBString(rs!CL_FirstName), DBString(rs!CL_Gender), DBDate(rs!CL_BirthDate), DBString(rs!CL_Income), DBString(rs!CL_Reason), DBString(rs!CL_Language), CBool(rs!CL_Interpretor), DBString(rs!CL_WorkingAt), DBString(rs!CL_SchoolAt), DBString(rs!CL_Marital), DBString(rs!CL_Surname2), DBString(rs!CL_FirstName2), DBString(rs!CL_Gender2), DBDate(rs!CL_Birthdate2), DBString(rs!CL_Income2), DBString(rs!CL_Reason2), DBString(rs!CL_WorkingAt2), DBString(rs!CL_SchoolAt2), DBDate(rs!CL_Date_Submitted), CBool(rs!Updated), CBool(rs!CL_ProKids), CBool(rs!CL_Resource), CBool(rs!CL_ChildCare), DBString(rs!CL_Phone), DBString(rs!CL_Type), DBString(rs!CL_Extension), DBString(rs!CL_Phone2), DBString(rs!CL_Type2), DBString(rs!CL_Extension2), DBString(rs!CL_Phone3), DBString(rs!CL_Type3), DBString(rs!CL_Extension3), DBString(rs!CH_Surname), DBString(rs!CH_FirstName), DBString(rs!CH_Gender), DBDate(rs!CH_BirthDate), DBString(rs!ADD_Address), DBString(rs!ADD_Unit), DBString(rs!ADD_Postal), DBString(rs!CL_City), CBool(rs!CH_Service), DBString(rs!rpt_sort), DBInt(rs!CL_ID), DBString(rs!CL_EMail), DBString(rs!Comments), CBool(rs!CL_Camp), DBString(rs!PreferredTime), DBString(rs!Camp_Type), CBool(rs!CL_Behavior), DBString(rs!Preference), DBString(rs!OtherSource))
End While
End Using
End Using
RPT.setdatasource(dsWaitsrc)
Me.WaitlistReport.ReportSource = RPT
Me.WaitlistReport.Visible = True
I appreciate any help you can provide to get rid of this database prompt.