Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 11th, 2004, 12:16 PM
Registered User
 
Join Date: Feb 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to gfinzer
Default

After many hours of technical support with Crystal Decisions here are the actions to correct the "Missing Parameter field current value" error:

1. There is an upgrade bug when converting a report from Crystal 8.5 to the Crystal Reports 9.0 Visual Studio .NET 2003. This error affects reports that have embedded stored procedures when trying to do an export. You will receive the error when doing the .Export() method off the report object. The workaround is to re-create the report in 9.0.

2. If you have embedded stored procedures in your report; even if your stored procedure contains defaults for your parameters, you must always pass something into the Crystal Reports. This is for ALL parameters, even the ones that are not used!

3. You must do a refresh on the report. The refresh, re-initializes the report parameters AND the connection information. You must do the refresh in these steps.

    A. rpt.Load("MyReport.rpt")
    B. rpt.Refresh()
    C. rpt.SetDatabaseLogon("UserName","Password");
    D. Set the connection info for each table in the report.
    E. Set the datasource for the report (if applicable).
    F. Set the report parameters.
    G. Do an Export or set the viewer control source to the report.

4. You must set the parameters on the report before doing an export!

5. If you close the report before doing an Export or setting the source of the viewer control you will also get this error.

 
Old March 14th, 2006, 04:57 AM
Registered User
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I am using Crystal Report XI and hope to integrate it into C#.

I am encountering a lot of problem in passing a parameter as a parameter in Crystal Report.

I'm unsure if my C# code is incorrect or the Crystal Report I created is incorrect.

A stanza of my C# code is given below:

ParameterDiscreteValue crtParamDiscreteValue;
ParameterField crtParamField;
ParameterFields crtParamFields;

crtParamDiscreteValue = new ParameterDiscreteValue();
crtParamField = new ParameterField();
crtParamFields = new ParameterFields();

crtParamDiscreteValue.Value = "ABC";
crtParamField.ParameterFieldName = "source";
crtParamField.CurrentValues.Add(crtParamDiscreteVa lue);
crtParamFields.Add(crtParamField);

crtRptViewer.ParameterFieldInfo = crtParamFields;

Within Crystal Report itself, I have created a parameter called "source" as well as using the "Select Expert" to refine my search criterion to a specific column of the table I am drawing the data from.

Yet, I get the error: Query Engine Error.

I am wondering if this is one of the several bugs reported for Crystal Report XI?

I am at a loss. Can someone kindly advise?

Thanks.


 
Old May 5th, 2007, 11:54 PM
Registered User
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to lisackl
Default

Dear Cuban,

With "crReportDocument.SetParameterValue("ItemCode" , TextBox2.Text)" you had solved my problem. I been struggling for week on this issue.

Thanks a lot!! God Bless U!




 
Old March 19th, 2009, 07:09 AM
Registered User
 
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up Solved the Problem

oReportDoc.SetDataSource(ds);
oExport = oReportDoc.ExportOptions;
oExport.DestinationOptions = oDFD;
oExport.ExportDestinationType =
ExportDestinationType.DiskFile;
// set export format as PDF
oExport.ExportFormatType = ExportFormatType.PortableDocFormat;
//CrystalReportViewer1.ReportSource = oReportDoc;
//ParameterCollection param = new ParameterCollection();
StartDate = Request.QueryString["StartDate"].ToString();
oReportDoc.SetParameterValue(
"DateFrom", StartDate); // * description is below

oReportDoc.Export();
// close and destroy objects
oDFD = null;
oExport =
null;



I was very upset to solve this problem actually i was trying to solve this problem today's morning and now i found the solution..

the problem is this that you have parameters.

so pass the parameters value like his way..

oReportDoc.SetParameterValue("DateFrom", StartDate);

where oReportDoc is ReportDocument's object

DateFrom is the param name and StartDate date is simply a variable that pass the value..

I hope you will find the solution..

Best regards
Waqar Hussain Laghari





Similar Threads
Thread Thread Starter Forum Replies Last Post
passing parameter sarah lee ASP.NET 1.0 and 1.1 Basics 3 September 5th, 2006 04:29 PM
how to Export in PDF Format with Parameter fields navid Crystal Reports 2 February 2nd, 2006 04:06 PM
passing parameter.. suzila VB.NET 2002/2003 Basics 7 May 17th, 2004 08:28 PM
Parameter passing psambor Beginning PHP 0 September 17th, 2003 01:47 AM
Passing Parameter tgopal Javascript 3 August 7th, 2003 07:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.