Passing parameters via CR6 ocx -- kill prompt
I have a report that has several parameters. When I pass the parameters to
the report and run it, I still get the parameter prompt before the report is
generated. Is there anyway to prevent this?
The CR6 documentation says that the usage of the parameterFields property
is:
[form.]Report.ParameterFields(ArrayIndex)[=ParameterName;NewValue;SetCurrent
Value]
A sample of the code I am using is:
crRep.ParameterFields(1) = "FromDate;" & Format(txtDate(0),
"yyyy/mm/dd")
The documentation says that if SetCurrentValue is set to TRUE, the parameter
value is passed to the current value in the report; the user is not prompted
to enter the parameter value. If it is set to FALSE, the parameter value
is passed to the default value for the parameter; the user is prompted to
enter the parameter value, with the value you set showing as the default
value. The default value is FALSE.
I've tried it with TRUE, FALSE and with no SetCurrentValue at all. The only
difference I've seen that if it is set to FALSE, the values I pass for
parameters are used as defaults in the prompt; if it is set to TRUE, there
are no default values for the prompt. With no SetCurrentValue, as I've
shown above, the prompt is displayed with the parameters that I passed as
default values (just as if I had supplied FALSE for SetCurrentValue).
But regardless, the prompt is still displayed. How can I keep the prompt
from showing?
Thanks,
Kirk