Hello,
I know there are a million threads on this topic, but that's the problem...it's impossible to find an answer. So apologies in advance if it's out there already.
I have a generic report viewer page/control in my application where I load a variety of reports; I do not know what the parameters are in advance. In ALL cases, I do NOT want to be prompted for parameters when the report is first loaded. I want the report to use either empty values or any specific values I pass in via code when the report is first loaded and executed in the Viewer.
In one example, the report has one string parameter and 2 numeric parameters. If I set the string parameter to "", then handle that in my record selection criteria, that is an OK workaround. But for the numeric parameters, I want to set them to null or nothing and then not be prompted. This is where I'm having difficulty: If I do nothing, I get prompted. If I set them to Null/Nothing, I'll get an error message when the report loads that there is a data type mismatch. ALL of the parameters are set to OptionalPrompt=True. Also, if I set EnableParameterPrompt="False", I receive an error that parameters are missing even though all parameters are Optional. So the main issue is to be able to set numeric (and date) prompt values to something in code that will then stop them from being prompted in the Report Viewer when the report loads.
Thanks in advance for a solution or a pointer to another thread with the solution.
Richard