Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening a crystal report in vb6

Status
Not open for further replies.

baza

Programmer
May 15, 2001
20
ES
Please help me,

I have written an application which selects fields from an access2000 db and i have created a report which has text fields on it which are linked to the same db.

how do i
1)Set the report to read only the fields selected with an sql query
2)open the report.

heres what ive got so far

Set rs2 = db.OpenRecordset("SELECT * FROM bill_records WHERE sid = " & sid & " AND bill_date BETWEEN #" & Form1.DTPicker1.Value & "# AND #" & Form1.DTPicker2.Value & "# ORDER by bill_date desC")
If rs2.EOF = False Then
rs2.MoveFirst
Do Until rs2.EOF
CrystalReport1.ReportSource = App.Path Invoice.rpt"
CrystalReport1.SelectionFormula = "SELECT * FROM tblUsers"
CrystalReport1.Action = 0
rs2.MoveNext
Loop
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top