473,324 Members | 2,581 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,324 software developers and data experts.

Params in Crystal Report

Dear all

I have created a c# web project in VS.NET 2003 that contains a crystal
report with two params. No problems until here, but executing the report
selects the wrong records.

My params are called {?PNumber} and {?PName} building a logical AND. They
are defined as 'Discrete and Range Values' with the option 'Allow multiple
values' checked. The following code snipped shows what's going on:

// load report
ReportDocument rd = new ReportDocument();
rd.Load("myReport.rpt");
ParameterDiscreteValue crDiscreteValue;
ParameterRangeValue crRangeValue;
ParameterFieldDefinition crParameter;
ParameterValues crParameterValues = new ParameterValues();
// first param
crParameter = rd.DataDefinition.ParameterFields["PNumber"];
crRangeValue = new ParameterRangeValue();
crRangeValue.StartValue = 200000;
crRangeValue.EndValue = 999000;
crParameterValues.Add(crRangeValue);
// second param
crParameter = rd.DataDefinition.ParameterFields["PName"];
crDiscreteValue = new ParameterDiscreteValue();
crDiscreteValue.Value = "LongTermWatch";
crParameterValues.Add(crDiscreteValue);
// assign params
crParameter.ApplyCurrentValues(crParameterValues);

The resultset should contain only one row, fulfilling the conditions
{?PNumber} between 200000 and 999000 and {?PName} = "LongTermWatch". Instead
the resultset shows even records whos {?PNumber} begins with 200...

And what do I have to do if I use only one of the params, say {?PNumber} =
199210, ignoring the value of {?PName}? Because of the logical AND the
resultset would be empty...

Thanks in advance
Dominik
Nov 18 '05 #1
0 1014

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

Similar topics

1
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
13
by: kristoff plasun | last post by:
I have a problem with a C++ DCOM application that prints Crystal Reports with data from Oracle. The SQL query is relatively complex but when the report is printed from the Crystal Reports...
0
by: Dr. Indera | last post by:
hello, i previously posted the questions below on several crystal reports newsgroups, including the one for the company that makes crystal reports, but never got an answer, so i'm hoping that...
0
by: Dominik Tropper | last post by:
Dear all I have created a c# web project in VS.NET 2003 that contains a crystal report with two params. No problems until here, but executing the report selects the wrong records. My params...
2
by: Craig in Boulder | last post by:
I have been trying for over a week to get data from my stored procedure into a Crystal Report in VS.NET 2003 with no luck. I have all sorts of code parts but nothing that tell me how then go...
2
by: Mythran | last post by:
In .Net, how can I go about and set a Crystal Reports namespace? Right now they use the Root Namespace (VB) from the project. How can I extend the namespace for a single report (which will be set...
0
by: murlbrown | last post by:
I have built a report using Crystal Report 8.0, which is set to get its data from a MS SQL Stored Procedure with 1 Parameter(smalldatetime). I can get the report to display in crystal with data,...
1
by: Karthic | last post by:
When i right click on the .rpt file in the VS 2003, i see a property printer setting. It says "No printer" on the top and there is option to select printer and paper settings etc.. I want to...
1
by: bthomas71chevy | last post by:
I have just setup a WebServer and all the applications work fine, but when every any of the applications try to generate a Crystal Report the page errors out. "File or assembly name...
11
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
How can I stop receiving this message while calling a crystal report? "The report you requested requires further information." Thanks
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.