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

Empty XLS file using XLSData with subreports

edited May 2014 in Devices
Hi,

I have a report with only a detail band. But, inside this detail band
there are 3 subreports. When I try to use XLDData device to print this
report, I get a empty XLS file. What am I doing wrong??

Thanks,

Weverton

Comments

  • edited May 2014
    Hi Weverton,

    By default all text inside the main report's detail is automatically
    saved to the XLSData file. However any other text, including text
    inside subreports, is handled similar to the Text File Device.

    You will need to either use the Print To File dialog to add each text
    object you would like saved to file (File | Print To File Setup.. menu
    option) or use the file save properties of each text object and band to
    do so in code.

    See the TppXLSDataDevice topic in the RB help for more information.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2014
    Em 29/05/2014 17:49, Nico Cizik (Digital Metaphors) escreveu:

    When I set DeviceType of Report to XLSData and try to use Prito To File
    dialog, it only shows DetailBand and nothing more else; Available
    Controls and Selected Controls stay blank.

    What else can I see??

    Tks,

    Weverton
  • edited May 2014
    Hi Weverton,

    Are you using the Print To File dialog of the subreport or the main
    report? The dialog will only show the controls for the specific
    report/subreport you are currently designing.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2014
    Em 30/05/2014 12:13, Nico Cizik (Digital Metaphors) escreveu:
    I'm using the dialog of main report. Should I use this dialog of subreport??

    Thanks
  • edited June 2014
    Yes :). You will need to use the Print To File Setup dialog for each
    subreport you wish to export.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2014
    Em 04/06/2014 11:40, Nico Cizik (Digital Metaphors) escreveu:
    Is there a way to do this easier?? Progamatically, maybe?? Because there
    are many reports in our app with this structure.

    Thanks,
  • edited June 2014
    Hi Weverton,

    Yes, you can use the Save, SaveLength, and SaveOrder properties of the
    text components to enable saving to file in code. You will also need to
    update the Band.Save property to True as well. I suggest using a Report
    Object Loop.

    http://www.digital-metaphors.com/rbWiki/Delphi_Code/Layouts/Report_Object_Loop

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2014
    Em 05/06/2014 12:09, Nico Cizik (Digital Metaphors) escreveu:
    Hi Nico,

    Thanks by your help until now. I got a XLSData report file with info.
    But, there a ppMemo that in report is at end of line and when file is
    created this memo becames on first column (column A) and all other info
    appears many columns after.

    What can I do to make this ppMemo output in right place??

    PS: All components are inside a ppRegion

    Thanks,
  • edited June 2014
    The XLS data behaves similar to the TextFile Device in that is simply
    exports text data in the save order to the spreadsheet separated by
    band. You can adjust the save order of the memo to alter where it is
    located in the output.

    If you would like, you can send a minimal example demonstrating the
    issue in .zip format to support@digital-metaphors.com and I'll take a
    look at it for you.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.