With all of our reports we have a list of parameters being passed from our program and then a list that is entered by the user during runtime. With the user prompted parameters, their names all start with 'Prompt'. This is fine when we preview the reports since any parameters set using SetParameterValue(paramname,paramvalue)
do not show up.
However, when the report is directly printed or exported, then we need to call up Crystal Report Viewer to prompt the user for the User-selected prompts. Currently the code to do this is:
crReport = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
CrystalReportViewer1 = NEW CrystalDecisions.Windows.Forms.CrystalReportViewer();
CRViewer1.ReportSource = crReport.
CRViewer1.EnableRefresh = true.
which works fine but it displays all parameters in the prompt, even the ones that have already been set using the SetParameterValue method.
Is there anyway that I can hide those? As mentioned, they all start with 'Prompt'.
Also, I found this
which explains that I'm not meant to use the RefreshReport()
method, however I cannot for the life of me find a way to bring up the prompt without using that method. I've tried CRViewer1.Refresh(), CRViewer1.Visible = TRUE, CRViewer1.Show() all to no avail.
Any advice? Thanks!
Edited by nix1016 - 28 Nov 2016 at 6:46pm