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

want to confirm reprint options for archived reports

edited October 2003 in General
It appears that you can only print to text when you initially generate the
report. If you generate a report and then print to archive, you can't then
read the archive in and print to file? The reason this doesn't seem possible
is that the Print To File... dialog is used on the initial report and it
doesn't look like those settings are saved to the archive. So that when you
try to print the archive those details are not available for generating a
text file.

By the same token does this mean that an archived report cannot be read and
then output as html or pdf (using the appropriate devices of course)?

Or do I have myself all mixed up?

Regards

Jeff

Comments

  • edited October 2003
    Jeff,

    You can take any RB archived file report and generate it to pdf, html,
    report emulation text, etc. The archive format is a collection of draw
    commands. The draw commands contain information for placement and
    style(etc). You can use the TppArchiveReader to read the .raf file and set
    the 'AllowPrintToFile' property to True you will get the print to file
    option at the bottom of the print dialog when you call
    ppArchiveReader.Print. From there you can check the checkbox and specify
    the output file type and file name. If you add the TExtraDevices to your
    project you will also see the pdf, html, etc. output types available. Also,
    the 'Save' information for outputting to a 'TextFile' is contained in the
    draw commands so that if it was originally generated with these properties
    set then a fixed format, csv, or tab-delimited file can be output.

    Regards,
    Chuck Van Acker
    Alogent Corp.
  • edited October 2003
    OK thats good. I am not sure that the export to text will quite suit my
    needs though. I like to print a header row that contains the display name
    for the detail column I will print on the remaining lines. In RBuilder you
    can specify to print fields from a header line and fields from a detail line
    but there may not necessarily be a one-to-one correspondence. In my old
    report writer I used to create a csv file at the same time as creating the
    image file. I would simply add code to the AfterPrint event to output to the
    text file.

    Good to know that an archived file can be reprinted to PDF and HTML though.

    Thanks

  • edited October 2003
    You can use the Title band (as it 'prints' only once) to put labels that
    contain the display name and set their save/save order properties to output
    a header row. It would be your responsibility at design time to make sure
    that the order corresponds to the detail though. Another option would be to
    create your own output device based on the RB TextFile to create the header
    row from the detail fields you have selected to extract. I created my own
    XML Data Output Device that was based on the TextFile output device in about
    a day or so.

    It appears that you want to be able to produce reports and extracts to many
    formats. Are you aware that you can generate to many different formats in a
    simultaneously in a single request/pass? Our software allows the user to
    select as many output types (and destinations) as they want. The RB report
    Demos #122 shows an example of printing to two Printers simultaneously
    (using the PrintToDevices method). We just extended that to 'stacking' any
    output device (including csv TextFiles). I like the fact that I can design
    a report layout for the csv TextFile extract and generate the archive report
    and the text file at the same time. It works great for testing and
    debugging because the report is more readable and lets me validate the csv
    file easier. Then by just changing the output options in our configuration
    I can just supply the user with the extract file.

    Regards,
    Chuck Van Acker
    Alogent Corp.
This discussion has been closed.