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
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