Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Exporting Crystal Report To MSexel Using VB6.0


The crystal report is exported to MSExel.
If it is exported to Exel5.0(XLS) then it shows in tabular & well formed but if it is exported to Exel5.0(XLS)(Extended) then it is not shown in tabular form. The first row of exel containg Date,Report title,Page no.,and Cloumn Headings.Remaining data shows one by one row.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Crystal Report 8.5 Error While Exporting A Report In PDF Format
can anybody help me??
I have generated one report in crystal report 8.5 .Now crystal report is giving a facility to export it in different file formar like excel,PDF,RTF.Here I am facing one problem I am able to export the report in all file format except PDF and RTF.When I am selecting a PDF file format it is asking me for disk file, MAPI .After this i select the disk file option ,then its asking me for all pages or range of pages.After this nothing is appearing on the screen...

Can anybody please help me..

Dll Used In Exporting A Crystal Report Into Pdf
I am having problems exporting crystal report into pdf format... while exporting, a runtime error occurs and the whole application shuts down.

Can any one tell me which dlls are used when we export a crystal report to pdf into vb exe... It would mean a lot...

Thanks in advance.

Exporting Crystal Report To .rpt And .xls
Hey guys, I need help quick. I came up with some reports in Crystal Report Designer and now have to export them to .rpt and .xls ? I have deadline to meet and it was yesterday. Please help !

Exporting Crystal Report
Hello!

Is it possible to export Crystal Report to Word or html pragrammatically throught VB application???

Thanks in advance.

Exporting A Crystal Report
I want to allow users to export a crystal report from this VB 6.0 app (I am using the RDC and Crystal Viewer) isn't there an Export button I can add or do you have any pieces of code I can see as to how I can export a report to Word or Excel????

Much Obliged.

Exporting Crystal Report Using VB6
We have hesitated to upgrade our current VB6 app that runs and exports Crystal Reports because we are eventually going to retire it in favor of 3rd party software that will do it for us. In the meantime I have been tasked to move our VB6 app that runs and exports our reports to one of our main servers for security and other varous reasons.

Locally we are using a Crystal Reports 9.0. Our VB6 app runs and exports our reports using this version. Our server we are trying to move it to has Crystal XI installed. I had to make some adjustments because of this (Late Binding) to help make this work, but I have one bug I cannot figure out. The app fails on this piece of code

rep.Export (False)

Rep obviously representing the open report object. I get a message such as this "Method '~' of object '~' failed"

This works locally using Crystal 9.0 but cannot figure out what the syntax is to get it to export in Crystal XI

If any one can offer a suggestion I would greatly appreciate it.

Thanks,

-Chris


About Exporting The Crystal Report To PDF
can any body help exportig a dsr (i.e. displayed by the Crystal Report Viewer Control) to Acrobat Reader (PDF) Format.


Pl Help

Upen

Exporting A Crystal Report To PDF
Hi, as usual, I am aware this is a very slow forum, but nonetheless, when I am stuck and search reveals nothing, then I'll try my luck here. Who knows, I may get what I want.

I use CR8, VB6 and SQL Server 2000.

I am trying to export a report to PDF format which I want to email at a scheduled time every day.

First part is already a problem, so I am not even asking for the email part right now.

I use the CrystalReport control to display reports, not the CRViewer or CRAXDRT. I don't know the pros and cons for either, I just found the company uses this system. Coding Crystal in VB6 is complicated enough, God knows I don't need to complicate my head further by learning all the options, esp when the literature is so scarce.

Having gotten that off, I borrowed this code from an old post here:
Code:Dim CrApp As Craxdrt.Application
Set CrApp = New Craxdrt.Application
Dim CrRep As Craxdrt.Report
Set CrRep = CrApp.OpenReport(sReportName) With CrRep.ExportOptions
.DestinationType = crEDTEMailMAPI
.FormatType = crEFTPortableDocFormat
.DiskFileName = App.Path & "
eportsExportTest.pdf"
End With
CrRep.Export (False)
Set CrRep = Nothing
Set CrApp = Nothing

The message I get is that there is a missing or outdated DLL. Some other post mentioned that for CR8, a dll called U2FPDF may be installed in the Crystal folder to support the export. I downloaded it all right but could not register it. The message was "File loaded but entry point could not be found."

The gist of my prob is: I want to be able to export reports to PDF using my current setup: VB6, CR8, and the CrystalReport control. How can it be done?

GoodGuy
Experience is a bad teacher for its exams precede its lessons.

Edited by - GoodGuy on 11/27/2007 11:05:04 PM

Exporting A Crystal Report
I am trying to export a Crystal Report to an Acrobat .pdf file format. When
I run it from my machine, it works just fine. When I try it from the client
machine, it comes up with the error:

-2147190908
Failed to Export the Report

I've looked on Crystal's support site, but it give me solutions for the
error when using ASP or HTML. I've tried the solutions they give for those,
but I still have the same problem.

Can anyone give me any suggestions?

Exporting Crystal Report
hi ppl,

i am using the crystal report inside .Net. however when i export the report into a pdf format, i experience "page not found" error.
does this sound familiar to anyone?
pls advice.


regards
ahkok

Error While Exporting A Crystal Report
I am getting the following error when trying to export a crystal report to PDF format.
Run-time error '-2147190908 (80047784)'
Failed to export the report

It works fine on my machine, but the error occurs when running on clients machine. I know the problem isn't with the code but with some .dll file.

Code:
Crystal.ReportFileName = strPath & "Quote.rpt"
Crystal.DataFiles(0) = strPath & "QuoteSystem.mdb"
Crystal.SelectionFormula = "{Quote.QuoteNo} = " & cboQuoteNo.Text
Crystal.PrintFileName = QuoteLocation & ".rpt"
Crystal.PrintFileType = crptCrystal
Crystal.Destination = crptToFile
Crystal.PrintReport

Dim CRXApplication As Object, CRXReport As Object, _
CRXExportOptions As Object

Set CRXApplication = CreateObject("CrystalRuntime.Application")
Set CRXReport = CRXApplication.OpenReport(Crystal.PrintFileName)
Set CRXExportOptions = CRXReport.ExportOptions
CRXExportOptions.FormatType = crEFTPortableDocFormat
CRXExportOptions.DestinationType = crEDTDiskFile
CRXExportOptions.DiskFileName = Left(Crystal.PrintFileName, Len(Crystal.PrintFileName) - 3) & "pdf"
CRXReport.DisplayProgressDialog = False
CRXReport.Export False
Set CRXExportOptions = Nothing
Set CRXReport = Nothing
Set CRXApplication = Nothing

rsQuoteHdr!FileLocation = Left(Crystal.PrintFileName, Len(Crystal.PrintFileName) - 3)
rsQuoteHdr.Update
lbLoc.Caption = rsQuoteHdr!FileLocation

Kill Crystal.PrintFileName

Problem In Exporting Crystal Report
Dear all
I have problem in exporting Report from VB into Excel format
Have used Crystal Report 8.0
have used CRViewer to view the report

There is a save button on viewer form

on save button

Report10.Export

is written

but no records are shown in Xl file.

What could be the probable cause ?

Please help me in solving this issue as early as possible

thanks
swapnalee

Error In Exporting Crystal Report
I have problem in exporting Report from VB into Excel format
Have used Crystal Report 8.0
have used CRViewer to view the report

There is a save button on viewer form

on save button

Report10.Export

is written

it gives me error invalid directory

What could be the probable cause ?

Please help me in solving this issue as early as possible

thanks
swapnalee

Programmatically Exporting From Crystal Report To Pdf Using VB
Hi,

I am developing an application in VB using crystal report. I have a situation where I will like to use export in crystal report, I don't want to manually export to pdf in the crystal report of the application, I want a suitation where from a command button, I can programmatically use the export to convert my crystal report to a pdf format. I mean exporting to pdf.

I hope my question is very clear and understandable.



thanks



Oresanya Olusesan B
Information Communication Technology (ICT)
EIB International Bank PLC(Formerly EKO International Bank)
Alausa, Ikeja Lagos
Office:234-01-4934368
Mobile :08023468221

Exporting To PDF From VB6 Using Crystal Report Control
Hey everybody,
I was using Crystal Report control in VB6 applications which allows to export to PDF provided that DLLs are installed on the client machines or the server the applications runs from
I need to be able to do it from code and that is the one I am trying to use:
    
Set appl = New CRAXDRT.Application
Dim rep As CRAXDRT.Report
Dim crxTable As CRAXDRT.DatabaseTable

Set rep = appl.OpenReport(CrystalReport1.ReportFileName, 1)
 
rep.ExportOptions.FormatType = crEFTPortableDocFormat
rep.ExportOptions.DestinationType = 1
rep.ExportOptions.DiskFileName = "c:Test.PDF"
rep.Export False


It all works fine(I check in Immediate Window it finds the report with all the data) till the last line
There it gives an error message:

2147192184(80047288)
"Server has not yet been opened"

I have tried different approaches including using
LogOnToServer method:

rep.Database.LogOnServer "P2SSQL.DLL", "S600Q24", Mydb,MyUserName,MyPassword

It logs on to the server but the error still occurs on Export line


Any ideas on that will be greatly appreciated.

Cheers!

Crystal Report Exporting Issue
Hi,
I copied an image on Crystal Report 8.0 and called it from VB6. When i exported it in Excel, data properly exported but not the images.

How can be it possible that image also exported ?



Thanks

Exporting A Listview Items To Crystal Report
hi, can anyone knows how to export a 'listview' table from vb application to a report, i am using 'crystal reports 8.5'?

Exporting Crystal Report To Word Document
hi

how to export crystal report into word document in the same format as created?

is any coding required or crystal report will directly export it into word document?

how to insert tables into crystal report & can exported report will retain same tabular format?

thank you

RESOLVED --> Error When Exporting A Crystal Report Using VB
On my clients machine I keep getting error:
-2147190548
Missing or out-of-date export dll
[highlight=VB]
Dim CRXApplication As Object, CRXReport As Object, _
CRXExportOptions As Object

Set CRXApplication = CreateObject("CrystalRuntime.Application")
Set CRXReport = CRXApplication.OpenReport(Crystal.PrintFileName)
Set CRXExportOptions = CRXReport.ExportOptions
CRXExportOptions.FormatType = crEFTPortableDocFormat
CRXExportOptions.DestinationType = crEDTDiskFile
CRXExportOptions.DiskFileName = Left(Crystal.PrintFileName, Len(Crystal.PrintFileName) - 3) & "pdf"
CRXReport.DisplayProgressDialog = False
CRXReport.Export False
Set CRXExportOptions = Nothing
Set CRXReport = Nothing
Set CRXApplication = Nothing[vbCode]
What file do I need to update?

RESOLVED --> Error While Exporting A Crystal Report
I am getting the following error when trying to export a crystal report to PDF format.
Run-time error '-2147190908 (80047784)'
Failed to export the report

It works fine on my machine, but the error occurs when running on clients machine. I know the problem isn't with the code but with some .dll file.
Code:

Crystal.ReportFileName = strPath & "Quote.rpt"
Crystal.DataFiles(0) = strPath & "QuoteSystem.mdb"
Crystal.SelectionFormula = "{Quote.QuoteNo} = " & cboQuoteNo.Text
Crystal.PrintFileName = QuoteLocation & ".rpt"
Crystal.PrintFileType = crptCrystal
Crystal.Destination = crptToFile
Crystal.PrintReport

Dim CRXApplication As Object, CRXReport As Object, _
CRXExportOptions As Object

Set CRXApplication = CreateObject("CrystalRuntime.Application")
Set CRXReport = CRXApplication.OpenReport(Crystal.PrintFileName)
Set CRXExportOptions = CRXReport.ExportOptions
CRXExportOptions.FormatType = crEFTPortableDocFormat
CRXExportOptions.DestinationType = crEDTDiskFile
CRXExportOptions.DiskFileName = Left(Crystal.PrintFileName, Len(Crystal.PrintFileName) - 3) & "pdf"
CRXReport.DisplayProgressDialog = False
CRXReport.Export False
Set CRXExportOptions = Nothing
Set CRXReport = Nothing
Set CRXApplication = Nothing

rsQuoteHdr!FileLocation = Left(Crystal.PrintFileName, Len(Crystal.PrintFileName) - 3)
rsQuoteHdr.Update
lbLoc.Caption = rsQuoteHdr!FileLocation

Kill Crystal.PrintFileName

Problem Exporting Crystal Report To HTML
I'm having trouble exporting a Crystal Report to HTML. I can export the same report to other formats, but I get "Failed to export the report." error with the HTML export. A funny thing is that if I change the "Model.Export False" to "Model.Export True" and walk through exporting to HTML, it will work just fine. However, there are several export file formats that I do not currently support, so I don't want the user to see those export options.

I'm using CR 8.5 and VB6, if that helps.

Here's my code:

Code:Private Report As CRAXDRT.Report

more code....

Private Sub mnuExport_Click()
On Error Goto Err_routine
 
  ' Get the export file name
  dlgFileSave.ShowSave
 
  ' Export to file
  Report.ExportOptions.DestinationType = crEDTDiskFile
    
  Select Case dlgFileSave.FilterIndex
    Case 1
      Call ExportHTML(dlgFileSave.FileName)
    Case 2
      Call ExportRTF(dlgFileSave.FileName)
    Case 3
      Call ExportText(dlgFileSave.FileName)
    Case 4
      Call ExportWord(dlgFileSave.FileName)
  End Select
  
  ' Export without promting the user
  Report.Export False

Exit_routine:
  Exit Sub

Err_routine:
  If Err.Number = 32755 Then GoTo Exit_routine ' Cancel import if cancel button selected
  Call ErrorIn("frmReportViewer.mnuExport_Click", , EA_HANDLERS)
  Call HandleError
  Resume Exit_routine
  
End Sub

Private Sub ExportHTML(strFileName As String)
  Report.ExportOptions.HTMLHasPageNavigator = True
  Report.ExportOptions.HTMLEnableSeparatedPages = True
  Report.ExportOptions.HTMLFileName = strFileName
  Report.ExportOptions.FormatType = crEFTHTML40
End Sub

Private Sub ExportText(strFileName As String)
  Report.ExportOptions.DiskFileName = strFileName
  Report.ExportOptions.FormatType = crEFTText
End Sub

Private Sub ExportWord(strFileName As String)
  Report.ExportOptions.DiskFileName = strFileName
  Report.ExportOptions.FormatType = crEFTWordForWindows
End Sub



Edited by - gpraceman on 2/28/2004 9:06:18 PM

Error While Exporting Crystal Report To A File.
I am working with Crystal Reports 9. I am using RDC and Report viewer control in VB to Preview and save my crystal Reports.

Here is the piece of code for exporting the report to a file:
The following code works fine

report.ExportOptions.DestinationType = crEDTDiskFile
report.ExportOptions.DiskFileName = "c:sample.txt"
report.ExportOptions.FormatType = crEFTText

report.export False

Problem comes with this code:

report.ExportOptions.DestinationType = crEDTDiskFile
report.ExportOptions.DiskFileName = "c:sample.txt"
report.ExportOptions.FormatType = crEFTTabSeparatedValues

report.export False

Whenever I user some other format type other than crEFTText. I get the following error:

Run time Error ........
Error in file? or
Missing or out-of-date export DLL

Can anyone help in this regard. Why i am getting this error. I need to save the report in many format types.

Pls. do help me with this.

suresh gade

Crystal Report Exporting (interesting Problem)
hi friends !

i am using Crystal Reports 8.5, VB 6 on win 95
i m trying to export the report to HTML format.

the options for html available are.....
crptHTML30
crptHTML32Ext
crptHTML32Std

there is no problem with any format other than html.
it works fine when exported to word or excel.

crystal report 8.5 supports html 3.2 and html 4.0 (dhtml)
For this i installed Internet explorer 5.5, inspite of all this it is not working.

my code is.....

Code:Crystalreport1.DiscardSavedData = True
Crystalreport1.ReportFileName = App.Path & "abc.rpt"
Crystalreport1.PrintFileType = crptHTML30
Crystalreport1.PrintFileName = App.Path & "ReportsReport1 " & Format$(Date, "dd-mm") & ".html"
Crystalreport1.Destination = crptToFile
Crystalreport1.Action = 1

on executiong the last line it gives an error.
saying......
run time error: 20692
Error in file c:xyzabc.rpt
Invalid Export Dll of Export Format.

reports are developed using crystal report 4.5 and convereted to cr 8.5

What could be the problem..and how do i solve it. please help.


Noorali

Exporting Crystal Report Don't Work On W2000 Nor XP
I have the same problem on W2000 and XP. On W9x worked OK.
Have you found a solution?

I'will appreciate your answer.

Exporting A Crystal Report File To PDF Or Word Document
I am working on a vb6 application. I have a report viewer control in a form which I use to view crystal report files. I would like to know how I could export these reports to pdf or a word document through Vb. How is this possible.
Help Needed

Nisean

Exporting Crystal Report To Word Using Visual Basic
Hi experts,

When I export crystal report to word file the records are displayed properly but the Lines and Boxes that are used in the Crystal report are not displayed in the word file .please advice...

Exporting Crystal Reports 10.0 Report To Excel Using CRViewer In VB6
I have a VB6 application that connects to an SQL Server 2000 database that is sold to clients with Crystal Reports (developed in CR10.0) imbedded in the program. On my development machine (which has CR10 installed on it) all of the exporting functions work properly. When I deploy to the client they get a VBCritical Error message "Failed to Export the Report" when they try to Export the reports using the "Excel 97 - 2000" option, the "Excel 97 - 2000 (data only)" option does not generate the error message. I have gone over the list of dll's and honestly have no idea as to what I am missing. I am thinking that it has to be a dll issue but I cannot find any documentation from CR anywhere regarding which dll does what. The crxf_xls and crxf_xls_res_en dlls are in my install package along with a whole host of others from Crystal Reports but I am apparently missing at least one. Would anyone know which one it is that I am missing or have an idea where I can get info on what each of these dll's do?

Exporting Reports From Crystal Report To Text Mode
Hi gurus,

when I export my reports, which are made using
crystal report 6, to text mode in order to get
printing faster, the format of the report is
disturbed. I have used VB6 as front end and Oracle
8i as back end. Some columns of the report have
'Can grow' upto 5 lines but when I export the report to text mode, only the first line of the column is exported, the remaining 4 lines are not exported. please help me out.

shrikant
shrikant_smart@rediffmail.com

Crystal Repot - Exporting Only Report Header And Footer
Hi,

I have problem while exporting a report to Excel. I have tried to export to excel versions 2.1 to 8. But it does not solve the problem. When I export the report, only the report header and report footer are exported. No other sections are exported. In the report the details section is hidden. Can anyone help me? Every help is very much appreciated.

Thanks and Regards

Kishore

Problem In Exporting Datas From Crystal Report 8.0 To Excel 2002
Hi
This is Rajasekaran

I am trying to Export Datas from Crystal Report 8.0 to Excel 2002 Normally using export option in the crystal report. But its saying Error like "Visual Basic Program Encounter Error" and that "Send " " Dont Send " Screen coming

But the same report Export to Text and other word formats except excel

All other reports are working fine..Except this one

The Report have few Supressed Fields with multiple grouped datas (No Sub Report)

The Setup was created using Windows98 OS and Application running in Win 2000 and XP. When we click the source file then Error source coming as mscvrt.dll

I have the screen shot of report and Error message can send u on Request

So Kindly help me to solve this problem very Imp One Please help me

T.Rajasekaran
Removed By Mod

Problem In Exporting Datas From Crystal Report 8.0 To Excel 2002
Hi
This is Rajasekaran

I am trying to Export Datas from Crystal Report 8.0 to Excel 2002 Normally using export option in the crystal report. But its saying Error like "Visual Basic Program Encounter Error" and that "Send " " Dont Send " Screen coming

But the same report Export to Text and other word formats except excel

All other reports are working fine..Except this one

The Report have few Supressed Fields with multiple grouped datas (No Sub Report)

The Setup was created using Windows98 OS and Application running in Win 2000 and XP. When we click the source file then Error source coming as mscvrt.dll

I have the screen shot of report and Error message can send u on Request

So Kindly help me to solve this problem very Imp One Please help me

T.Rajasekaran
Removed By Mod

Exporting Crystal To PDF But Creating Individual Files Based On Data In Report
I have just begun toying with Crystal reports and have completed the report that I want linked to the current database. The only problem is that when I export the report to PDF - I want to create a number of PDF files based on different data in the report. I can't seem to be able to do this via Crystal Reports (v9 i am using) so I thought that I could run a VB script on the full report and spit out the differing text files from the script.

Does anyone know of a good way to do this? Is this the best solution?

Please Help!!

Many Thanks

j_young_80

Unable To Open The Crystal Report Exported In Crystal Report Format
Hi,
Sub: Unable to open the Crystal report exported in Crystal Report Format

1)    I have used Oracle Native connection, while designing the report.
2)    I have passed the record set to the report at run time.
3)    Exported the report to Crystal Report Format, But I could n’t able to open report, while opening , the report asks for OLEDB information, even though I used Native connection at design time.
4)    In Crystal Report 8.5, connect driver property, but I am using crystal reports XI and in Visual Basic 6.0, Is there any method or property to convert the connection?. As I have to export report to crystal format and emailed to user, so that user can open it.
Any assistance in this regard is highly appreciated

The code is as follows:
Public Sub Aging_REPORT(strSQL As String, sReportName As String, sDestFileName As String, ReportTitle As String)

On Error GoTo Err
Dim CrAppl As CRAXDRT.Application
Dim crrep As CRAXDRT.Report

Dim rsCrystal As ADODB.Recordset
 
    Set CrAppl = New CRAXDRT.Application
    Set crrep = CrAppl.OpenReport(sReportName) 'Opens the report
    
   Set rsCrystal = New ADODB.Recordset
  
   
    rsCrystal.Open strSQL, Conn, adOpenStatic, adLockReadOnly
    rsCrystal.Requery
    
    
     With crrep
     .DiscardSavedData
    .Database.LogOnServer "crdb_oracle.dll", strServerName, "", strUserName, strPassword
     .ReportTitle = ReportTitle
     .Database.SetDataSource rsCrystal, 3 'LINK REPORT TO RECORDSET
     .VerifyOnEveryPrint = True
     End With
 
   With crrep.ExportOptions
    .DestinationType = crEDTDiskFile
    .FormatType = crEFTCrystalReport
    .DiskFileName = sDestFileName
   End With
   
     
   crrep.Export (False)
    Set crrep = Nothing
    Set CrAppl = Nothing
    Exit Sub
Err:
 MsgBox Err.Description

End Sub

Thanks,

Exporting Crystal
Hello gurus,
I have a crystal report. The size of the report is A3. If I export this to text file the whole alignment is changed. Any way to avoid this.

Thanks
Shivakumar G.M.

How To Pass Format String To Crystal Report From VB And How To Use It In Crystal Report?
Hi,

I am working on VB 6.0 and using crystal report 7 as reporting tool.
In report, some clients are asking 3 decimal places(Eg. 2000.500) while other clients are asking 2 decimal places(Eg. 2000.50) for numeric fields.
I want to pass the amount of decimal places for numeric fields to crystal report from VB.
How should I implement this using VB.
Pls any one can help me?

Thanks in vance,
Soundar

How To Replace Crystal Report Control With Crystal Report Designer
Hi,

I want to replace crystal report control with crystal report designer in vb. report files are ready.
and parameters have passed by crystal report control to the actual repors which are made in segate crystal report.
now i want to keep the re[prt files as it is. but instead of control,
i want to use designer.

plesae help me

thanks
mital

Exporting Crystal Reports
Trying to export a report to a PDF file without using the 8.5 Active X Designer Run Time reference. I know this can be done for Word, Excel, etc by using the following format.

report1.PrintFileType = crptWinWord

Does one exist for PDF? Can't seem to find this anywhere.

Exporting Crystal Reports
Hello,

Does anybody have sample code on how I can export a Crystal Report to either Word or Excel. I am currently using Crystal Report 7.0 and VB6.

Thanks

Zack

Exporting Crystal Reports
Hi all,

I would appreciate if anyone could provide me with an answer for the problem that I'm facing now. I displayed data in a cross-tab in crystal report 8.0. When I want to export the report into another format(acrobat/excel/word) some words/labels on the cross-tab went missing.
I'm still wondering what is the cause if the problem, when I preview it in Crystal Report, it works fine, when I want to export, there goes the missing words. Thanks in advance for your help!

Exporting Crystal Crax Through VB
I am desperate on this:

I have reports that are linked to access databases.
Providing the Report has been converted to a DAO database driver through the Crystal Reports IDE, the following code works fine:


Dim appl As CRAXDRT.Application
Dim rep As CRAXDRT.Report
Dim tbl

Set appl = New CRAXDRT.Application
Set rep = appl.OpenReport(ReportFileName, 1)

For Each tbl In rep.Database.Tables
tbl.Location = DBFileName
Next tbl

rep.DiscardSavedData
rep.ExportOptions.DiskFileName = OutputFileName
rep.ExportOptions.DestinationType = 1
rep.SQLQueryString = SQLString
rep.ExportOptions.FormatType = crEFTExactRichText
rep.ExportOptions.RTFExportAllPages = True
rep.ExportOptions.UseReportDateFormat = True
'rep.Database.Tables(1).Location = DBFileName
rep.Export False
Set rep = Nothing
Set appl = Nothing

However, I need the reports to be converted to OLEDB so I can switch from reporting through an Access database to reporting through SQL Server.

After converting the Reports to an OLEDB Database Driver, the code above no longer works, even though it still is a MS Access Database.

I believe I will have to use:
rep.Database.LogOnServer "pdsoledb.dll", "Microsoft.Jet.OLEdb.4.0;", "C:CPassDataPass2Copy_ecristal.mdb", "", ""

BUT... it does not work. PLEASE PLEASE help me or shoot me.

Ta.

Carl.

Exporting From Crystal To Excel
Dear

I use export report function in crystal report 7,
to export from crystal to excel.

I got a problem such as
1. Every i click export report button sometimes
is work and sometimes is failed.

2. If it's work, result of exporting is different(
Format layout). example : in my report i have 3 column.
Column 2 is blank, so data in column 3 will be replace in column 2.

3. In my report i use some textbox object, when i
export to excel, value of textbox is blank.

4. Can i export from crystal to excel using ODBC ?

Anyone can help me ??

Best Regards
Long

Exporting Crystal Reports
I posted this in the VB general discussion area with no success, maybe someone in here can help...

Does anyone have any demo code on how to export a crystal report using VB? I need to allow a user to enter a field in a text box in a VB form, then pass this parameter to crystal (version 6) , generate the report using this parameter, export to html and email the user with the html file as an attachment. Simple as that.(?)

I've never used crystal with VB before so any help is greatly appreciated.

Mick  



 


Exporting To RTF In Crystal Reports
hi,
i m using crystal reports with vb 6.0.i m having problem in exporting reports to rtf format.It works fine when less number of pages are to be exported but on exporting large number of pages my system hangs. I m using the foolowing code to export to rtf

Dim Report As New CrystalReport9

Private Sub CRViewer1_ExportButtonClicked(UseDefault As Boolean)
On Error GoTo inerr
UseDefault = False
CommonDialog1.Filter = "(*.rtf)/*.rtf"
CommonDialog1.FilterIndex = 1
CommonDialog1.ShowSave

CommonDialog1.DefaultExt = ".rtf"
CommonDialog1.Flags = &H8000& Or &H2& Or &H800& Or &H400& Or &H4000&
Report.ExportOptions.DestinationType = crEDTDiskFile
Report.ExportOptions.FormatType = crEFTRichText
Report.ExportOptions.DiskFileName = CommonDialog1.FileName
Report.Export (False)
Exit Sub
inerr:
Select Case Err.Number
Case -2147206452
    MsgBox ("sharing violation")
Case 32755
    Exit Sub
End Select
End Sub


i'll be thankfull if anybody hav the solution for this.

thnx.

Exporting Out Of Crystal Reports
I have a problem in crystal report 9. I want to export a report using the export function.
I didn't have a problem before but now I seem to get an error message stating:

    Login failure

When I step through the program it booms out after I use the:
crRep.Export False

I set the format of the exported document by using the following:

    crRep.ExportOptions.FormatType = crEFTExactRichText 'crEFTWordForWindows
    crRep.Export False


Is it due to user licenses in crystal?
Whats wrong??? I am not sure where to start...



My export function below:-

Code:
Public Function exportReport(strAccountNo As String, ReportName As String) As Boolean
On Error GoTo ErrorHandler

Dim crRep As New crAccountStatmentEmail

    If Dir(ReportsWorkingPath + Split(ReportName, ".")(0) + ".rtf") <> "" Then
        Kill ReportsWorkingPath + Split(ReportName, ".")(0) + ".rtf"
    End If
    
    crRep.ParameterFields(1).AddCurrentValue (strAccountNo) 'PmAccountNumber
    crRep.PaperSize = crPaperA4
    crRep.ExportOptions.DiskFileName = ReportsWorkingPath + Split(ReportName, ".")(0) + ".rtf"
    crRep.ExportOptions.DestinationType = crEDTDiskFile
    crRep.ExportOptions.FormatType = crEFTExactRichText 'crEFTWordForWindows
    crRep.Export False
    exportReport = True
    
Exit Function
ErrorHandler:
    MsgBox "Description: " & err.Description & " Source: " & err.Source & " ExportCrystalReport - mdlEmail"
    exportReport = False
End Function

Exporting Crystal Reports
I am relatively new to using Crystal reports. I am exporting a crystal report from a VB application to a network drive. When the exporting takes place an information box pops up showing how many records are being exported. Is there a way to supress the information box from showing.

Also when opening the report on the LAN you can see the design mode ... is there a way that it could be read only.

Thank you in advance for any info.

Crystal Reports Exporting
hi,
 
I am working on a application developed in VB 6.0. I
have developed report and want to email it directly
from the application via attactment in PDF format. I
do not want to show the user the report it will go
as a attachment to the client or vendor or whatever
. I have tried a lot i can get it in word, Xls and
txt format but not in Pdf.
Can u help Please. Its urgent
 
 
 

Regards
Sunil
Nairobi, Kenya
Phone :- (254) 0722255258

 

Exporting Crystal Reports To PDF
Hi,
Does anyone knows, How do I export Crystal Roport, reports to Acrobat PDF formats in Visual Basic
I am using Crystal Reports 7.0
Thanx for the help

Regards ... Giri

Crystal Reports Exporting Options
Is it possible to choose which files types(PDF, Word, etc) a user has access to when exporting a report in Crystal Reports through vb code?

To be more specific, in crystal reports there is an export option that contains file types. I would like to be able to limit these types of files through vb code if possible.

Grouping With Crystal Reports And Exporting The RTF Into DOC Using VB
hello!
this is my first post here. i have a problem in crystal and vb as well. first in crystal reports. in the report i have two tables that are link together by a common fld say QNum and ExNum. When i group qnum which is of text type, it is not sorted accordingly e.g. 1,10,11,2,3. And exnum contains duplicate values eg. 1,1,2,3,4,5,2. what i want for crytal is to sort the qnum and group the ExNum. the value of Qnum must also be like ExNum.

Regarding the RTF to DOC here is my problem.
I want to write to an Rich Text Box using my code then later on saving it as an RTF or DOC. the rich text box will have a multiple lines. please do help me.

Copyright 2005-08 www.BigResource.com, All rights reserved