Avatar of projecthenry
projecthenry
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Crystal Report prompts for parameter values but doesn't use them

I am modifying a C# project which incorporates a Crystal Report.  The C# project was originally developed with Visual Studio.NET 2003 and I used the Visual Studio.NET 2010 converter to upgrade the project to this environment.
The application sets the values of the report parameters then calls the report.
In the original application the parameter value prompts inside the Crystal Report did not show and the report showed details corresponding to the parameter values set within the C# code.
In the new application the parameter value prompts inside the Crystal Report are displayed.
The users do not want to see or fill in the Crystal Report parameter value prompts, especially as they do not alter the data displayed.
Is there a way for me to suppress the parameter value prompts inside the Crystal Report?
I notice that the C# project is still linked to some Crystal ... 2003 merged modules.  Do I need to change these for more recent versions?
Many thanks for your consideration.
Crystal Reports.NET Programming

Avatar of undefined
Last Comment
projecthenry

8/22/2022 - Mon
Éric Moreau

check "Passing a value to a parameter of the report" from http://emoreau.com/Entries/Articles/2006/09/Feeding-Crystal-Reports-from-your-application.aspx

yes, you absolutely need to complete the upgrade to install all the same version of CR and remove any unused reference. Users also need the correct version of CR
Mike McCracken

Not only do you need to update to use the later Crystal assemblies, you have to update the reports to the VS2010 Crystal version.  Crystal 4 VS2010 is the only version of the .Net Crysal that can be used in VS2010.  The Crystal 2003 merge modules are not compatible with VS2010

You get the prompt for the parameter values for 2 reasons
1.  One or more of the parameter values are not of the correct data type.
2.  You have something set in either the report or the viewer that causes the parameter screen to be shown.  In earlier versions of Crystal the call had a parameter that could be set to not show the parameter screen unless there was anissue with the parameters.

mlmcc
ASKER CERTIFIED SOLUTION
projecthenry

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Mike McCracken

I don't know this for sure but it may be that when you assign the data source any changes you have made regarding the source (parameters, selection formula) may get discarded.

Since you are passing a datasource why not filter it in the application before passing it to the report.

mlmcc
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
projecthenry

ASKER
This solution is easy to implement and easy for others to copy, however, the underlying reasons for why this works is not understood.