specifying the report file name? 
Author Message
 specifying the report file name?

Hello,

I want to use the report viewer in my VB application to display a
Crystal Report. In previous verions, I used the OCX which allowed me
specify the report file name at runtime (for example,
myReport.reportfilename = "c:\myCrystalRpt").

However, so far, using the report viewer, I seem only to be able to
specify the file name at design time.

Is there any way to do this at runtime?

Thanks,
- Gillian.

Sent via Deja.com
http://www.*-*-*.com/



Tue, 29 Jul 2003 20:25:34 GMT  
 specifying the report file name?
Try this code, assuming you are using a CRViewer control:

Dim rdApp As CRAXDRT.Application
Dim rpt As CRAXDRT.Report
Set rdApp = CreateObject("Crystalruntime.application")
Set rpt = rdApp.OpenReport("C:\MyReport.rpt")
CRViewer.ReportSource = rpt
CRViewer.ViewReport

...
George
GridLinx Software    Programming Tools for VB Programmers
http://www.gridlinx.com


Quote:
> Hello,

> I want to use the report viewer in my VB application to display a
> crystal report. In previous verions, I used the OCX which allowed me
> specify the report file name at runtime (for example,
> myReport.reportfilename = "c:\myCrystalRpt").

> However, so far, using the report viewer, I seem only to be able to
> specify the file name at design time.

> Is there any way to do this at runtime?

> Thanks,
> - Gillian.

> Sent via Deja.com
> http://www.deja.com/



Wed, 30 Jul 2003 03:35:21 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. setting a printer to print to a file and specify a file name

2. How to specify default file name ?

3. Print to .prn file with specified name

4. Specifying a different name for a file download

5. How to specify name for email attachement file

6. Crystal Reports - relative path in report file name

7. Crystal Reports ANd VB 6.0 Printing reports using CRPEAUTO Object, specifying paper orientation problem

8. Printing Reports To A Printer Other Then one specified with report Switching Portrait / Landscape

9. IMPOSSIBLE:Specifying a file name for Printing a report to ... a file

10. Can't Get full File name for Long file names

11. using a variable to specify field name in dlookup function

 

 
Powered by phpBB® Forum Software