Export from Crystal Report

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • acextreme
    New Member
    • Nov 2007
    • 3

    #1

    Export from Crystal Report

    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!
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Originally posted by acextreme
    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:

    [CODE=VB]

    Dim crxApp As CRAXDRT.Applica tion
    Dim myReport As CRAXDRT.Report
    Dim crxExport As CRAXDRT.ExportO ptions

    Set crxApp = New CRAXDRT.Applica tion
    Set myReport = crxApp.OpenRepo rt(App.path & {YourReportName }, 1)

    With myReport
    With .ExportOptions
    .UseReportDateF ormat = True
    .UseReportNumbe rFormat = True
    .FormatType = crEFTPortableDo cFormat
    .DestinationTyp e = crEDTDiskFile
    .DiskFileName = App.path & "{YourFileName} .pdf"
    End With
    .Export False
    End With

    [/CODE]

    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

    Comment

    • acextreme
      New Member
      • Nov 2007
      • 3

      #3
      Originally posted by Dököll
      Hello acextreme!

      Try this:

      [CODE=VB]

      Dim crxApp As CRAXDRT.Applica tion
      Dim myReport As CRAXDRT.Report
      Dim crxExport As CRAXDRT.ExportO ptions

      Set crxApp = New CRAXDRT.Applica tion
      Set myReport = crxApp.OpenRepo rt(App.path & {YourReportName }, 1)

      With myReport
      With .ExportOptions
      .UseReportDateF ormat = True
      .UseReportNumbe rFormat = True
      .FormatType = crEFTPortableDo cFormat
      .DestinationTyp e = crEDTDiskFile
      .DiskFileName = App.path & "{YourFileName} .pdf"
      End With
      .Export False
      End With

      [/CODE]

      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.

      Comment

      • acextreme
        New Member
        • Nov 2007
        • 3

        #4
        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.

        Comment

        Working...