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!

sub report parameters using VB form

Status
Not open for further replies.

Tailgun

Technical User
Mar 30, 2002
417
US
here is my code at present and it works fine except I need help adding a way to pass 3 other parameters to a sub report via this VB viewer form. Crystals help file wasn't of any help for me.

Private Sub Form_Load()
Me.WindowState = vbMaximized
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
Dim crpParamDef As CRAXDRT.ParameterFieldDefinition

For Each crpParamDef In Report.ParameterFields
Select Case crpParamDef.Name
Case "{?Location}"
crpParamDef.AddCurrentValue (CLng(frmStartAveTurnaroundTime.txtLocation.Text))
Case "{?Master Company}"
crpParamDef.AddCurrentValue (CLng(frmStartAveTurnaroundTime.txtCoID.Text))
Case "{?Date From:}"
crpParamDef.AddCurrentValue CDate(frmStartAveTurnaroundTime.txtStartDate.Text)
Case "{?Date To}"
crpParamDef.AddCurrentValue CDate(frmStartAveTurnaroundTime.txtEndDate.Text)
Case "{?Local company}"
crpParamDef.AddCurrentValue (CLng(frmStartAveTurnaroundTime.txtCoID.Text))
Case "{?Appraiser}"
crpParamDef.AddCurrentValue (CLng(frmStartAveTurnaroundTime.txtAppID2.Text))
Case "{?Assignment Type}"
crpParamDef.AddCurrentValue (frmStartAveTurnaroundTime.DataCombo3.Text)
End Select
Next
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
Set Report = Nothing
End Sub

thanks for any and all help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top