Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have an application that uses Crystal Reports. If I run a report e.g. Report A, works fine. Then I try running a different report e.g. Report B that has more parameters than Report A, I get an error message "The parameter is incorrect". I then try running Report A and get the same error message. To run a different report I have to come out of the application and then go back in.

The question is, How do I clear the previous crystal report to run another?

What syntax should I use e.g Close.

Any ideas?
Posted

Hi,

Try this if could help.


Right click the body of your Crystal Report
then goto:

Design -> Default Settings.. ->Reporting

Check the checkbox

Discard Saved Data When Loading Reports.

Click Ok then Save the report.

Please remember to mark the replies as answers if they help and unmark them if they provide no help.



Regards,

Algem
 
Share this answer
 
v2
Comments
Member 11013544 14-Aug-14 14:34pm    
Worked perfectly for me. I was having an issue with the report not prompting for parameters..
Thanks for all your solutions.

I was missing one wee bit of code once the report was finished.

parameterfields.Clear()

Adding this line cleared the parameters.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900