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. General Programming
  3. C#
  4. Export Report To txt file

Export Report To txt file

Scheduled Pinned Locked Moved C#
questionhtml
1 Posts 1 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.
  • S Offline
    S Offline
    sevan
    wrote on last edited by
    #1

    how can i append this code to be able to export report to TXT file. "ExportFormatType" // Set the Export type, this can be: // PDF, Excel, Word Doc, RTF Doc, // HTML 3.2, HTML 4.0 or CrystalReport but not txt ???? string exportFilePath = "c:\\Report1.txt"; // Create an instance of the untyped report object ReportDocument oRpt = new ReportDocument(); // Load the report from disk oRpt.Load(@"C:\Aloha\RPTFOH\Report_1.rpt"); // Set the options for saving the exported file to disk DiskFileDestinationOptions oDest = new DiskFileDestinationOptions(); oDest.DiskFileName = exportFilePath; // Set the exporting information ExportOptions oExport = oRpt.ExportOptions; // Set the destination options oExport.DestinationOptions = oDest; // Set the location, this can be: // DiskFile, ExchangeFolder, MicrosoftMail or NoDestination oExport.ExportDestinationType = ExportDestinationType.DiskFile; oExport.ExportFormatType = ExportFormatType.WordForWindows; // Call the Export method to export the report oRpt.Export();

    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