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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing selection formula for RDC report

Status
Not open for further replies.
Jan 8, 2001
163
US
X-)
Hi there. I'm in need of a little help. I have a report that I generated using the RDC component. It has a SQL Query already set. What I need to do is to add two lines to the where clause from the vb form before I export the report. For example, say the sql query of the report initially reads as,
"Select x.id,
y.date
From x, y
where x.id = y.id"

I want add two more lines to the where clause depending on what the user enters as follows,
"Select x.id,
y.date
From x, y
where x.id = y.id
and y.date > Date('2000,12,01')
and x.id > 0"

What is the best way to do this?

I tried using the report.recordselectionformula="..." but the report never reflected my added criteria. Then I tried using the report.SQLQueryString command but I could not figure out the correct syntax. (note - I used all the special chr(13) characters but it still wouldn't work) Could anyone please give my an example of where they might have done either of these before or some other method even. I just need to see how a working example looks to see what I'm doing wrong.

Thanks a lot
CrystalVisualBORacle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top