By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,057 Members | 1,346 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,057 IT Pros & Developers. It's quick & easy.

Export from Crystal Report

P: 3
Hi all,

I have a big problem when I try to export from Crystal Report 8.5 in .pdf from VB6. I use a database made in SQL Server 2000.
The problem is that all the decimal fields in database are truncated in pdf when I export from VB6. For example, If I have 75.45, it will return 75.00. If I export the data direct from Crystal Report, it works fine.
I tried with some updates for Crystal Report, but with no result.
Please, help me!
Nov 29 '07 #1
Share this Question
Share on Google+
3 Replies


Dököll
Expert 100+
P: 2,364
Hi all,

I have a big problem when I try to export from Crystal Report 8.5 in .pdf from VB6. I use a database made in SQL Server 2000.
The problem is that all the decimal fields in database are truncated in pdf when I export from VB6. For example, If I have 75.45, it will return 75.00. If I export the data direct from Crystal Report, it works fine.
I tried with some updates for Crystal Report, but with no result.
Please, help me!
Hello acextreme!

Try this:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim crxApp As CRAXDRT.Application
  3. Dim myReport As CRAXDRT.Report
  4. Dim crxExport As CRAXDRT.ExportOptions
  5.  
  6. Set crxApp = New CRAXDRT.Application
  7. Set myReport = crxApp.OpenReport(App.path & {YourReportName}, 1)
  8.  
  9. With myReport
  10.     With .ExportOptions
  11.         .UseReportDateFormat = True
  12.         .UseReportNumberFormat = True
  13.         .FormatType = crEFTPortableDocFormat
  14.         .DestinationType = crEDTDiskFile
  15.         .DiskFileName = App.path & "{YourFileName}.pdf"
  16.     End With
  17.     .Export False
  18. End With
  19.  
  20.  
Perhaps you can mimmick to fit your purpose. Be sure all of your DLLs are properly installed;-)

Let us know if that works!

Dököll
Nov 30 '07 #2

P: 3
Hello acextreme!

Try this:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim crxApp As CRAXDRT.Application
  3. Dim myReport As CRAXDRT.Report
  4. Dim crxExport As CRAXDRT.ExportOptions
  5.  
  6. Set crxApp = New CRAXDRT.Application
  7. Set myReport = crxApp.OpenReport(App.path & {YourReportName}, 1)
  8.  
  9. With myReport
  10.     With .ExportOptions
  11.         .UseReportDateFormat = True
  12.         .UseReportNumberFormat = True
  13.         .FormatType = crEFTPortableDocFormat
  14.         .DestinationType = crEDTDiskFile
  15.         .DiskFileName = App.path & "{YourFileName}.pdf"
  16.     End With
  17.     .Export False
  18. End With
  19.  
  20.  
Perhaps you can mimmick to fit your purpose. Be sure all of your DLLs are properly installed;-)

Let us know if that works!

Dököll

Nope, It didn't work. This is the code that I used (or something like it). :((
I'm thinking if I can change the sql query from crystal making a conversion from decimal into float it will work....But I didn't succed to change it. And I read from some forums that sql query can not be changed.
Dec 3 '07 #3

P: 3
I find the problem.....I install Crystal Report 11 and use C:\Program Files\Common Files\Business Objects\3.0\bin\craxdrt.dll.
The code remain the same. It was only the .dll.
Dec 3 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.