HOWTO: Change Datasource from within VB. Urgent Help Needed 
Author Message
 HOWTO: Change Datasource from within VB. Urgent Help Needed

HI!

I'm kinda new at developing Crystal Reports, but very experienced VB user. I
have come to a problem with Crystal Reports that I need help with. My
scenario is this:

- My application supports multiple Database-platforms (Jet, mssql, and its
planned to support Oracle etc)
- My application can run agains many databases (only one at a time though).
- I created a Report using CR and need it to run against all of the
databases in my system. I therefore need to know how to change the
datasource of a report from f.eks. a Microsoft Jet database to a
Mssql-server.

I plan to use the ActiveX objects that CR has provided (late binding for
those who know what it is).
I have successfully integrated both Access (as a report-generator) and
Active reports (damned good tool) with my system, but with CR I need help

Please anyone!.. its kinda urgent




Tue, 18 Dec 2001 03:00:00 GMT  
 HOWTO: Change Datasource from within VB. Urgent Help Needed
From what I understood, you are using the Report Design Component of CR7.0
I would suggest that you use the Active Data approach to connect your
datasource to the report.
Doing so you have the possibility to hide the type of datasource to the
report.

It works as follows:
- You describe your table layout in a data definition file
- As data source, you use this data definition file
- In your VB app, you create a ADO recordset. T
- connect the recordset as datasource to the table in the report:
    set   myReport.database.table(x).datasource = myRecordSet

We use this  method in all our reports. It has great advantages because you
have full control of the data that are processed by the report.

There are many examples in the sample applications that Seagate distributed
with the RDC.

Fred



Tue, 18 Dec 2001 03:00:00 GMT  
 HOWTO: Change Datasource from within VB. Urgent Help Needed
I'm not sure if I really understand why I need a data-definition file. Is
this nessessary to be able to change Datasource ?

I cant believe that CR has made a COM Object(or two  :P) which cannot do
this for me. :(.

Is it REALLY impossible for the COM Object to to it ?, is the
Data-Definition file really nessessary (I HOPE to avoid it)




Quote:
> From what I understood, you are using the Report Design Component of CR7.0
> I would suggest that you use the Active Data approach to connect your
> datasource to the report.
> Doing so you have the possibility to hide the type of datasource to the
> report.

> It works as follows:
> - You describe your table layout in a data definition file
> - As data source, you use this data definition file
> - In your VB app, you create a ADO recordset. T
> - connect the recordset as datasource to the table in the report:
>     set   myReport.database.table(x).datasource = myRecordSet

> We use this  method in all our reports. It has great advantages because
you
> have full control of the data that are processed by the report.

> There are many examples in the sample applications that Seagate
distributed
> with the RDC.

> Fred



Fri, 21 Dec 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. combox within datagrid --- need some urgent help

2. combobox within datagrid -- need urgent help

3. Changing reports causes error *** Urgent help needed ***

4. change printer from within a VB module within Access 2000

5. Use odbc32 API calls in VB to list datasources and tables within

6. Help: Howto UnCompress gzip'ed files within VB3

7. Help: Howto UnCompress gzip'ed files within VB3

8. howto: using a COM.dll within VB

9. Help: Howto UnCompress gzip'ed files within VB3

10. Help: Howto UnCompress gzip'ed files within VB3

11. Help with changing system size from within VB

12. Help urgent on change value of text field with VB(A)

 

 
Powered by phpBB® Forum Software