Solved

Stop Crystal Reports XI Viewer from Prompting for Parameters

Posted on 2007-04-10
5
816 Views
Last Modified: 2013-11-06
I have a Windows App crystal report viewer, I am using the real Crystal Reports XI viewer not the free viewer that is bundled in .NET 2005. NOTE THIS IS NOT THE WEB VIEWER

I have a report that uses two parameters (a date and a user id). I pass these parameters to the report object...

myRpt.Load(reportDir + "UserFloatRec.rpt");
myRpt.SetParameterValue("ReportDate", DateTime.Now);
myRpt.SetParameterValue("UserID", f.UID);

The report displays properly with the correct date and the correct user info based on f.UID

If the REFRESH button is clicked in the viewer, then a popup dialog appears asking for the two parameters to be provided. I have not found any way to force it to stop popping up this dialog box.

I did a huge number of searches on Google and on Crystal Decisions and all I find are references to a parameter reuse setting, but refers only to the Crystal Web viewer. The specified parameter (or anything even close) doesn't appear in the Windows viewer as far as I can tell.

I'm tearing out my hair over this one... if anyone can point me at a fix it would be greatly appreciated.
0
Comment
Question by:dbtoth
5 Comments
 
LVL 26

Accepted Solution

by:
Kurt Reinhardt earned 250 total points
ID: 18887617
This is the way the viewer works.  When you select refresh, the viewer  attempts to run the report again.  Since the end user is now attempting to run the report manually rather than from a page or form, the parameters aren't passed in to the report again.  As such, the user is prompted for the parameters.

Why would you want the end user to be able to click the refresh button and pass in the same parameters as the original report?  Is the data changing over the course of a few minutes and you want to allow the users to pull in the updated data?

~Kurt
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 250 total points
ID: 18889000
Kurt is accurate.  That is the way the viewer works.
I am not familiar with that viewer so this may not apply.

One way to handle this may be to disable/hide the refresh button and supply one of your own.  You can then supply your own button on the viewer and control its behavior.

mlmcc
0
 
LVL 10

Expert Comment

by:adriankohws
ID: 18930366
I encho Mr.mlmcc. Disable it if you are not using it.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now