lindalim
asked on
Export .rpt reports to pdf, txt, excel etc using vb 6
Hi, i would like to export .rpt files to pdf, txt, excel etc using vb 6. In VB 6 i have use the crystal report viewer 9 to open the crystal report. By rite the viewer should already have the ability to export files to other formats but dun noe y, my viewer in vb 6 dun have the export icon. Can somebody tell mi how can i get the icon or give mi the codes to help export the rpt files to other format. Tks alot... Pls reply ASAP. Tks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
the EnableExportButton is a property of the crveiwer9.dll
The dll's that need to be installed vary on what you want to be able to support.
examples:
crxf_pdf.dll to support pdf
crxf_xls.dll to support excel
crxf_wordw.dll to support msword
crxf_rtf.dll to support rich text format
or is the complete runtime environment dll that you are after ?
The dll's that need to be installed vary on what you want to be able to support.
examples:
crxf_pdf.dll to support pdf
crxf_xls.dll to support excel
crxf_wordw.dll to support msword
crxf_rtf.dll to support rich text format
or is the complete runtime environment dll that you are after ?
ASKER
sorry but what is runtime environment dll... Can i get all this dll from the cr9 installtion cd?
the runtime environment dll is not just 1 but all the dll's needed to actually deply your application to other computers that do not have cr9.
All dll's are on the installation cd, but i depends on the version of cr9 you have (professional, advance).
Using the package & deployement tool of VB6 will give you most of the required dll in the setup.lst file. But it cannot always find the depency files.
Make sure you create the package on the lowest system you will be using (ie, windows98se). Otherwise you will not get the unicows.dll file.
I you need to get some help on which files should be included, i could give you an example of one of my setup.lst files that runs nicely on w98se, w2k and xp...
All dll's are on the installation cd, but i depends on the version of cr9 you have (professional, advance).
Using the package & deployement tool of VB6 will give you most of the required dll in the setup.lst file. But it cannot always find the depency files.
Make sure you create the package on the lowest system you will be using (ie, windows98se). Otherwise you will not get the unicows.dll file.
I you need to get some help on which files should be included, i could give you an example of one of my setup.lst files that runs nicely on w98se, w2k and xp...
*** advertising removed by Netminder, EE Admin ***
Glad I could help
mlmcc
mlmcc
Dear Friends,
Two files CRXF_RTF.DLL is install on my system in 'c:\windows\crystal' directory. When i'm trying to export, i can select the format as "text", but the destination options is giving only in 3 formats ie., a. lotus domino, b. mapi & c. Exchange folder.
Please guide me how to configure my crystal reports to get destination options as "Disk File" and "Application"
With regards and thanks in advance.
Rajendra
Two files CRXF_RTF.DLL is install on my system in 'c:\windows\crystal' directory. When i'm trying to export, i can select the format as "text", but the destination options is giving only in 3 formats ie., a. lotus domino, b. mapi & c. Exchange folder.
Please guide me how to configure my crystal reports to get destination options as "Disk File" and "Application"
With regards and thanks in advance.
Rajendra
rajendra_adari - I know the new interface is difficuly but you need to ask your own questions.
mlmcc
mlmcc
How can I export my rpt files into a lst format?
With thanks in advance,
Cornel
With thanks in advance,
Cornel
mca7101
As explained to rajendra_adari - you need to ask your own questions
mlmcc
As explained to rajendra_adari - you need to ask your own questions
mlmcc
Hi,
I am using crystal report v8.5
I click on the export icon & select Acrobat Format (PDF) as Format and Disk File as Destination.
I am not prompted the dialog box "Choose Export File" as to where the file should be saved? Which correct .dll file do I require so that it prompts where to save the file?
Can anyone help me out?
Thanks & Regards,
Rajesh.
I am using crystal report v8.5
I click on the export icon & select Acrobat Format (PDF) as Format and Disk File as Destination.
I am not prompted the dialog box "Choose Export File" as to where the file should be saved? Which correct .dll file do I require so that it prompts where to save the file?
Can anyone help me out?
Thanks & Regards,
Rajesh.
Please ask your own questions.
mlmcc
mlmcc
I am using vb 6 with the version of crystal reports that comes with that. I have the export to email button option when i display a report in vb however this button does nothing when clicked. Why is that? the button works in actual crystal reports itself.
Is that a missing dll problem? also if so where can i get the dll files from i have been lookin all over the internet and cant seem to find them.
Thanks!
Is that a missing dll problem? also if so where can i get the dll files from i have been lookin all over the internet and cant seem to find them.
Thanks!
Hello,
I would like to export .rpt files to pdf using vb 6. In VB 6 i have use the crystal report 8 to open the crystal report. I want to add 2-3 reports in a single report. is it possible to do like this? Can somebody give me the codes to help export the rpt files to pdf format. Thanks alot...
Plz. Reply.
I would like to export .rpt files to pdf using vb 6. In VB 6 i have use the crystal report 8 to open the crystal report. I want to add 2-3 reports in a single report. is it possible to do like this? Can somebody give me the codes to help export the rpt files to pdf format. Thanks alot...
Plz. Reply.
davidvanrensburg & SahirProjects
Please ask your own questions.
mlmcc
Please ask your own questions.
mlmcc
Hi
I am trying to export to PDF a Crystal Reports 8.5 Report using Vb6 Code. I already made to work with the code i have written, but everytime i call the code, and the process of exporting starts i am prompted with the window of the database Logon.
Although i have already edited the report and saved the connection inside the report, i am always prompted with the logon when exorting in VB6.
If i set the logon information, the report in attached on an email in a PDF format.
The problem is i can't put it to release with that bug, because of the end-users. They can't possibly now what the logon information is.
Can anyone help me...
Thanks
RickySantos
P.S. If asked i will display the code.
I am trying to export to PDF a Crystal Reports 8.5 Report using Vb6 Code. I already made to work with the code i have written, but everytime i call the code, and the process of exporting starts i am prompted with the window of the database Logon.
Although i have already edited the report and saved the connection inside the report, i am always prompted with the logon when exorting in VB6.
If i set the logon information, the report in attached on an email in a PDF format.
The problem is i can't put it to release with that bug, because of the end-users. They can't possibly now what the logon information is.
Can anyone help me...
Thanks
RickySantos
P.S. If asked i will display the code.
RickySantos
Please ask your own questions.
mlmcc
Please ask your own questions.
mlmcc
RickySantos:
i hope this helps
i hope this helps
Private Function RptSpooler(reportname As String, p_cod_bank As String, p_cod_branch As String, p_dat_proc As String, p_nam_bank As String, _
p_nam_branch As String, p_user_id As String, p_session_id As String, strDestPath As String) As Boolean
Dim CrApp As CRAXDRT.Application
Dim CrRep As CRAXDRT.Report
Dim myDatabase As CRAXDRT.Database
Dim myDbTables As CRAXDRT.DatabaseTables
Dim myDbTable As CRAXDRT.DatabaseTable
Dim mySections As CRAXDRT.Sections
Dim mySection As CRAXDRT.Section
Dim mySubreport As CRAXDRT.Report
Dim mySubreportObject As CRAXDRT.SubreportObject
Dim myParameterfields As CRAXDRT.ParameterFieldDefinitions
Dim myparamfield As CRAXDRT.ParameterFieldDefinition
Dim crEFTTXT As CRAXDRT.CRExportFormatType
Dim i As Integer
Dim j As Integer
Dim x As Integer
''''''''' On Error GoTo cError
Set CrApp = New CRAXDRT.Application
Set CrRep = CrApp.OpenReport(reportname) ' ("C:\flexcube\host\rptdefn\GL008.rpt")
Set myDatabase = CrRep.Database
Set myDbTables = myDatabase.Tables
'Set myDbTable = myDatabase.Table
CrRep.DiscardSavedData
' CrRep.ParameterFields.GetItemByName("p_cod_bank").AddCurrentValue "44"
' CrRep.ParameterFields.GetItemByName("p_cod_branch").AddCurrentValue p_cod_branch
' CrRep.ParameterFields.GetItemByName("p_dat_proc").AddCurrentValue "01/05/2008"
' CrRep.ParameterFields.GetItemByName("p_nam_bank").AddCurrentValue p_nam_bank
' CrRep.ParameterFields.GetItemByName("p_nam_branch").AddCurrentValue p_nam_branch
' CrRep.ParameterFields.GetItemByName("p_user_id").AddCurrentValue p_user_id
' CrRep.ParameterFields.GetItemByName("p_session_id").AddCurrentValue p_session_id
'CRViewer91.ReportSource =
i = 1
For i = 1 To myDbTables.Count
myDbTables(i).SetLogOnInfo DSN, DSN, uname, pwd
Next i
Set mySections = CrRep.Sections
For Each mySection In mySections
For x = 1 To mySection.ReportObjects.Count
If mySection.ReportObjects(x).Kind = crSubreportObject Then
Set mySubreportObject = mySection.ReportObjects(x)
Set mySubreport = mySubreportObject.OpenSubreport
Set myDatabase = mySubreport.Database
Set myDbTables = myDatabase.Tables
j = 1
For j = 1 To myDbTables.Count
myDbTables(j).SetLogOnInfo DSN, DSN, uname, pwd
Next j
End If
Next x
Next mySection
Set myParameterfields = CrRep.ParameterFields
For Each myparamfield In myParameterfields
With myparamfield
Select Case .ParameterFieldName
Case "p_cod_bank"
.SetCurrentValue p_cod_bank
Case "p_cod_branch"
.SetCurrentValue p_cod_branch
Case "p_dat_proc"
.SetCurrentValue p_dat_proc
Case "p_nam_bank"
.SetCurrentValue p_nam_bank
Case "p_nam_branch"
.SetCurrentValue p_nam_branch
Case "p_user_id"
.SetCurrentValue p_user_id
Case "p_session_id"
.SetCurrentValue p_session_id
End Select
End With
Next
CrRep.EnableParameterPrompting = False
CrRep.ExportOptions.FormatType = crEFTText 'crEFTPortableDocFormat
CrRep.ExportOptions.DestinationType = crEDTDiskFile
CrRep.ExportOptions.DiskFileName = strDestPath
CrRep.Export (False)
' mySection = Nothing
'mySubreport = Nothing
'mySubreportObject = Nothing
Set CrApp = Nothing
Set CrRep = Nothing
' myDbTables = Nothing
'mySections = Nothing
'myParameterfields = Nothing
'myparamfield A = Nothing
'myDbTable = Nothing
'myDatabase = Nothing
RptSpooler = True
'cError:
' If Err.Number <> 0 Then
' MsgBox Err.Description, vbCritical
' Exit Function
' Else
' Me.Caption = Me.Caption + " ..Getting Report data"
' End If
End Function
The availability of items in the Export Format and Export Destination dropdowns is dependant
on the dlls present.
u2dmapi.dll gives Export destination : MAPI - (Email)
u2ddisk.dll gives Export destination : Disk file
Check folder C:\Program Files\Common Files\Crystal Decisions\2.5\bin for CR10
Check folder C:\Program Files\Business Objects\Common\3.5\bin for CR XI
to see if the dll's are present
on the dlls present.
u2dmapi.dll gives Export destination : MAPI - (Email)
u2ddisk.dll gives Export destination : Disk file
Check folder C:\Program Files\Common Files\Crystal Decisions\2.5\bin for CR10
Check folder C:\Program Files\Business Objects\Common\3.5\bin for CR XI
to see if the dll's are present
ASKER