<%@ Register Assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TagPrefix="CR" %> <CR:CrystalReportViewer PrintMode="ActiveX" HasCrystalLogo="False" ID="CrystalReportViewer1" runat="server" AutoDataBind="true" />
Dim Report As ReportDocument Report = New ReportDocument Report.Load(Hosting.HostingEnvironment.MapPath("~/App_reports/report1.rpt")) Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo Dim myTables As Tables = Report.Database.Tables Dim myTableLogonInfo As New TableLogOnInfo With myConnectionInfo .ServerName = Helpers.GetConfigSetting("CrystalDSN") .DatabaseName = Helpers.GetConfigSetting("DefaultDatabaseName") .UserID = Helpers.GetConfigSetting("DatabaseUser") .Password = Helpers.GetConfigSetting("DatabasePassword") .Type = ConnectionInfoType.SQL End With For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables myTableLogonInfo = myTable.LogOnInfo myTable.LogOnInfo.ConnectionInfo.AllowCustomConnection = True myTableLogonInfo.ConnectionInfo = myConnectionInfo myTable.ApplyLogOnInfo(myTableLogonInfo) myTable.Location = Helpers.GetConfigSetting("DefaultDatabaseName") & ".dbo." & myTable.Location Next CrystalReportViewer1.ReportSource = Report
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE