X-)
Hi there. I'm in need of a little help. I've created a VB6 application I've created. In it, I have a report that is 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
Hi there. I'm in need of a little help. I've created a VB6 application I've created. In it, I have a report that is 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