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

Required Export dll's 2

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
0
0
GB
I have written an application that makes use of the CRViewer component (Delphi 5) and am now looking at allowing the user to make use of the 'Export' function. I have read the list of required files in the appropriate help file and have included dll's such as 'U2FHTML.DLL' (HTML Format), 'U2FTEXT.DLL' (Text Format) and 'U2FXLS.DLL' (Excel Format). However when I run the application and click the 'Export' button on the CRViewer component I do not get the list of export formats I expect (I get 'DHTML', 'Text', 'Excel') and get when I run the application on the development machine (with full Crystal Reports install). The target machine does not have an install of Crystal Reports but has the required dll's for database access and use of the CRViewer component (the reports display and print with no problem).
Am I including the right DLL's for the exporting or am I missing something ?
I'm using CR Version 8 on a Windows NT platform.
Thanks in advance.
Steve
 
I mean that I get no list of export formats when I click the button the PC tested on (expect to see list of 'DHTML', 'Text' and 'Excel' for instance).
I wasn't clear in my original posting.
 
StevenK: When you distribute where do you place the U2F*.DLL's as these should be in \windows\crystal David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
dcm : I've tried putting the 'U2F*.DLL' files alongside the application itself and also in the directory \Winnt\Crystal\ with no success in either case. The 'Export' button on the CRViewer does not produce the expected export option lists - i.e. ' HTML', 'Text' and 'Excel' etc.
Any suggestions as to what I'm doing wrong ?
Thanks
 
StevenK: Sorry my mistake! The only supported export options from the CRViewer are RPT, DOC, XLS and in V8 RTF and PDF David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
dcm : I copied all the 'U2F*.DLL' files as suggested and was presented with no options at all when clicking the 'Export' button on the CRViewer - what am I doing wrong ?
 
StevenK: Does you code set up before display the available Export Options? It is not enough just to enable the button but you also need to set the Options David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
dcm : It sounds like this is the step that I'm missing - is this documented in the developer help files or can you give me a pointer with this ?
Thanks.
 
StevenK: Try this from the Developer Help:

MsgBox "Export using prompt"
'We will be prompted for one of the nearly 40 formats
'as well as the destination, delimiter and numerous other values
'because in this first example we have to define all of
'the ExportOptions at run time
Call crystalReport.Export(True)

'and then we do it by setting the export options
Set crystalExportOptions = crystalReport.ExportOptions
crystalExportOptions.CharFieldDelimiter = ","
crystalExportOptions.CharStringDelimiter = "'"
crystalExportOptions.DiskFileName = "Test.tst"
crystalExportOptions.UseReportDateFormat = True
crystalExportOptions.HTMLFileName = "TestHTML.htm"
crystalExportOptions.FormatType = 3
' 0=no format, 1=crystal report, 2=data interchange,
' 3=html, 4=richtext, ... 14=word for windows, and lots of others
' look for CRExportFormatType in the Object Browser

crystalExportOptions.UseReportNumberFormat = True
crystalExportOptions.DestinationType = 1
' 0=no destination,1=diskfile,2=mapi,3=mailVIM,4=MicrosoftExchange
' found under CRExportDestinationType in the Object Browser

Call crystalReport.Export(False)

Let me know how you get on David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
I am using Ver.8.5 but this may apply to 8 as well.

I found that on client machines you must deploy the following DLL's with your app:

(these do NOT require registering)
all U2*.dll's (if you do not have any options under export)
CRXF_PDF.DLL
CRX_RTF.DLL

(these you must register)
CRTSLV.DLL
EXPORTMODELLER.DLL
ATL.DLL

If you are installing your app on a 95/98 machine the ATL.DLL must NOT be the unicode version. I found an ANSI version of this dll on Disc 2 of the Developer's Studio
(ver 3.0.8168.0). While I have not deployed my app on an NT4/2000 machine I assume you can use the Unicode version of the dll there without issue. My development pc is 2000 with that version of ATL.DLL.

Let me know if you have problems with this; I think I put everything in here.

Oliver


 
I too have been struggling with exporting in 8.5 . I have integrated Crystal 7 reports into Delphi with no problem and was looking forward to taking advantage of PDF and real RTF in 8.5 - all other exports work OK but RTF and PDF ask which pages to export and then do nothing. Excuse my complete ignorance in these matters but how to you register the DLLs - using Installshield ? I have looked at the registry entries on my machine with 8.5 installed and could make little sense and I do not want to wreck the machine of someone else by screwing up.
Sorry about being a complete novive in this area but any help very much appreciated

Derek
 
Derek,
Of the following DLL's which are you having trouble registering:

CRTSLV.DLL
EXPORTMODELLER.DLL
ATL.DLL

To regester these manually you would click on START, RUN and type regsvr32.exe CRTSLV.DLL.

When you create you installation package (I don't know how to do it with InstallShield but am sure it is there somewhere) designate these files as ones that require registration. I use the Installer included as part of Visual Interdev 6.0. When you add files to the package you simply assign the "Register" property to "1-vsifrSelfReg."

Hope this helps, if not let me know what additional information you may need.

Oliver
 
Many thanks for prompt reply
If only Installshield were so user-friendly! You seem to have to type the registration enties and as I explained looking at the entries for the DLLs in regedit left me no wiser.
Are you saying that if I put the DLLs in the win\system folder the user could type regsvr32.exe for each DLL and it would resolve the issue ? Its very difficult to test when my machine has Crystal installed .

Derek

 
Derek,

Sure, you should be able to use regsvr32. That's how I did it on a lab pc prior to creating an installation package. But if you have more than one pc upon which you must install your application this could become tedious. If you have a copy of Visual Studio then you have a copy of Visual Interdev. I looked at InstallShield as well, but gave up in favor of the VB Package Wizard and ultimately the Installer that is part of Interdev. The latter is quite good and easy to use. I'd recommend it if you have the software.

The Visual Basic Package and Deployment Wizard works OK, but is a bit of a pain when you want to include multiple ancillary files.

Oliver
 
Many thanks - being a Delphi freak I have never dabbled in VB its taken me all my time to wean myself from Clipper! I will certainly give the regsvr32 a go on the machine of an understanding friend.

Derek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top