How can I avoid the parameter prompting?
I have a report that uses 2 parameters... I made the following code to pass these parameters trough the URL in the "interactiveviewer.asp" and works fine It sends the parameters to the report, but it still prompting me for the parameters (the fields appear filled with the values sent in the URL) and my user need to press "accept" to get into the report.
How can I avoid this step?
This is the code that I put in the "interactiveviewer.asp":
Set NewParam = ObjectFactory.CreateObject("CrystalReports.ParameterField"
With clientDoc.DataDefinition.ParameterFields
.Item(0).CopyTo NewParam
Dim NewVal
Dim Param1
ValContent = Request.QueryString("Param1"
Set NewVal = ObjectFactory.CreateObject("CrystalReports.ParameterFieldDiscreteValue"
NewVal.Value = CInt(ValContent)
NewParam.DefaultValues.add NewVal
clientDoc.DataDefController.ParameterFieldController.Modify .Item(0), NewParam
.Item(1).CopyTo NewParam
ValContent = Request.QueryString("Param2"
Set NewVal = ObjectFactory.CreateObject("CrystalReports.ParameterFieldDiscreteValue"
NewVal.Value = CInt(ValContent)
NewParam.DefaultValues.add NewVal
clientDoc.DataDefController.ParameterFieldController.Modify .Item(1), NewParam
End With
I have a report that uses 2 parameters... I made the following code to pass these parameters trough the URL in the "interactiveviewer.asp" and works fine It sends the parameters to the report, but it still prompting me for the parameters (the fields appear filled with the values sent in the URL) and my user need to press "accept" to get into the report.
How can I avoid this step?
This is the code that I put in the "interactiveviewer.asp":
Set NewParam = ObjectFactory.CreateObject("CrystalReports.ParameterField"
With clientDoc.DataDefinition.ParameterFields
.Item(0).CopyTo NewParam
Dim NewVal
Dim Param1
ValContent = Request.QueryString("Param1"
Set NewVal = ObjectFactory.CreateObject("CrystalReports.ParameterFieldDiscreteValue"
NewVal.Value = CInt(ValContent)
NewParam.DefaultValues.add NewVal
clientDoc.DataDefController.ParameterFieldController.Modify .Item(0), NewParam
.Item(1).CopyTo NewParam
ValContent = Request.QueryString("Param2"
Set NewVal = ObjectFactory.CreateObject("CrystalReports.ParameterFieldDiscreteValue"
NewVal.Value = CInt(ValContent)
NewParam.DefaultValues.add NewVal
clientDoc.DataDefController.ParameterFieldController.Modify .Item(1), NewParam
End With