Crystal Report Path 
Author Message
 Crystal Report Path

Hello everyone,
i have made a Crystal Report in my application, and i am populating the
contents of the report from a MS access database, therefore i have to
specify a path for the MS Access database...
Everything goes fine... but when i try to move the application to another
computer and continue to work on it, i have to change the path to the
correct path on another computer everytime...
Is there anyway the application itself will know where the database is kept?
(I always put the mdb file togetherwith the applicationin the same
directory)

Thanks,
Tony



Mon, 12 Dec 2005 12:31:16 GMT  
 Crystal Report Path
Hello there,
I have tried your method but it gives me an error that says:
MyReportOcx.Database is read only...
therefore i can't assign teh path to the database into it via the code...
Is there anything missing?
Thanks
Tony


Mon, 12 Dec 2005 20:37:52 GMT  
 Crystal Report Path


Quote:
> Hello there,
> I have tried your method but it gives me an error that says:
> MyReportOcx.Database is read only...
> therefore i can't assign teh path to the database into it via the code...

Hm, try with

MyReportOcx.DataFiles(0) = <path>

I probably gave you the wrong collection ;-)
Regards,
Tomislav Kralj



Mon, 12 Dec 2005 21:02:30 GMT  
 Crystal Report Path
Hi Tony, I use this code for me app

    With CrystalReport
        .ReportFileName = "C:\XXXXXX.rpt"
        .DataFiles(0) = dbPath 'This is the path of db Access Table (for
each dbtable in your report)
        .DataFiles(1) = dbPath
        .
        .
        .
        .DataFiles(X) = dbPath
        .CopiesToPrinter = 1
        .Destination = crptToPrinter
        .PrintReport
        If .LastErrorNumber <> 0 Then MsgBox "Errore n " &
.LastErrorNumber& ": " & .LastErrorString
    End with

Bye bye



Quote:
> Hello there,
> I have tried your method but it gives me an error that says:
> MyReportOcx.Database is read only...
> therefore i can't assign teh path to the database into it via the code...
> Is there anything missing?
> Thanks
> Tony



Mon, 12 Dec 2005 22:29:42 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Crystal reports path

2. Crystal report path

3. Crystal Reports - relative path in report file name

4. Can you define report path for crystal reports?

5. Printing Crystal Reports without Crystal Control ActiveX or Crystal Reports API call

6. Crystal Reports and Path to DB

7. Crystal Report: DB Path manipulation in VB code

8. changing .mdb path in crystal report using vb 4.0

9. Image Path's & Crystal Reports

10. Set the Data Link File path in crystal report by Visual Basic coding

11. .mdb file path in crystal report

12. changing .mdb path in crystal report using vb 4.0

 

 
Powered by phpBB® Forum Software