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

Producing CR6 Reports from VB/Oracle

Status
Not open for further replies.

Ericksco

Programmer
Jul 5, 2001
10
0
0
US
Hi All!

I'm developing my first Crystal Report and activating this thru VB... Here are some important facts about the environment I'm working with:

Crystal Report 6
Visual Basic 6
Oracle Database (Ver. 7..)
Connection : ODBC
Using Crystal Report ActiveX Control

My first interaction with Crystal Report was encouraging. I was able to create a query based report that I successfully activated through a VB app. Now, I need to go to the next step.. I want to be able to dynamically change the query in my report into something that I build within my VB App..

Here are my questions:

1) Is this the right approach? If this is, how do I replace the query statement in which my report is based? I have a fairly complex SQL statement with multiple variables driving record selection...Should I use parameters or formula?

2) If no 1 is not the best approach, what is the best one? I've read a couple of posts talking about passing a recordset.. How can I do this with the CR Activex control? Can somebody please provide guidance on how to setup my report and some VB direction to be able to do this..

I'm quite optimistic that this wouldn't be that painful with your help..I'd be willing to try-out any suggestions that anyone of you might have.

TIA!

 
You can replace the entire SQL query for the report by using the SQLQuery property of the OCX object on your VB form.

For example:

CrystalReport1.SQLQuery = "SELECT..."
CrystalReport1.Action = 1 Brian J. Alves
Terrier Consulting, Inc.
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top