| | |
ASP.NET Crystal Report ODBC MySQL
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
I am trying to display a Crystal Report developed using MySQL database and ASP.NET 2.0 (VS.NET 2005), and for some reason when I pass the database login information to the report it does not accept them (still shows a db login screen). Here is the code:
I have one Crystal Report Viewer and one Crystal Report Source objects on the form. The Crystal Report Source is set to "Report1.rpt" and the Viewer's source is set to that as well. When I run it, I get a parameter field request followed by a server login information request.
The actual Report properties are:
Database DLL: crdb_odbc.dll
DSN: NameOfDSNSource
UseDSNProperties: False
UserID: databaseUserName
I have even tried this:
But so far no luck. Does anyone know what the problem is with it? Any help would be appreciated.
Thank You
ASP.NET Syntax (Toggle Plain Text)
Dim cnString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=servername;DATABASE=dbname;UID=user name;PASSWORD=password;OPTION=3" Dim cn As New OdbcConnection(cnString) cn.Open() Dim MyReport As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent MyReport.Load("C:\Inetpub\wwwroot\Report1.rpt") MyReport.SetDataSource(cnString) MyReport.SetDatabaseLogon("username", "password") MyReport.SetParameterValue("parameter1", "1001") CrystalReportViewer1.ReportSource = MyReport CrystalReportViewer1.DataBind() cn.Close()
I have one Crystal Report Viewer and one Crystal Report Source objects on the form. The Crystal Report Source is set to "Report1.rpt" and the Viewer's source is set to that as well. When I run it, I get a parameter field request followed by a server login information request.
The actual Report properties are:
Database DLL: crdb_odbc.dll
DSN: NameOfDSNSource
UseDSNProperties: False
UserID: databaseUserName
I have even tried this:
ASP.NET Syntax (Toggle Plain Text)
Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared Imports System.IO Imports MySql.Data.MySqlClient ' Class Name etc here ... Dim conn As New MySqlConnection conn = New MySqlConnection("Server=servername; Database=dbname; User ID=dbuser; Password=dbpass; charset=utf8;") conn.Open() Dim MyReport As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent MyReport.Load("C:\Inetpub\wwwroot\Report1.rpt") MyReport.SetDataSource("Server=servername; Database=dbname; User ID=dbuser; Password=dbpass; charset=utf8;") MyReport.SetParameterValue("parameter1", "1001") CrystalReportViewer1.ReportSource = MyReport CrystalReportViewer1.DataBind()
But so far no luck. Does anyone know what the problem is with it? Any help would be appreciated.
Thank You
•
•
Join Date: Mar 2007
Posts: 1
Reputation:
Solved Threads: 0
Have you tried just passing the database login for the crystal report?
Try this guide and see if it helps:
http://www.instantcrystal.net/instantguide.aspx
Try this guide and see if it helps:
http://www.instantcrystal.net/instantguide.aspx
•
•
•
•
Have you tried just passing the database login for the crystal report?
Try this guide and see if it helps:
http://www.instantcrystal.net/instantguide.aspx
![]() |
Similar Threads
- Updated : Simple ASP.Net Login Page (ASP.NET)
- Create Crystal Report using PHP, Mysql (PHP)
- ~~ ASP.NET (VB) Help Needed ~~~ 10q (ASP.NET)
- neeeeeeed help (ASP.NET)
- 3 month trial/unlimited domains - Reliable Windows ASP.NET & Linux (Web Hosting Deals)
Other Threads in the ASP.NET Forum
- Previous Thread: function in master page accesible from some content pages but not others
- Next Thread: Many-to-Many Relationships in O/R Mapping
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox click commonfunctions compatible confirmationcodegeneration content contenttype countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dropdownmenu edit expose flash flv formatdecimal forms formview gridview homeedition iframe iis javascript jquery list listbox login menu microsoft mono mouse mssql multistepregistration nameisnotdeclared news numerical objects order panelmasterpagebuttoncontrols problem radio ratings reportemail rotatepage save schoolproject search security serializesmo.table silverlight smartcard software sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice xml youareanotmemberofthedebuggerusers





