By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,241 Members | 733 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,241 IT Pros & Developers. It's quick & easy.

CrystalReportViewer - out of ideas

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a

"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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.