Printing to XLSData

edited June 2014 in Devices
Hi
I'm trying to manage the title band visibility if it's send to XLSData.
I've tried with both of the next sentences in the calc tab on the
event TitleBeforePrint:

Title.visible := Report.DeviceType = 'XLSData';

or

Title.visible := Report.PrintDialog.DeviceType = 'XLSData';


but it doesn't work. When I open de xls file, the titile band doesn't
appear. I'm using RB 14.08
Thanks

Comments

  • edited June 2014
    Hi Ignacio,

    Check out the RBuilder help topic for TppXLSDataDevice for details on its
    use. The default behavior is that only the detail band items are exported.
    You can use the File | Print To File Setup dialog to specify which bands and
    components to export. You can also configure the components via code by
    setting the Band.Save, Component.Save, SaveOrder properties.

    RB 15 has two new properties XLSSettings.IncludeSingleHeader and
    IncludeSingleFooter that will include the header/footer in the export only a
    single time.

    Here is a list new features introduced in RB 15...

    http://www.digital-metaphors.com/rbWiki/General/What's_New/RB_15





    Best regards,

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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited June 2014
    Hi
    In fact. I'm using the File | Print To File Setup dialog to specify
    which bands and components to export. The Title band is one of the
    bands I use as Column header when exporting to XLSData but when I send
    the report to printer o preview or PDF, I don´t want to show the Title
    band, I only want to show the title band if I print to XLSData. Thats
    why I used the sentences Report.DeviceType = 'XLSData' or
    Report.PrintDialog.DeviceType = 'XLSData'. Just to know if user has
    selected this Device type so I can determinate when title band is shown.
    So why it this condition doesn't work?.
    Title.visible := Report.DeviceType = 'XLSData'; or
    Title.visible := Report.PrintDialog.DeviceType = 'XLSData';

    Thanks


    El 13/06/2014 11:36, Nard Moseley (Digital Metaphors) escribió:
  • edited June 2014

    For RB 15 we added the XLSSettings.IncludeSingleHeader and
    IncludeSingleFooter so that no coding would be required to accomplish this
    behavior.

    For earlier RB versions, you can implement code in the Report.BeforePrint
    event to check Report.FileDevice like this..

    uses
    ppFilDev,
    ppXLSDevice;


    if myReport.FileDevice is TppXLSDataDevice then
    // generating to XLSData file




    Best regards,

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

    Best regards,

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