473,394 Members | 1,875 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,394 software developers and data experts.

CrystalDecisions.CrystalReports.Engine.LogOnExcept ion: Logon faile

i am having problems running a sub report in crystal reports using visual
studio 2003.

The first report fires one stored procedure in sql server 2005 and it has 2
levels of groupings then it runs a sub report using the group data.

I have tried the:
Report.SetDatabaseLogon(rptLogin, rptPassword, rptServer, rptDatabase);
It works on the main report, i have also put the code in the .cs file for
the sub report and it is producting the error.

I have tried new sub reports, imported subreports and all produce the error.

I also have tried looping thru the tables and it can only find the table on
the main report and not the sub report.
Feb 23 '06 #1
3 4481
try

report.OpenSubreport("subReportName");
HTH

Elton Wang
"MMitchell" wrote:
i am having problems running a sub report in crystal reports using visual
studio 2003.

The first report fires one stored procedure in sql server 2005 and it has 2
levels of groupings then it runs a sub report using the group data.

I have tried the:
Report.SetDatabaseLogon(rptLogin, rptPassword, rptServer, rptDatabase);
It works on the main report, i have also put the code in the .cs file for
the sub report and it is producting the error.

I have tried new sub reports, imported subreports and all produce the error.

I also have tried looping thru the tables and it can only find the table on
the main report and not the sub report.

Feb 24 '06 #2
Thanks.
That got me pointed in the right direction.

Here is the code that I had to use to solve this:

Report.SetDatabaseLogon(rptLogin, rptPassword, rptServer, rptDatabase);
ReportDocument subreport;
subreport = Report.OpenSubreport("rptStudentAveragesSub.rpt");
subreport.SetDatabaseLogon(rptLogin, rptPassword, rptServer, rptDatabase);

It is running a little on the slow side but I think that maybe something
else.
"Elton W" wrote:
try

report.OpenSubreport("subReportName");
HTH

Elton Wang
"MMitchell" wrote:
i am having problems running a sub report in crystal reports using visual
studio 2003.

The first report fires one stored procedure in sql server 2005 and it has 2
levels of groupings then it runs a sub report using the group data.

I have tried the:
Report.SetDatabaseLogon(rptLogin, rptPassword, rptServer, rptDatabase);
It works on the main report, i have also put the code in the .cs file for
the sub report and it is producting the error.

I have tried new sub reports, imported subreports and all produce the error.

I also have tried looping thru the tables and it can only find the table on
the main report and not the sub report.

Feb 24 '06 #3
I don't know if this will help you with the speed, but it has examples oh
how to connect to the database in subreports.

http://support.businessobjects.com/l...s/c2010371.asp

"MMitchell" <MM*******@discussions.microsoft.com> wrote in message
news:F1**********************************@microsof t.com...
Thanks.
That got me pointed in the right direction.

Here is the code that I had to use to solve this:

Report.SetDatabaseLogon(rptLogin, rptPassword, rptServer, rptDatabase);
ReportDocument subreport;
subreport = Report.OpenSubreport("rptStudentAveragesSub.rpt");
subreport.SetDatabaseLogon(rptLogin, rptPassword, rptServer, rptDatabase);

It is running a little on the slow side but I think that maybe something
else.
"Elton W" wrote:
try

report.OpenSubreport("subReportName");
HTH

Elton Wang
"MMitchell" wrote:
> i am having problems running a sub report in crystal reports using
> visual
> studio 2003.
>
> The first report fires one stored procedure in sql server 2005 and it
> has 2
> levels of groupings then it runs a sub report using the group data.
>
> I have tried the:
> Report.SetDatabaseLogon(rptLogin, rptPassword, rptServer, rptDatabase);
> It works on the main report, i have also put the code in the .cs file
> for
> the sub report and it is producting the error.
>
> I have tried new sub reports, imported subreports and all produce the
> error.
>
> I also have tried looping thru the tables and it can only find the
> table on
> the main report and not the sub report.

Feb 24 '06 #4

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

Similar topics

0
by: Stijn Lambert | last post by:
Hi all, I am having some problems with Crystal Reports 9 for Visual Studio .NET ... I have a multithreaded application that prints reports in several threads (based upon incoming requests on a...
4
by: anannj | last post by:
Hi everyone, I have a Crystal Report with a subreport in a windows application, which is to be exported to the pdf file. I followed the instructions on...
0
by: cw | last post by:
Hi all, I'm trying to generate some crystal report using ASP.NET. However, i stucked on the avove error.. below is the code for web form 1: Private Sub Page_Load(ByVal sender As System.Object,...
0
by: Rajesh | last post by:
I'm still strugling with this error after a whole work day. Hope someone can help me with this. I have 2 crystal reports, both binded by datasets. But one dataset is an sql statement and another...
0
by: Susil Patro | last post by:
Hi all, I have installed Visual Studio dot net version 2003, in my machine. I opened a new project for developing an application related to crystal reports. I got the following error, while I...
0
by: Alixx Skevington | last post by:
OK, I am confused here, so I hope that somebody out there can help me out. I am trying to run a report allows me to choose the report and then change the logon info for it. Noiw before you say...
3
by: Lorenc | last post by:
Is anybody experiencing the following error when trying to export a crystal report to a pdf? This error happens randomly. ------------------------------------------------------------------------...
0
by: Dipen | last post by:
Hello All, I am using crystal report in my application. Everything is right but i end up with the following error. Failed to open a rowset. Description: An unhandled exception occurred during...
0
by: PerumalSamy | last post by:
Hi, the following code is what i created for crystal report.I am using ACCESS database and vb.net coding. While i running the program i am getting error as...
0
by: PrakashN | last post by:
Hi everyone, I have a Crystal Report with a subreport in a windows application, which is to be exported to the pdf file. I followed the instructions on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.