Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Parameter Field

Status
Not open for further replies.

sinclairgf

Programmer
Nov 14, 2003
9
US
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.
 
Figured out my problem. I had to change the parameter value from a default value to a current value.

NewParam.DefaultValues.add NewVal

NewParam.CurrentValues.add NewVal

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top