Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to set the Default Export FormatType in crystal reports?

How to set the Default Export FormatType in crystal reports?

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jmavn
    wrote on last edited by
    #1

    Hi, I am working with crystal reports XI. When exporting the crystal reports, by default "Crystal Reports (RPT)" is selected in the FileFormat dropdownlist. Is it possible to set this option as "Microsoft Excel 97-2000 data only (XLS)"? Please if any one knows about it reply me.. I need the answer urgently..

    Thankfully, jm

    M 1 Reply Last reply
    0
    • J jmavn

      Hi, I am working with crystal reports XI. When exporting the crystal reports, by default "Crystal Reports (RPT)" is selected in the FileFormat dropdownlist. Is it possible to set this option as "Microsoft Excel 97-2000 data only (XLS)"? Please if any one knows about it reply me.. I need the answer urgently..

      Thankfully, jm

      M Offline
      M Offline
      Michael Sync
      wrote on last edited by
      #2

      Have you tried this code?? ' Declare variables and get the export options. Dim exportOpts As New ExportOptions() Dim diskOpts As New DiskFileDestinationOptions() Dim excelFormatOpts As New ExcelFormatOptions() exportOpts = Report.ExportOptions ' Set the excel format options. excelFormatOpts.ExcelTabHasColumnHeadings = true exportOpts.ExportFormatType = ExportFormatType.Excel exportOpts.FormatOptions = excelFormatOpts ' Set the export format. exportOpts.ExportFormatType = ExportFormatType.Excel exportOpts.ExportDestinationType = ExportDestinationType.DiskFile ' Set the disk file options. diskOpts.DiskFileName = fileName exportOpts.DestinationOptions = diskOpts Report.Export() ref: http://msdn2.microsoft.com/en-us/library/aa288404(VS.71).aspx

      Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

      J 1 Reply Last reply
      0
      • M Michael Sync

        Have you tried this code?? ' Declare variables and get the export options. Dim exportOpts As New ExportOptions() Dim diskOpts As New DiskFileDestinationOptions() Dim excelFormatOpts As New ExcelFormatOptions() exportOpts = Report.ExportOptions ' Set the excel format options. excelFormatOpts.ExcelTabHasColumnHeadings = true exportOpts.ExportFormatType = ExportFormatType.Excel exportOpts.FormatOptions = excelFormatOpts ' Set the export format. exportOpts.ExportFormatType = ExportFormatType.Excel exportOpts.ExportDestinationType = ExportDestinationType.DiskFile ' Set the disk file options. diskOpts.DiskFileName = fileName exportOpts.DestinationOptions = diskOpts Report.Export() ref: http://msdn2.microsoft.com/en-us/library/aa288404(VS.71).aspx

        Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

        J Offline
        J Offline
        jmavn
        wrote on last edited by
        #3

        Hi Sync, Yes I tried the code, but I could not get you what "Report" means in the code. Is this the ReportDocument Name or something else? :( Also the diskOpts.DiskFileName = fileName (filename??) what value can I give to it? Is it the name of the xls file which is to be store the exported report? It must be set at runtime isnt it? I am not sure about it.. Can you clarify my doubts, please?

        Thankfully, jm

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups