Click here to Skip to main content
15,891,976 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone!
I have a problem with a report in vb.net.
VB
Dim st As String = frmCheckSale.StartDate.Value.ToString("MM/dd/yyyy")

    Dim rpt As New CSaleDetail
    rpt.RecordSelectionFormula = "{VSaleDetail.dates}>='" & st & "'"

VSaleHistory.RefreshReport()
    VSaleHistory.ReportSource = rpt


+but this statement errors

VB
Dim st As String = frmCheckSale.StartDate.Value.ToString("MM/dd/yyyy")
    Dim ed As String = frmCheckSale.EndDate.Value.ToString("MM/dd/yyyy")

    Dim rpt As New CSaleDetail
    rpt.RecordSelectionFormula = "{VSaleDetail.dates}>='" & st & "' and {VSaleDetail.dates}=
    <'"& ed &"'"

VSaleHistory.RefreshReport()
    VSaleHistory.ReportSource = rpt
Posted
Updated 20-Sep-13 3:35am
v2
Comments
Kschuler 20-Sep-13 9:35am    
Which statement is erroring, the one before or after your comment about the error? And what is the exact error message?
[no name] 20-Sep-13 9:39am    
Try <=

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