473,399 Members | 3,038 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,399 software developers and data experts.

Crystal Reports Query Engine Error

I have a crystal report that works fine when run through Crystal, which
I am triying to incorporate into a crystal report viewer. The report
takes 1 parameter, which is either 0 or 1. If the paremeter is 1 then a
filter is placed onto the data by the database server (Oracle PL/SQL
procedure in a package), parameter is 0 then it doesn't use the filter.
When I run this with the filter on the program works fine and the
report is displayed, but when I run it with the parameter of 0 it fails
with a query engine error. I originally used crystal 9 to write the
report, and then incorporated it into C# by adding it to the project
and doing a verify database, followed by a save. Below is the code that
I am using for the report, although I'm not sure how it could be wrong
since it works for one parameter??

private void ShowReport(String reportName , Int32 numParam)
{
CrystalDecisions.CrystalReports.Engine.ReportDocum ent reportDoc =
new CrystalDecisions.CrystalReports.Engine.ReportDocum ent() ;
CrystalDecisions.Shared.ParameterValues pv = new
CrystalDecisions.Shared.ParameterValues() ;
CrystalDecisions.Shared.ParameterDiscreteValue pdv = new
CrystalDecisions.Shared.ParameterDiscreteValue() ;
reportDoc.Load (reportName);

CrystalDecisions.CrystalReports.Engine.Table tblCurrent;
CrystalDecisions.Shared.TableLogOnInfo tliCurrent ;

for (int i = 0; i < reportDoc.Database.Tables.Count ; i++)
{
tblCurrent = reportDoc.Database.Tables [i];
tliCurrent = tblCurrent.LogOnInfo ;
tliCurrent.ConnectionInfo.ServerName = "cfsprod";
tliCurrent.ConnectionInfo.UserID = "infolease";
tliCurrent.ConnectionInfo.Password = "infolease";
}

//pdv.Value = numParam;
pdv.Value = 0;
pv.Add (pdv);
reportDoc.DataDefinition.ParameterFields[0].ApplyCurrentValues (pv);
crViewer.ReportSource = reportDoc;
crViewer.Update ();
}

Nov 17 '05 #1
0 1694

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

Similar topics

0
by: Winston | last post by:
Hi, I am trying to display an image using BLOB in crystal reports. The Reports BLOLB fields are generated using an XML Schema as follows: .... <xs:element name="bSignature"> <xs:complexType>...
2
by: airkart | last post by:
Hello, I've scoured groups and the web, and haven't found a question like mine answered. I'm using Visual Studio 2003 with the Crystal Reports it comes bundled with and SQL Server 2000....
0
by: stephan | last post by:
I know that this has been beaten to death but I can't seem to resolve my issues (I have 2 of them). I have created a class that exposes a public method which returns a datatable as a datasource...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
3
by: Deasun | last post by:
I need some help please! Crystal is driving me nuts. Heres my code so far, see below. Problem: On the .export() line it comes back with error #5 Login failed! I know the login info is good so...
7
by: John | last post by:
I am using Crystal Reports in my application I made using Visual Studio.NET. I installed my application on the client machine, with all the DLLs required(added the merge modules), the engine and...
3
by: Agnes | last post by:
I got this error when I preview report in Vb.net "Unknown query Engine Error" Is that my crystal report got something wrong ??? or my SQL server is too slow to response ?? Thanks a lot From...
1
by: Hardy Wang | last post by:
Hi all, I have a piece of code in my C# console application to export from crystal report files to PDF. For some reports files, I get errors below. I have Crystal Reports 8.5 with service pack...
2
by: matt | last post by:
hello, i have an .RPT file that i am using to load a report via the ASP.NET CrystalReportViewer control. i dont include my .RPTs as embedded resources...instead i load the absolute path of the...
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: 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
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
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
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.