473,461 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 4483
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.