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

crystal report

Jun
I am getting this error when i run a crystal report in
asp.net , i'm using commad with 1 parameter..

Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where
it originated in the code.

Exception Details:
CrystalDecisions.CrystalReports.Engine.ParameterFi eldCurren
tValueException: Missing parameter field current value.

Source Error:

An unhandled exception was generated during the execution
of the current web request. Information regarding the
origin and location of the exception can be identified
using the exception stack trace below.
I have the following code to pass the parameters:

CrystalDecisions.Shared.ParameterFields ParameterFields;

CrystalDecisions.Shared.ParameterField
ParameterField, ParameterField1, ParameterField2,
ParameterField3;

CrystalDecisions.Shared.ParameterDiscreteValue
ParameterDiscreteValue, ParameterDiscreteValue1,
ParameterDiscreteValue2, ParameterDiscreteValue3;
//Create a new ParameterFields
collection
ParameterFields = new
CrystalDecisions.Shared.ParameterFields();
//Creata a new ParameterField
object
ParameterField = new
CrystalDecisions.Shared.ParameterField();
ParameterField1 = new
CrystalDecisions.Shared.ParameterField();
ParameterField2 = new
CrystalDecisions.Shared.ParameterField();
ParameterField3 = new
CrystalDecisions.Shared.ParameterField();
//Assign the ParameterFieldName
property
ParameterField.ParameterFieldName
= "Year0";
ParameterField1.ParameterFieldName
= "Year1";
ParameterField2.ParameterFieldName
= "Year2";
ParameterField3.ParameterFieldName
= "province_id";
//Create a ParameterValue object
ParameterDiscreteValue = new
CrystalDecisions.Shared.ParameterDiscreteValue();
ParameterDiscreteValue1 = new
CrystalDecisions.Shared.ParameterDiscreteValue();
ParameterDiscreteValue2 = new
CrystalDecisions.Shared.ParameterDiscreteValue();
ParameterDiscreteValue3 = new
CrystalDecisions.Shared.ParameterDiscreteValue();
//Assign a value to the object
ParameterDiscreteValue.Value
= "2004";
ParameterDiscreteValue1.Value
= "2003";
ParameterDiscreteValue2.Value
= "2002";
ParameterDiscreteValue3.Value
= "1";
//Add the ParameterValue object to
either the CurrentValues or DefaultValues collection
ParameterField.CurrentValues.Add
(ParameterDiscreteValue);
ParameterField1.CurrentValues.Add
(ParameterDiscreteValue1);
ParameterField2.CurrentValues.Add
(ParameterDiscreteValue2);
ParameterField3.CurrentValues.Add
(ParameterDiscreteValue3);
//Add the ParameterField object to
the ParameterFileds collection
ParameterFields.Add
(ParameterField);
ParameterFields.Add
(ParameterField1);
ParameterFields.Add
(ParameterField2);
ParameterFields.Add
(ParameterField3);
//Assign the ParameterFields
collection to the viewer

CrystalReportViewer1.ParameterFieldInfo =
ParameterFields;
Any help is appreciated. Thanka in advance!
Jun

Nov 18 '05 #1
0 1288

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...
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...
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...
0
by: Chris | last post by:
I have the following situation in a VB.Net App I am working on: 1.)A report created in VS.Net 2003 using the CR.Net component of VS 2003. 2.)The datasource for the report is a Stored Proc in a...
9
by: Altman | last post by:
I am currently using ASP.Net 2003 and will be upgrading to 2005 sometime in the near future. I have been having issues with using Crystal Reports that were included with .Net to handle my...
0
by: John Smith | last post by:
Hello, I am developing a VB.NET 2003 application that will use lots of Crystal Reports. Sometimes the users will preview a report in a Crystal report viewer, and sometimes they will send the...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...

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.