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

Crystal Reports Question

Status
Not open for further replies.

victoryhighway2

Programmer
Jul 18, 2005
42
US
Hello,
I'm not sure if this the right forum to post this, but I am using Crystal Reports 9 in a Visual Basic 6 project. I am using the CRViewerTemplate ActiveX control to view the reports on-screen and am using the CRAXDDRT.Application class to print the reports to a printer.

What I need to do is find out how I can programmaticaly change the SQL, via my VB6 program, that is being used as the "recordsource" for the report, but I haven't yet been able to find out how to do that.

Does anyone have any advice on this subject, or is there a more appropriate board that I should post this to?

Regards,
Geoffrey
 
I do this with all my reports in the same environment.

Try this:
reportviewer.Database.SetDataSource recset, , 1

recset is an ADODB.recordset that I opened with a query.
 
I'm using DAO as my database access method. Would that make a difference?

I'll give this a shot and see what I can find out.

Thanks,
Geoffrey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top