Hello there. I'm trying to add selection criteria to a report created with the RDC component in VB6. I keep getting an error at the bold section of my code below that says "Run time error: The remaining text does not appear to be part of the formula". Can anyone see what I'm doing wrong? Please note that I don't wish to rewrite the where clause completely, I only wish to add to it. Any help with this would be GREATLY appreciated.
Dim Report As New crptPBR_DS_UR
Dim intResult As Integer
Dim strSelection As String
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
Report.Database.Tables(1).SetLogOnInfo "DATABEAST", "DATABEAST", "username", "pswd"
CRViewer1.ReportSource = Report
strSelection = " AND {M_PUBLISHER.DESCRIPTOR} = '" & txtPubrName & "' And {R_PUBN_RPT_LOG.DATESTAMP} = '" & strPubrDate & "'"
Report.RecordSelectionFormula = strSelection
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub
Note: txtPubrName & strPubrDate are global string variables.
Thanks in advance,
CrystalVisualBOracle s-)
Dim Report As New crptPBR_DS_UR
Dim intResult As Integer
Dim strSelection As String
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
Report.Database.Tables(1).SetLogOnInfo "DATABEAST", "DATABEAST", "username", "pswd"
CRViewer1.ReportSource = Report
strSelection = " AND {M_PUBLISHER.DESCRIPTOR} = '" & txtPubrName & "' And {R_PUBN_RPT_LOG.DATESTAMP} = '" & strPubrDate & "'"
Report.RecordSelectionFormula = strSelection
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub
Note: txtPubrName & strPubrDate are global string variables.
Thanks in advance,
CrystalVisualBOracle s-)