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!

VB-Crystal report Problems

Status
Not open for further replies.

bugeditor

Technical User
Oct 9, 2001
44
0
0
IN
Hi,
I have lot of Seagate crystal Report files Developed with MS-Access Using ODBC Connectivity.

Now we have changed the Database name ofcourse Database tables/Structures remaining the same and also in future DatabaseName again may change but structres remain same.

Actually i am calling all these crystal reports through VB

We have used Crystl32.ocx/VB6/access2000

In Brief to say How can i dynamically change the ODBC DataSource through VB application to the particular report at any point of time


please can body Help Me with a snippet

My Snippet is as below does't work

dat in report is always only from one databse if if i change ODBC connect string
and Sqlquery dynamically the query it self doesn't execute

##################################


CrystalReport1.Reset
CrystalReport1.DiscardSavedData = True
CrystalReport1.Connect = ADOCon.ConnectionString

CrystalReport1.SQLQuery = sSql ''SQL statement
CrystalReport1.ReportFileName = G_ReportPath & "Myreport.Rpt"
CrystalReport1.Action=1
----------------------

If i give syntax mistake in sqlquery it doesnt even give error..
simply executes report wth older data..Any help
 
If you are going to be using VB to display the report anyways, you could always use the ADO Field Definition File (TTX) method of passing a populated recordset to the report as a data source.

Look up TTX at on crystal's support site. there are code examples that show you exactly how to accomplish this..

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top