473,405 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

CrystalReportViewer - out of ideas

tg
I've been trying for several days to get a Crystal report to display in a
Windows form in VS 2003. I'm not new to .NET, nor to Crystal, but I've
never tried to display a report until now. I'm trying to connect to an
Oracle 8.1.7 database. I can connect to the database no matter how I try
(within the report, using TOAD, using SQL*Plus), but when I try to view the
report, I am presented with a logon dialog box that always fails with a
Logon Failed error. Someone in this ng was kind enough to give me this code
as a pattern, a few days ago. I get the same result, the logon dialog that
doesn't let me log on. This is getting frustrating, and I gotta get this
figured out. What am I missing? Which way would you connect to the Oracle
server? I've tried using a DSN (connection succeeds there but not in the
CrystalReportViewer). What driver would you use? There are a few to choose
from, none of them work for me. I'm just out of ideas.

Fresh ideas welcome ;)

Here's the code that I received earlier, but I don't think it's the problem:

Dim oRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent
oRpt.Load("c:\reportname.rpt")

Dim logonInfo As New CrystalDecisions.Shared.TableLogOnInfo()
Dim table As Table

' Set the logon information for each table.
For Each table In oRpt.Database.Tables
' Get the TableLogOnInfo object.
logonInfo = table.LogOnInfo
' Set the server or ODBC data source name, database name,
' user ID, and password.
logonInfo.ConnectionInfo.ServerName = "servername"
logonInfo.ConnectionInfo.DatabaseName = "databasename"
logonInfo.ConnectionInfo.UserID = "userid"
logonInfo.ConnectionInfo.Password = "password"
' Apply the connection information to the table.
table.ApplyLogOnInfo(logonInfo)
Next table

Nov 21 '05 #1
6 1327
Hi tg

Not an Oracle person...but can you fill a DataSet from Oracle with ADO.NET?
If you can, then you could use the DataSet as your report data source...

HTH

Nigel Armstrong

"tg" wrote:
I've been trying for several days to get a Crystal report to display in a
Windows form in VS 2003. I'm not new to .NET, nor to Crystal, but I've
never tried to display a report until now. I'm trying to connect to an
Oracle 8.1.7 database. I can connect to the database no matter how I try
(within the report, using TOAD, using SQL*Plus), but when I try to view the
report, I am presented with a logon dialog box that always fails with a
Logon Failed error. Someone in this ng was kind enough to give me this code
as a pattern, a few days ago. I get the same result, the logon dialog that
doesn't let me log on. This is getting frustrating, and I gotta get this
figured out. What am I missing? Which way would you connect to the Oracle
server? I've tried using a DSN (connection succeeds there but not in the
CrystalReportViewer). What driver would you use? There are a few to choose
from, none of them work for me. I'm just out of ideas.

Fresh ideas welcome ;)

Here's the code that I received earlier, but I don't think it's the problem:

Dim oRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent
oRpt.Load("c:\reportname.rpt")

Dim logonInfo As New CrystalDecisions.Shared.TableLogOnInfo()
Dim table As Table

' Set the logon information for each table.
For Each table In oRpt.Database.Tables
' Get the TableLogOnInfo object.
logonInfo = table.LogOnInfo
' Set the server or ODBC data source name, database name,
' user ID, and password.
logonInfo.ConnectionInfo.ServerName = "servername"
logonInfo.ConnectionInfo.DatabaseName = "databasename"
logonInfo.ConnectionInfo.UserID = "userid"
logonInfo.ConnectionInfo.Password = "password"
' Apply the connection information to the table.
table.ApplyLogOnInfo(logonInfo)
Next table


Nov 21 '05 #2
tg
Hello -

I tried that. It would probably work, but I don't know what property on the
Report to use. I had the same idea as you, that perhaps I could assign the
viewer's ReportSource property to the DataSet, but I get the "blue squiglly"
;) syntax error when I try to do that. I'll keep trying, but I believe you
and I are on the right track. Binding the report is certainly not as
straightforward as I would have hoped.

thanks
tg
"Nigel Armstrong" <Ni************@discussions.microsoft.com> wrote in
message news:27**********************************@microsof t.com...
Hi tg

Not an Oracle person...but can you fill a DataSet from Oracle with
ADO.NET?
If you can, then you could use the DataSet as your report data source...

HTH

Nigel Armstrong

"tg" wrote:
I've been trying for several days to get a Crystal report to display in a
Windows form in VS 2003. I'm not new to .NET, nor to Crystal, but I've
never tried to display a report until now. I'm trying to connect to an
Oracle 8.1.7 database. I can connect to the database no matter how I try
(within the report, using TOAD, using SQL*Plus), but when I try to view
the
report, I am presented with a logon dialog box that always fails with a
Logon Failed error. Someone in this ng was kind enough to give me this
code
as a pattern, a few days ago. I get the same result, the logon dialog
that
doesn't let me log on. This is getting frustrating, and I gotta get this
figured out. What am I missing? Which way would you connect to the
Oracle
server? I've tried using a DSN (connection succeeds there but not in the
CrystalReportViewer). What driver would you use? There are a few to
choose
from, none of them work for me. I'm just out of ideas.

Fresh ideas welcome ;)

Here's the code that I received earlier, but I don't think it's the
problem:

Dim oRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent
> oRpt.Load("c:\reportname.rpt")
>
> Dim logonInfo As New CrystalDecisions.Shared.TableLogOnInfo()
> Dim table As Table
>
> ' Set the logon information for each table.
> For Each table In oRpt.Database.Tables
> ' Get the TableLogOnInfo object.
> logonInfo = table.LogOnInfo
> ' Set the server or ODBC data source name, database name,
> ' user ID, and password.
> logonInfo.ConnectionInfo.ServerName = "servername"
> logonInfo.ConnectionInfo.DatabaseName = "databasename"
> logonInfo.ConnectionInfo.UserID = "userid"
> logonInfo.ConnectionInfo.Password = "password"
> ' Apply the connection information to the table.
> table.ApplyLogOnInfo(logonInfo)
> Next table


Nov 21 '05 #3
Hi tg

When you are using a DataSet, this is the sort of code you need:

Me.SqlDataAdapter1.Fill(Me.DataSet11)
Me.crystalReport11.SetDataSource(Me.DataSet11)
Me.CrystalReportViewer1.ReportSource = Me.crystalReport11

I've just used the defaults for a strongly typed DataSet and ReportDocument
in the design time environment. This works for me with no prompt...You'll
have to change the SqlDataAdaptor for the OracleClient one!

HTH

Nigel Armstrong

"tg" wrote:
Hello -

I tried that. It would probably work, but I don't know what property on the
Report to use. I had the same idea as you, that perhaps I could assign the
viewer's ReportSource property to the DataSet, but I get the "blue squiglly"
;) syntax error when I try to do that. I'll keep trying, but I believe you
and I are on the right track. Binding the report is certainly not as
straightforward as I would have hoped.

thanks
tg
"Nigel Armstrong" <Ni************@discussions.microsoft.com> wrote in
message news:27**********************************@microsof t.com...
Hi tg

Not an Oracle person...but can you fill a DataSet from Oracle with
ADO.NET?
If you can, then you could use the DataSet as your report data source...

HTH

Nigel Armstrong

"tg" wrote:
I've been trying for several days to get a Crystal report to display in a
Windows form in VS 2003. I'm not new to .NET, nor to Crystal, but I've
never tried to display a report until now. I'm trying to connect to an
Oracle 8.1.7 database. I can connect to the database no matter how I try
(within the report, using TOAD, using SQL*Plus), but when I try to view
the
report, I am presented with a logon dialog box that always fails with a
Logon Failed error. Someone in this ng was kind enough to give me this
code
as a pattern, a few days ago. I get the same result, the logon dialog
that
doesn't let me log on. This is getting frustrating, and I gotta get this
figured out. What am I missing? Which way would you connect to the
Oracle
server? I've tried using a DSN (connection succeeds there but not in the
CrystalReportViewer). What driver would you use? There are a few to
choose
from, none of them work for me. I'm just out of ideas.

Fresh ideas welcome ;)

Here's the code that I received earlier, but I don't think it's the
problem:

Dim oRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent
> oRpt.Load("c:\reportname.rpt")
>
> Dim logonInfo As New CrystalDecisions.Shared.TableLogOnInfo()
> Dim table As Table
>
> ' Set the logon information for each table.
> For Each table In oRpt.Database.Tables
> ' Get the TableLogOnInfo object.
> logonInfo = table.LogOnInfo
> ' Set the server or ODBC data source name, database name,
> ' user ID, and password.
> logonInfo.ConnectionInfo.ServerName = "servername"
> logonInfo.ConnectionInfo.DatabaseName = "databasename"
> logonInfo.ConnectionInfo.UserID = "userid"
> logonInfo.ConnectionInfo.Password = "password"
> ' Apply the connection information to the table.
> table.ApplyLogOnInfo(logonInfo)
> Next table


Nov 21 '05 #4
tg
Thanks

I figured it out just a few minutes ago.

I still get a logon dialog, but it seems to be coming from something in the
report. I'm gettin' there!! ;)

I appreciate the help.
tg

"Nigel Armstrong" <Ni************@discussions.microsoft.com> wrote in
message news:25**********************************@microsof t.com...
Hi tg

When you are using a DataSet, this is the sort of code you need:

Me.SqlDataAdapter1.Fill(Me.DataSet11)
Me.crystalReport11.SetDataSource(Me.DataSet11)
Me.CrystalReportViewer1.ReportSource = Me.crystalReport11

I've just used the defaults for a strongly typed DataSet and
ReportDocument
in the design time environment. This works for me with no prompt...You'll
have to change the SqlDataAdaptor for the OracleClient one!

HTH

Nigel Armstrong

"tg" wrote:
Hello -

I tried that. It would probably work, but I don't know what property on
the
Report to use. I had the same idea as you, that perhaps I could assign
the
viewer's ReportSource property to the DataSet, but I get the "blue
squiglly"
;) syntax error when I try to do that. I'll keep trying, but I believe
you
and I are on the right track. Binding the report is certainly not as
straightforward as I would have hoped.

thanks
tg
"Nigel Armstrong" <Ni************@discussions.microsoft.com> wrote in
message news:27**********************************@microsof t.com...
> Hi tg
>
> Not an Oracle person...but can you fill a DataSet from Oracle with
> ADO.NET?
> If you can, then you could use the DataSet as your report data
> source...
>
> HTH
>
> Nigel Armstrong
>
> "tg" wrote:
>
>> I've been trying for several days to get a Crystal report to display
>> in a
>> Windows form in VS 2003. I'm not new to .NET, nor to Crystal, but
>> I've
>> never tried to display a report until now. I'm trying to connect to
>> an
>> Oracle 8.1.7 database. I can connect to the database no matter how I
>> try
>> (within the report, using TOAD, using SQL*Plus), but when I try to
>> view
>> the
>> report, I am presented with a logon dialog box that always fails with
>> a
>> Logon Failed error. Someone in this ng was kind enough to give me
>> this
>> code
>> as a pattern, a few days ago. I get the same result, the logon dialog
>> that
>> doesn't let me log on. This is getting frustrating, and I gotta get
>> this
>> figured out. What am I missing? Which way would you connect to the
>> Oracle
>> server? I've tried using a DSN (connection succeeds there but not in
>> the
>> CrystalReportViewer). What driver would you use? There are a few to
>> choose
>> from, none of them work for me. I'm just out of ideas.
>>
>> Fresh ideas welcome ;)
>>
>> Here's the code that I received earlier, but I don't think it's the
>> problem:
>>
>> Dim oRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent
>> > oRpt.Load("c:\reportname.rpt")
>> >
>> > Dim logonInfo As New CrystalDecisions.Shared.TableLogOnInfo()
>> > Dim table As Table
>> >
>> > ' Set the logon information for each table.
>> > For Each table In oRpt.Database.Tables
>> > ' Get the TableLogOnInfo object.
>> > logonInfo = table.LogOnInfo
>> > ' Set the server or ODBC data source name, database name,
>> > ' user ID, and password.
>> > logonInfo.ConnectionInfo.ServerName = "servername"
>> > logonInfo.ConnectionInfo.DatabaseName = "databasename"
>> > logonInfo.ConnectionInfo.UserID = "userid"
>> > logonInfo.ConnectionInfo.Password = "password"
>> > ' Apply the connection information to the table.
>> > table.ApplyLogOnInfo(logonInfo)
>> > Next table
>>
>>
>>


Nov 21 '05 #5

"tg" <tg*******@pop-server.houston.rr.com> schrieb im Newsbeitrag
news:h0*******************@fe1.texas.rr.com...
I've been trying for several days to get a Crystal report to display in a
Windows form in VS 2003. I'm not new to .NET, nor to Crystal, but I've
never tried to display a report until now. I'm trying to connect to an
Oracle 8.1.7 database. I can connect to the database no matter how I try
(within the report, using TOAD, using SQL*Plus), but when I try to view the report, I am presented with a logon dialog box that always fails with a
Logon Failed error. Someone in this ng was kind enough to give me this code as a pattern, a few days ago. I get the same result, the logon dialog that doesn't let me log on. This is getting frustrating, and I gotta get this
figured out. What am I missing? Which way would you connect to the Oracle server? I've tried using a DSN (connection succeeds there but not in the
CrystalReportViewer). What driver would you use? There are a few to choose from, none of them work for me. I'm just out of ideas.

Fresh ideas welcome ;)

Here's the code that I received earlier, but I don't think it's the problem:
Dim oRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent
oRpt.Load("c:\reportname.rpt")

Dim logonInfo As New CrystalDecisions.Shared.TableLogOnInfo()
Dim table As Table

' Set the logon information for each table.
For Each table In oRpt.Database.Tables
' Get the TableLogOnInfo object.
logonInfo = table.LogOnInfo
' Set the server or ODBC data source name, database name,
' user ID, and password.
logonInfo.ConnectionInfo.ServerName = "servername"
logonInfo.ConnectionInfo.DatabaseName = "databasename"
logonInfo.ConnectionInfo.UserID = "userid"
logonInfo.ConnectionInfo.Password = "password"
' Apply the connection information to the table.
table.ApplyLogOnInfo(logonInfo)
Next table



Hi tg,

use a dataset:
http://support.businessobjects.com/c...tasets.pdf.asp

Greeting

Thomas
Nov 21 '05 #6
tg
I think that is going to be the answer. I was using a dataset, but the
report was linked directly to the database. That's the reason for the extra
login dialog.

Many thanks for the help from members of this ng.

tom

"Thomas Wenning" <no*******************@gmx.de> wrote in message
news:eV**************@TK2MSFTNGP09.phx.gbl...

"tg" <tg*******@pop-server.houston.rr.com> schrieb im Newsbeitrag
news:h0*******************@fe1.texas.rr.com...
I've been trying for several days to get a Crystal report to display in a
Windows form in VS 2003. I'm not new to .NET, nor to Crystal, but I've
never tried to display a report until now. I'm trying to connect to an
Oracle 8.1.7 database. I can connect to the database no matter how I try
(within the report, using TOAD, using SQL*Plus), but when I try to view

the
report, I am presented with a logon dialog box that always fails with a
Logon Failed error. Someone in this ng was kind enough to give me this

code
as a pattern, a few days ago. I get the same result, the logon dialog

that
doesn't let me log on. This is getting frustrating, and I gotta get this
figured out. What am I missing? Which way would you connect to the

Oracle
server? I've tried using a DSN (connection succeeds there but not in the
CrystalReportViewer). What driver would you use? There are a few to

choose
from, none of them work for me. I'm just out of ideas.

Fresh ideas welcome ;)

Here's the code that I received earlier, but I don't think it's the

problem:

Dim oRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent
> oRpt.Load("c:\reportname.rpt")
>
> Dim logonInfo As New CrystalDecisions.Shared.TableLogOnInfo()
> Dim table As Table
>
> ' Set the logon information for each table.
> For Each table In oRpt.Database.Tables
> ' Get the TableLogOnInfo object.
> logonInfo = table.LogOnInfo
> ' Set the server or ODBC data source name, database name,
> ' user ID, and password.
> logonInfo.ConnectionInfo.ServerName = "servername"
> logonInfo.ConnectionInfo.DatabaseName = "databasename"
> logonInfo.ConnectionInfo.UserID = "userid"
> logonInfo.ConnectionInfo.Password = "password"
> ' Apply the connection information to the table.
> table.ApplyLogOnInfo(logonInfo)
> Next table



Hi tg,

use a dataset:
http://support.businessobjects.com/c...tasets.pdf.asp

Greeting

Thomas

Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jordan | last post by:
Hi, I've declared the statement below in my form and somehow crystalReportViewer1 is always null. Is there anything wrong with the statement? private...
0
by: AH | last post by:
I am writing an application in C++. The application is to display a report. Unlike a similar project in C# I can't find a way to add a CrystalReportViewer control to my view form. It is simply...
0
by: Chuck P | last post by:
We have an web application developed that uses the crystalreportviewer component to display reports. Sometimes when switching between pages of the report we are randomly getting the following...
3
by: Reza Nabi | last post by:
Hello I created a very simple page just to load a crystal report which was working just great Code started throwing the following exception, after I installed crystal report 9 advanced edition ...
0
by: Marc Callec | last post by:
I'm trying to create an instance of the CrystalReportViewer control within my class in an attempt to return the rendered HTML back to the consumer of the class. Because I haven't added the...
1
by: Bob | last post by:
I'm asking here because I've posted this question in the crystal newsgroup, waited two weeks, and got zero response. I would be very appreciative if someone could shed some light on this problem...
0
by: Oleg | last post by:
I'm using CrystalReportViewer to display a report. After report is displayed you see only one page. To see another page you need to click and 'arrow'. What happens is the report is completely...
3
by: roopsd | last post by:
I am using VS.NET 2003 with crystal reports XI release 2. I get a runtime error at the following line: oRptForm.crystalReportViewer.ReportSource = oReport An unhandled exception of type...
0
by: roopsd | last post by:
Hi Thank you for yuour help. I am using VS.NET 2003 with Crystal XI r2. I am getting NullReferenceException at the following line in my code. oRptForm.crystalReportViewer.ReportSource =...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.