Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Please Help Me ???????????????
i am check the mark.markid is a text field after this it will be not show report.
i am making a report in crystal report and call by vb6.0 when i am pass recordselection formula with id and date range parameter it give no error but display no data in report i am using crystal report 9.0 when i am pass single single paratmer it display report with record but when i am pass both parameter together is display no record in report.

Code: - -
XML
Set CrApp = New CRAXDRT.Application
Set CrRep = CrApp.OpenReport(App.Path & "\recpt1.rpt")
'CrRep.Database.SetDataSource (App.Path & "\dak.mdb")
'CrRep.Database = App.Path & "\dak.mdb"
For Each crtable In CrRep.Database.Tables
crtable.Location = App.Path & "\dak.mdb"
Next


If Check8.Value = 1 And Check9.Value = 1 Then
      Dim c1
    c1 = Mid(Combo3.Text, 1, 2)
    CrRep.EnableParameterPrompting = False
    str = "{MarkTo.Mark_id} = '" & c1 & "' And( {Dak.MarkDt} >= #" & Text9.Text & "# And {Dak.MarkDt} <= #" & Text10.Text & "#)"
    CrRep.RecordSelectionFormula = str
    'MsgBox (CrRep.RecordSelectionFormula)
    CrRep.DiscardSavedData
    Form1.CRViewer91.ReportSource = CrRep
    '    Form1.CRViewer91.SearchByFormula (str)
    Form1.CRViewer91.ViewReport
    Form1.Show
Exit Sub
End If

It not give any error but not display any record
Please solve it
Please Help me again
Posted
Updated 18-Jan-10 22:35pm
v2

1 solution

wrote
str = "{MarkTo.Mark_id} = '" & c1 & "' And( {Dak.MarkDt} >= #" & Text9.Text & "# And {Dak.MarkDt} <= #" & Text10.Text & "#)"

please confirm the Mark_id field data type is text or number. If it is number type you should avoid the single quotes in parameter & then give space after the keyword And.

Then find the file event.log in the reports folder path. You can see the error details in that file. let me know.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900