Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

CSV File output.

edited January 2005 in General
I am trying to export reports into a text file with CSV output. Here's what
I did:
MYCTReport.DeviceType := dtTextFile;
MYCTReport.ShowPrintDialog := False;
MYCTReport.AllowPrintToArchive := False;
MYCTReport.ShowCancelDialog := False;
MYCTReport.AllowPrintToFile := True;
MYCTReport.TextFileName := 'TestFileOutput.csv"
MYCTReport.TextFileType := ftComma;
MYCTReport.Print;

All I get it is an empty csv file with absolutely nothing in it. The report
generates fine
otherwise.

Any clues?

Thanks in advance,
Vikram

Comments

  • edited January 2005

    Use the PrintToFile dialog to specify which components to export. Or you can
    do it programmatically by setting the Save and SaveOrder properties of the
    components.

    --
    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited January 2005

    That should have said 'Use the File | Print To File Setup dialog from the
    report designer..."

    --
    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited January 2005
    Using the Print dialog is not an option for me. Would be great if you can
    elaborate on how I can set the "Save" properties of components I want to
    export. So you mean to say RB will only export to CSV for components that
    are marked as "Save" ?

    Thanks
    Vikram

  • edited January 2005
    I set the Save property of my TppDBText's and TppVariable's to True and also
    set the SaveOrder property. But it still does not print anything into the
    CSV file. The file is empty.
    At this time I am only setting the Save property to True for the objects in
    the Detail band.

    I don't know what the problem is. Is there anything else to set?

    Thanks

This discussion has been closed.