| | |
To pass login information in asp.net c# crystal report
Please support our ASP.NET advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Jun 2009
Posts: 452
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
Views: 608 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 3.5 ajax appliances application asp asp.net beginner box browser businesslogiclayer button c# cac chat checkbox child class compatible complex content contenttype control countryselector courier database datagrid datagridview datalist deployment development dgv dialog dropdown dropdownmenu dynamic dynamically edit embeddingactivexcontrol feedback fileuploader fill findcontrol flash flv folder form gridview gudi identity iis image javascript languages list maps menu mobile mssql nameisnotdeclared novell opera order problem profile ratings redirect refer registration relationaldatabases response.redirect rows search security select serializesmo.table sessionvariables silverlight smoobjects software sql ssl tracking treeview typeof validatedate validation vb vb.net vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment wizard xsl





