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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Eliminating Export Option Dialog

Status
Not open for further replies.

cccruz18

Programmer
Jun 11, 2002
16
PH
The application exports reports to disk. Everything works fine except that a dialog box appears that asks if you want to export all or certain pages. I would like to suppress this dialog. I thought that setting the export = false would do this but it does not. Here is a brief sample of my code.
ORpt.Database.Tables(1).SetPrivateData 3, rstCreateReport
ORpt.ExportOptions.FormatType = 4
ORpt.ExportOptions.DestinationType = 1
ORpt.ExportOptions.DiskFileName = vPathApplication ORpt.Export False
 
That should work. What's vPathApplication set to? The variable name suggests just a path. It should be a full file name.
What's type 4? I can't find a match in the object browser. Andrew Baines
Chase International
 
ORpt.ExportOptions.FormatType = 4 '### Disk
ORpt.ExportOptions.DestinationType = 1 '### Rich Text Format
ORpt.Export False

We'd already tried this but still doesn't suppress the export option dialog box <contains number of pages to export>.

We have used Crystal Report Ver7 to design reports.
Users with Crystal Viewer of the same version doesn't have any problems in the export option. However, with Crystal Viewer Ver8, the export option is shown upon running VB application.

Do we need to add more commands to suppress the dialog box?
What command shall we use to define the number of page that the crystal should export?

Thanks in advance.
 
Sorry - it should work. I'm using 8.5 and destinationType 1 has been superceded by type 35 - ExactRTF.
Try it with a different export type. Andrew Baines
Chase International
 
I'd tried
ORpt.ExportOptions.DestinationType = 35 '### ExactRTF
But I get
30012:Invalid enum value.

Please help(again).
 
You're using 8.0, so ExactRTF didn't work (good reason to upgrade!).
What happens if you use word or excel as a destination? Andrew Baines
Chase International
 
The same happens when I use word or excel as a destination.
Time problem if we upgrade. Is there any way that we could just add or change our command line?




 
Is there any command that we could set number of pages exported to all? Maybe this could suppress the export option?
Please help...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top