Report Designer

SUGGESTED

I am trying to re-arrange my statement report design, by adding coloured background instead of transperant.

In the field 2. Header_Number footer (from your sage template) I have filled the date - inv. ref - details - outstanding and payments 

Somehow, I cannot find the way that the coloured background is only being printed only where there are values and text, the rest of the page will remain blank.

I need the coloured Box to go down just slightly up from field 4.Account_Ref_footer, whilst in between fields there is also field 3.Date_Flag footer 

Your help is highly appreciated 

Thank you 

Top Replies

  • 0
    SUGGESTED
    Somehow, I cannot find the way that the coloured background is only being printed only where there are values and text, the rest of the page will remain blank.

    Not 100% sure I've followed the issue but if the value of any expression results in null or an empty string, the length of that expression will be 0 so will effectively be invisible. The background colour is still respected but there is simply nothing to print in that area of the layout so it will result in a blank area with no colour.

    I need the coloured Box to go down just slightly up from field 4.Account_Ref_footer, whilst in between fields there is also field 3.Date_Flag footer 

    Again not entirely sure I've followed the issue here but an element can only exist in a single section. If an element is sized such that it extends beyond a a section a warning will be produced in Report Designer to inform you of this and, depending on the exact settings for the element/section, the data will either be truncated or the section height will be expanded to fit the whole height of the element.

    If what you want is for the whole 'row' to have a background colour regardless of if all of the fields have data or not then your best bet would be to use the Toolbox -> Draw Box option. Once you select this draw a box covering the full height and width of the '2. Header_Number footer' section then right click on the box and select Order -> Send to Back. In the border properties of the box turn off all 4 borders, and in he background property set it to your desired colour. Then repeat the same thing for the '3.Date_Flag footer' section i.e. you will have 2 separate boxes, one in each section. This should result in a consistent background colour that gives the appearance of spanning multiple sections.

    Note you can do things such as setting linked dimensions for the boxes to make it easier to keep them a at the same size should you ever need to change that, but it is not a necessary step, and probably an unlikely type of edit you'd want to make once you have them set right to start with. The other thing to mention would be that if you have multiple transactions you will get a solid block of colour covering all of the transactions. If this is what you want e.g. you are wanting to 'highlight' that area of the report, then this should work OK. If however you are trying to aid readability e.g. add a background to alternate rows then you'd need to do additional work such as using conditional formatting to suppress printing of the boxes on alternate rows.

    Hope that helps.

  • 0 in reply to Darron Cockram

    Thank you for your kind reply.

    Seems you understood well want I need, but unfortunately somehow when I added the box in '3.Date_Flag footer' section still did not manage to get the background further down. 

    I am attaching 2 files to see how I wish the layout to be.

    A - statement design (original)

    B - statement from Sage Report design

    If there is way to solve this, it will be highly appreciated.

    Thank you 

    A- STATEMENT DESIGN.pdfB - STATEMENT SAGE.pdf

  • 0 in reply to Philip Micallef
    SUGGESTED

    Ah, so you want the coloured section to extend to the bottom of the page. The reason it doesn't do that is that there is no section after the last data 'row' and the footer. Effectively the area in between is simply blank with nothing printed there so nothing to set a background colour on in that area.

    All is not lost thought and you can still achieve what you want, but the way to deal with this is to use the templates feature. With a template you essentially define a 'background' that can be applied to layout/report. So in this case we could use a template to define the boxes with the coloured background and set them to the appropriate full height of the area of the page regardless of whether any data is printed there. We will need to do a bit of maths to work out the correct position and height of the boxes in the template but this is a relatively easy calculation. This is what we'd need to do:

    1. In Report Designer select File -> New -> New Template. The template will open with a single details section that has a height of 11.6929 inches (the height of an A4 page)
    2. Add a box to the details section and set its background colour to the desired one. Don't worry too much about the position or height of the box at this step.
    3. Set the width of the box to be the width you need for the first field (Date in your example) i.e. in you actual layout check the width of the field via the dimension property and set your boxes with to the same, or possibly slightly wider if you want a bit of padding. Hard to give an exact width here as it is more an art than science to getting it looking right when printed.
      NOTE: When adjusting the width of the box I suggest doing it via the properties window and typing in the exact size rather than resizing with the mouse, as the properties window give much more exacting control.
    4. Set the X position of the box to be the same as the X position (horizontal location) of the first field. Again this is date in your example and again you might want to allow for some padding.
    5. Next we need to determine the Y position (vertical location) and height for the box. This is determined simply by adding up the height of any sections above the data row sections, In your case you only have the one section above which is '1. ACCOUNT_REF Header' and you can see the height of this in the properties window if you click on the section header in your layout. Using the built-in layout 'A4 Statement, Grouped & O/S Items - Plain Paper (Print or Email)' as an example the height of this section is 4.5382 inches, so your would set the Y location property of your box in the template to 4.5382, again allow for adding if you want to, and again I recommend using the properties window to set this instead of using the mouse.
    6. Finally we need to determine the height for the box. This is determined by taking the overall height of the page (11.6929 inches), and subtracting the height of the header and footer sections. We already know the height of the header sections from the previous step so we just need to get the height of the footer sections in your layout. Again we get this simply by clicking on the section heading and inspecting the properties window. Following the example of the built-in layout 'A4 Statement, Grouped & O/S Items - Plain Paper (Print or Email)' there are 2 sections below the data sections, namely '4. ACCOUNT_REF Footer' and '5. ACCOUNT_REF Footer' which have heights of 1.3535 inches and 0.3937 inches respectively. This gives us a calculation of:

      11.6929 - 4.5382 - 1.3535 - 0.3937 = 5.4075

      Set the height property of the box to the result of this calculation.

    7. Repeat steps 2 though 6 for the other fields - reference, description, outstanding and payments.
    8. Save the template.
    9. Back in your layout set the template via the properties window - click on the ... button in the template property and browse to file you saved above.

    Note that in the editor the boxes will look like they extend past the data sections and in to the footer sections, but this is simply because the editor is not based on the height of the page, and is instead based on the height of the visible sections. When you preview, print or export it should look right and match your desired output.

    That might all sound a bit complicated but I've had to make the steps fairly generalised as every layout is different. Hopefully that will get you what you need but let me know if you need any further advice.