VB and Crystal Report problem

Ziko
12-17-2002, 07:40 AM
Hi,
I have designed my reports in the designers in VB Application.
I set up the fields of the reports at design time to get there values from a specific database.
The problem is that I can't set the database location 'Same as
Report' because the designers are included with the VB app.
Is there a way to set the database location of a Crystal report designer at run time?
Or any other way to change the path relatively at run time?

I really appriciate any help
Thanks

anhmytran
12-17-2002, 08:03 AM
My Crystal Reports designer is separated and independent
from VB.
However, the path of the source database is witin the reports.
The Database and the Reports can be shared throughout the
LAN.
That is the reason by now I have no idea of how to change
the path of the database in run time.

Ziko
12-17-2002, 08:21 AM
I had my reports separated and I had no problem with the path.
The reports and the database were shared throughout the LAN. But I had to move my reports and include them into VB so I can
change the logo dynamically to the choice of the user and include
other VB code and format the sections at run time. But then I get this database location poblem and the option 'Same as Report' is disabled when the reports are designed in VB.
I know the database path at run time but the problem is how to assign it to the report?

holtzy
12-24-2002, 09:48 AM
I'm trying to figure out something similar right now. Try Dim Report As New CrystalReport1
Report.Database.SetDataSource YourRecordset or is this even what you are asking?

Optikal
12-24-2002, 10:28 AM
I do it the way holtzy said, you just have to add a database to the designer, and go to More Data Sources -> Active Data -> Active Data (Field Definitions Only). Then either point to an existing ttx file, or create a new one that describes the format of the recordset you will be passing to it at runtime.

anhmytran
12-24-2002, 11:49 AM
Please, come to my post:
http://www.visualbasicforum.com/showthread.php?s=&threadid=53590&highlight=location

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum