| | |
To pass login information in asp.net c# crystal report
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jun 2009
Posts: 446
Reputation:
Solved Threads: 82
0
#2 Nov 5th, 2009
Try this.
Reference: C# Crystal Reports Dynamic Logon parameters
Also refer this link.
How to pass Database logon info to a Crystal Report at runtime in VB .NET or in C#
ASP.NET Syntax (Toggle Plain Text)
ReportDocument cryRpt = new ReportDocument(); TableLogOnInfos crtableLogoninfos = new TableLogOnInfos(); TableLogOnInfo crtableLogoninfo = new TableLogOnInfo(); ConnectionInfo crConnectionInfo = new ConnectionInfo(); Tables CrTables ; cryRpt.Load("PUT CRYSTAL REPORT PATH HERE\CrystalReport1.rpt"); crConnectionInfo.ServerName = "YOUR SERVER NAME"; crConnectionInfo.DatabaseName = "YOUR DATABASE NAME"; crConnectionInfo.UserID = "YOUR DATABASE USERNAME"; crConnectionInfo.Password = "YOUR DATABASE PASSWORD"; CrTables = cryRpt.Database.Tables ; foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables) { crtableLogoninfo = CrTable.LogOnInfo; crtableLogoninfo.ConnectionInfo = crConnectionInfo; CrTable.ApplyLogOnInfo(crtableLogoninfo); } crystalReportViewer1.ReportSource = cryRpt; crystalReportViewer1.Refresh();
Reference: C# Crystal Reports Dynamic Logon parameters
Also refer this link.
How to pass Database logon info to a Crystal Report at runtime in VB .NET or in C#
![]() |
Similar Threads
- Updated : Simple ASP.Net Login Page (ASP.NET)
- Login page in asp.net using oracle as back end (ASP.NET)
- Asp.net and crystal report (ASP.NET)
- Login Page in asp.net using C# using MS access database (C#)
- vb.net crystal report (VB.NET)
- draft print in asp.net 2.0 (ASP.NET)
- How to create a login page using ASp.net 2.0 c# (ASP.NET)
- ASP.NET Crystal Report ODBC MySQL (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: Help with insert statement
- Next Thread: Web form
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 3.5 ajax alltypeofvideos anathor appliances application asp asp.net beginner box browser businesslogiclayer button c# cac checkbox class commonfunctions control countryselector dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol feedback fileuploader fill findcontrol flash folder form gridview gudi iis image javascript list listbox login maps microsoft mobile mouse mssql nameisnotdeclared news novell numerical opera panelmasterpagebuttoncontrols parent problem project radio redirect registration relationaldatabases reportemail richtextbox schoolproject search security select sessionvariables silverlight smoobjects software sql sql-server sqlserver2005 ssl tracking treeview validatedate validation vb.net videos vista visualstudio vs2008 web webapplications webdevelopment webprogramming webservice wizard xsl





