sinclairgf
Programmer
I am using ASP to display the crystal reports over the web. I have created a report with some paramaters. I have figured out how to set the values for the report before displaying it but the crystal reports keeps creating a web page asking for the parameters and displays the values I set for them in the text fields. I do not want this page to display but rather just open up the report.
Here is the code I am using to set the parameters. I am also using CR version 9.
Dim NewParam
Dim NewVal
Dim ValContent
Set NewParam = ObjectFactory.CreateObject("CrystalReports.ParameterField"
With clientDoc.DataDefinition.ParameterFields
.Item(0).CopyTo NewParam
ValContent = 7
Set NewVal = ObjectFactory.CreateObject("CrystalReports.ParameterFieldDiscreteValue"
NewVal.Value = CStr(ValContent)
NewParam.DefaultValues.add NewVal
clientDoc.DataDefController.ParameterFieldController.Modify .Item(0), NewParam
.Item(1).CopyTo NewParam
ValContent = 2
Set NewVal = ObjectFactory.CreateObject("CrystalReports.ParameterFieldDiscreteValue"
NewVal.Value = CStr(ValContent)
NewParam.DefaultValues.add NewVal
clientDoc.DataDefController.ParameterFieldController.Modify .Item(1), NewParam
End With
Thanks in advance.
Here is the code I am using to set the parameters. I am also using CR version 9.
Dim NewParam
Dim NewVal
Dim ValContent
Set NewParam = ObjectFactory.CreateObject("CrystalReports.ParameterField"
With clientDoc.DataDefinition.ParameterFields
.Item(0).CopyTo NewParam
ValContent = 7
Set NewVal = ObjectFactory.CreateObject("CrystalReports.ParameterFieldDiscreteValue"
NewVal.Value = CStr(ValContent)
NewParam.DefaultValues.add NewVal
clientDoc.DataDefController.ParameterFieldController.Modify .Item(0), NewParam
.Item(1).CopyTo NewParam
ValContent = 2
Set NewVal = ObjectFactory.CreateObject("CrystalReports.ParameterFieldDiscreteValue"
NewVal.Value = CStr(ValContent)
NewParam.DefaultValues.add NewVal
clientDoc.DataDefController.ParameterFieldController.Modify .Item(1), NewParam
End With
Thanks in advance.