Error loading WebForm.aspx
-
I have an ASP.NET applications (using VB.Net code) having 2 webforms and it loads couple of Crystal Reports each time depending upon selections. my execution path is as follows :
http://localhost/webApps/PIN/WebForm2.aspx
(it loads this page correctly) "WebForm2.aspx" is having some selection criterias for the report to be loaded. But when this page loads I get an CrystalReportViewer message on top left corner of the page which is as follows:CrystalReportViewer - CrystalReportViewer1 Use ReportSource or DataBindings property to specify a report source.
Also, in "WebForm1.aspx", I've got the following - OdbcSelectCommand, OdbcDataAdapter, OdbcConnection. And when I click on the "Command Text" property of "OdbcSelectCommand" which is infact an SQL query, I get this error messsage too : " [S1000] [IBM] [Client Access Express ODBC Driver (32-bit)] Syntax error in Connection String"
This is the connection string that I'm using :Me.OdbcConnection1.ConnectionString = "DSN=as400;UID=pcain;PWD=marugo"
Please see the code below to see how Crystal Report is loaded :
Protected WithEvents active_referral1 As Crystal_dataset.active_referral
Protected WithEvents As400ds1 As crystal_dataset.as400dsMe.OdbcSelectCommand1.Connection = Me.OdbcConnection1
Me.OdbcConnection1.ConnectionString = "DSN=as400;UID=pcain;PWD=marugo"OdbcDataAdapter1.Fill(As400ds1)
If Report_Type = 3 Then
active_referral1.SetDataSource(As400ds1)
active_referral1.DataDefinition.FormulaFields("unboundstring3").Text = "'" &; Fac_Str &; "'"
active_referral1.DataDefinition.FormulaFields("unboundstring4").Text = "'" &; Race_Str &; "'"
active_referral1.DataDefinition.FormulaFields("unboundstring5").Text = "'" &; Rel_Str &; "'"
active_referral1.DataDefinition.FormulaFields("unboundstring6").Text = "'" &; Sex_Str &; "'"
active_referral1.DataDefinition.FormulaFields("unboundstring7").Text = "'" &; Ref_Str &; "'"
active_referral1.DataDefinition.FormulaFields("unboundstring8").Text = "'" &; Sub_Str &; "'"
active_referral1.DataDefinition.FormulaFields("unboundstring9").Text = "'" &; Sub2_Str &; "'"If View_List = 1 Then
CrystalReportViewer1.ReportSource = active_referral1
ElseIf View_List = 2 Then
MyExportOptions.ExportFormatType = CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat
MyExportRequestContext.ExportInfo = MyExportOptions
MyStream = active_referral1.FormatEngine.Expo