Crystal Report 10 Problem with MySQL
Crystal Report 10 Problem with MySQL
Crystal Report 10 Problem with MySQL
Crystal Report 10 Problem with MySQL
Crystal Report 10 Problem with MySQL
Crystal Report 10 Problem with MySQL Crystal Report 10 Problem with MySQL Crystal Report 10 Problem with MySQL Crystal Report 10 Problem with MySQL Crystal Report 10 Problem with MySQL Crystal Report 10 Problem with MySQL Crystal Report 10 Problem with MySQL Crystal Report 10 Problem with MySQL
Crystal Report 10 Problem with MySQL Crystal Report 10 Problem with MySQL
Crystal Report 10 Problem with MySQL
Go Back  Xtreme Visual Basic Talk > > > Crystal Report 10 Problem with MySQL


Reply
 
Thread Tools Display Modes
  #1  
Old 09-23-2006, 05:41 AM
digioz digioz is offline
Newcomer
 
Join Date: Aug 2005
Location: Chicago, IL
Posts: 2
Question Crystal Report 10 Problem with MySQL


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:

Code:
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:

Code:
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
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Crystal Report 10 Problem with MySQL
Crystal Report 10 Problem with MySQL
Crystal Report 10 Problem with MySQL Crystal Report 10 Problem with MySQL
Crystal Report 10 Problem with MySQL
Crystal Report 10 Problem with MySQL
Crystal Report 10 Problem with MySQL Crystal Report 10 Problem with MySQL Crystal Report 10 Problem with MySQL Crystal Report 10 Problem with MySQL Crystal Report 10 Problem with MySQL Crystal Report 10 Problem with MySQL Crystal Report 10 Problem with MySQL
Crystal Report 10 Problem with MySQL
Crystal Report 10 Problem with MySQL
 
Crystal Report 10 Problem with MySQL
Crystal Report 10 Problem with MySQL
 
-->