Home Devices

XLS Justification Issue

edited January 2017 in Devices
Hi,

To replicate the issue I am seeing I have created a very simple
example here:

I have a report with a TppLabel in the Header which is acting as a
column heading and it is left justified. I have a another TppLabel that
is in the Detail section and it sits under the Header label but it
is right justified

As an example layout:

Test Column 1
92

Test Column 1 above is the label in the Header and the value 92 is the
data in the Detail section.

When I export to XLSReport and open it in Excel the number 92 seems
to be shifted into the next adjacent cell resulting in something like this:


Test Column 1
92

How can I export to XLS the result output is exactly the same as the
example layout?

The settings I am using are:

ppReport1.DeviceType := dtXLSReport;
ppReport1.XLSSettings.ExportComponents := [ecText];
ppReport1.XLSSettings.IgnorePageHeight := True;
ppReport1.XLSSettings.ScaleToPageWidth := True;
ppReport1.XLSSettings.PreserveLineBreaks := True;
ppReport1.XLSSettings.MergeAdjacentCells := False;


David.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Comments

  • edited February 2017

    This was answered Jan 19 via email, but just noticed this post.

    The solution is to set AutoSize False and size the header and detail
    elements width to be the same. Then set the text alignment of the header
    element to be right-justified. (When the element is right-justified, then it’s
    right position is mapped to the nearest column. When an element is
    left-justified its left position is mapped to the nearest column. )


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

    Best regards,

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