Home General

Printing to a file -- the file is empty

edited June 2010 in General
D2010, RB11.06. The report is a jit-based report -- data stored in
objectlists and TppDBtext.OnGetFieldValue provides the values.

The preview shows a report with data, but the output txt file has 0
bytes. I've marked each field in the detail band as Save.
AllowSaveToFile is checked.

What am I missing?

Jeremy

Comments

  • edited June 2010
    I should also ask, does the upgrade to v12 allow output of a jit-based
    report to excel? I notice in an earlier thread that OnGetText doesn't
    work in that regard. Will OnGetFieldValue work?

    Jeremy
  • edited June 2010
    Simplest way to configure the delimited text export is to use the Designer's
    File | Print To File Setup dialog. If you configure the report via code, in
    addition to setting Component.Save, you need to set Band.Save.

    RB 12 has a new default behavior for delimited text export - the elements in
    the detail band are exported when no elements have configured manually.



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


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited June 2010
    Yes, all DataPipelines are supported: DBPipeline, JITPipeline, TextPipeilne,
    CustomPipeline, ... A report treats them all the same, never knows to which
    one it is connected.

    When you define the DataFields for a JITPipeline or TextPipeline you should
    define the proper DataType for each field: string, integer, currency, etc.
    You should use the OnGetFieldValue to return the value for each field in the
    correct DataType. By honoring DataTypes and Value you can produce
    meaningful results in all parts of the report - calculations, export, etc.
    The XLS export can export the value in the correct datatype and keep the
    display format separate also, all properties of the cell.

    The question to which you refer and my answer focused on using a DBCalc
    component - which by definition is numeric datatype and has a DBCalc.Value
    property that is exported.


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


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.