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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to handle range prompts in a Crystal Report

Status
Not open for further replies.

ije

MIS
Jun 10, 2002
38
AU
For a while I have been using a vbscript to generate a crystal report, providing the input for the single discrete prompt required. Now I need to provide the input for a few other prompts, which are range values.

Currently this is the code I use to provide the prompt input ( full code at end of the post if it is useful to others )

Set crpParamDefs = rep.ParameterFields
For Each crpParamDef In crpParamDefs
With crpParamDef
Select Case .ParameterFieldName
'Now it finds and sets the appropriate stored procedure parameter.
Case "selectcallid"
.SetCurrentValue("00052666")
End Select
End With
Next

I am unsure how to provide a value which is a range, not a discreet value.

Any assistance most appreciated!!




Full Code:

Set appl = CreateObject("CrystalRuntime.Application")
Set rep = appl.OpenReport("z:\supplierissue.rpt", 1)
'This code cycles through the ParameterFieldDefinitions collection in the main report.
'&&&&&&&&&&&&&&&&&&&&
Set crpParamDefs = rep.ParameterFields
For Each crpParamDef In crpParamDefs
With crpParamDef
Select Case .ParameterFieldName
'Now it finds and sets the appropriate stored procedure parameter.
Case "selectcallid"
.SetCurrentValue("00052666")
End Select
End With
Next
rep.EnableParameterPrompting = False
rep.EnableParameterPrompting = False
rep.ExportOptions.DiskFileName = "z:\sr00052666.rtf"
rep.ExportOptions.DestinationType = 1
rep.ExportOptions.PDFExportAllPages = True
rep.ExportOptions.FormatType = 4
rep.Export False


 
i thought I might pose this in another way....

currently to supply a value of 100 to the Crystal report promt "selectcallid" i use the following piece of code:

Case "selectcallid"
.SetCurrentValue("100")

What I would like to do is change the prompt to cater for a range value ( which I have done in Crystal ) and provide a response like 100 thru to 200 to the prompt, so instead of getting one record back, i now get 100.

Can someone assist?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top