Programatically setting default value and still prompt for parameter



When defining the parameter in the report designer there is a "default
value" and it is this value that I wish to set before running the report.

I'm using Crystal Reports XI which no longer defaults data parameters to the
current date. I'd like to programatically set the default value without
setting a Current Value. If you set the parameter's current value then it
won't be prompted for; this isn't what I want.

Using ParameterField.DefaultValues.Add(ParameterDiscreteValue) will add a
value to the list of values that the users can select from the parameter
value list box but it doesn't populate the default value itself.

If there's some way to set the current value and still prompt for a value
then that would work for me. I haven't found any way to do that yet either.
Setting ParameterField.CurrentValue.Add(x) will cause the parameter to be
skipped on the parameter dialog even if HasCurrentValue is subsequently set
to false.

Any insights are appreciated!
Please reply via the newsgroup.

Bill Faulk


.



Relevant Pages

  • RE: Report Parameters
    ... If there are multiple subreports that need the dates, ... If only one subreport needs dates, then you can cause it to prompt for the ... Dave Hargis, Microsoft Access MVP ... particular sub report that need start and end dates specific to the pts. ...
    (microsoft.public.access.reports)
  • RE: Report Parameters
    ... Dave Hargis, Microsoft Access MVP ... it actually runs the report again which causes the ... report prompt for each pt. ...
    (microsoft.public.access.reports)
  • RE: Report Parameters
    ... I have no choice but to use text boxes. ... it actually runs the report again which causes the ... Dave Hargis, Microsoft Access MVP ... report prompt for each pt. ...
    (microsoft.public.access.reports)
  • RE: Report Parameters
    ... it runs the report which causes the prompt. ... Dave Hargis, Microsoft Access MVP ... another for EndDate, but since each subreport has it's own query, each query ...
    (microsoft.public.access.reports)
  • Re: Criteria prompts
    ... how do I specify a "name" prompt? ... report, which is linked to a query. ... set this criteria to come up as prompts when the report is run? ...
    (microsoft.public.access.reports)