Results 1 to 13 of 13

Thread: Help with exporting reports to pdf

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    27

    Help with exporting reports to pdf

    Hi,
    I have reports for each customer. However, when I output the report it outputs to 1 pdf file for all customers. Is there a way to generate seperate files for each customer without having to drill down each customer and exporting one-by-one?
    Thanks

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Help with exporting reports to pdf

    I assume your running Crystal Reports? And if so what version? Are you using the CR Viewer control?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    27

    Re: Help with exporting reports to pdf

    Im not using VB or anything. Ive just got CR 11 and usually I would just click File>Export, but that wont help me to do individual reports.

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Help with exporting reports to pdf

    Havent used CR 11 yet but it sounds like it may be a report design issue? If you have all customers in the details section then you would want to change it to have it display a single customer per page or new page on change of detail. Then you can export a particular page which will contain a single customer.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    27

    Re: Help with exporting reports to pdf

    Yes, I have that already. The problem is that I have over 70 customers and I cant manually print page ranges. Also, Each customer has different lengths of pages, so I would have to manually go through each one to print them.

    Right now, when I click preview I get a list of all my group headings (customers) and I right click on 1 and click drill down for that particular customer. Doing this for each customer would take ages.

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Help with exporting reports to pdf

    Sound like you may need to use VB and perform several exports, one per customer.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    27

    Re: Help with exporting reports to pdf

    Ive never used VB with CR and its been a while since ive used VB at all. Could you please direct me to some guides or tutorials for something like this?

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Help with exporting reports to pdf

    I believe there is something on http://www.businessobjects.com (CR's website under reporting). Also, searching our forums should also generate some good hits.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    27

    Re: Help with exporting reports to pdf

    thanks for that, ill give it a go

  10. #10
    Junior Member
    Join Date
    Feb 2006
    Posts
    27

    Re: Help with exporting reports to pdf

    Here you got some code from CHM called "CrysDev: A Developer's Guide to Integrating Crystal Reports"

    LOCAL oCR AS CRAXDRT.Application
    LOCAL oRpt AS CRAXDRT.Report
    LOCAL oExport AS CRAXDRT.ExportOptions

    oCR = CREATEOBJECT("CrystalRuntime.Application")
    oRpt = oCR.OpenReport("C:\Program Files\Crystal Decisions" ;
    + "\Crystal Reports 9\Samples\En\Reports\General Business" ;
    + "\Financial Statement.RPT")
    oExport = oRpt.ExportOptions()
    oExport.DestinationType = 1 && Disk File
    oExport.FormatType = 31 && PDF
    oExport.PDFExportAllPages =.T.
    oExport.DiskFileName = "D:\Temp\Financial Statement.PDF"
    oRpt.Export(.F.)

    Regards,
    Tribo.

  11. #11

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    27

    Re: Help with exporting reports to pdf

    is that different to just exporting a report using crystals interface?

  12. #12
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Help with exporting reports to pdf

    It wont solve the issue as your issue seems to be a report design issue but it can help just as I had posted about it. I also have an VB6/Crystal Report Ex. in my signature but its using the CR Viewer control. What else you can do is to programmatically set the selection formula to just one particular customer and then export the report, and repeat for each customer.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  13. #13

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    27

    Re: Help with exporting reports to pdf

    I found some sample vb projects on the business objects support site. There is one that lets you preview a report using the report viewer control. That works and the drill down works. Now I need to be able to export it to pdf. I found a sample on the site which does this, but it doesnt work. I am trying to combine the viewing part with exporting, but it just crashes when I try exporting. Im using Visual BAsic express 2005.

    Heres an error Im getting in the crReportDocument.Export() line:

    Method 'ISCREditableRTFExportFormatOptions_reserved5' on type 'CrystalDecisions.ReportAppServer.ReportDefModel.EditableRTFExportFormatOptionsClass' from assembly 'CrystalDecisions.ReportAppServer.ReportDefModel, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' is overriding a method that has been overridden.
    Last edited by ezzy85; Feb 19th, 2006 at 09:28 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width