Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8357

Re: Do NOT show Parameter prompt when loading report

$
0
0

Hi Don,

OK, here is where I'm at:  If I set a value for each of the three parameters in the report before loading it as the ReportSource, it does not prompt.  Here is how I'm setting each of the parameters (just one of three examples provided):

                        rptDoc.ParameterFields("Center").CurrentValues.Clear()
                        rptDoc.ParameterFields("Center").CurrentValues.AddValue(InstrumentOwnerName)
                        rptDoc.ParameterFields("Center").HasCurrentValue = True

If I try this:

     rptDoc.ParameterFields("Center").CurrentValues.AddValue(Nothing) ' VB Nothing = c# Null

I get a data type error whether it's for a string or numeric field, and the report does not load.

 

If I comment the "CurrentValues.Clear()" and "AddValue" lines and just set HasCurrentValue = True, I still get prompted.

 

In summary, I can only force a prompt to not be displayed for a parameter only if I assign it a value through the "AddValue" method, even though in the report definition for all of these parameters, the setting OptionalPrompt=True.  It seems like I should be able to set the parameter field to some value so that the viewer thinks it has a value and doesn't prompt, yet still returns all records (a "don't care" value).

 

Thanks for any more thoughts.

Regards,

Richard


Viewing all articles
Browse latest Browse all 8357

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>