Expand|Select|Wrap|Line Numbers
- Private Sub BPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BPrint.Click
- Dim frm As New FrmPrintReport 'reports
- Dim cr As New CRepResponsable
- cr.SetParameterValue(0, Val(Me.TBAccountNumber.Text))'integer
- cr.SetParameterValue(1, Me.TBAccountNumber.Text)'string
- cr.SetParameterValue(2, vbNull) 'integer
- cr.SetParameterValue(3, vbNull) 'string
- frm.CrystalReportViewer.ReportSource = cr
- frm.MdiParent = Me.MdiParent
- frm.Show()
- End Sub
- i have the code above. i could not pass a null parameter, to the crystal reports. i will have an empty report i tried vbnull.null and vbnull.empty same result.
- but if I put
- cr.SetParameterValue(2, Val(Me.TBSubAccount.Text))) 'integer 'not null
- cr.SetParameterValue(3, Me.TBSubAccount.Text) 'string 'not null
- the report display the values.
Expand|Select|Wrap|Line Numbers
- {CUSTOMERS.SUB_ACCOUNT_NUMBER} = {?SubAccount_String} and
- {ecole.serial} = {?AccountNumber} and
- {CUSTOMERS.ACCOUNT_NUMBER} = {?AccountNumber_String} and
- {ecole.sub_account} = {?SubAccount}