Skip to main content

Notifications

Announcements

No record found.

Report Writing Series: Sections

I'm continuing the Report Writer series with a brief article on Sections in Report Writer. Every once in a while I see a question on a forum "my field didn't print and I don't know why!". Hopefully this will help answer that kind of question!

Generally speaking a report will have at least 5 sections to it, in this order:

  • Report Header - this prints on the first page of the report only
  • Page Header - depending on your settings, this prints on every page or on "page 2" onwards.
  • Body - the guts of the report
  • Page Footer - same as Page Header, this either prints on the bottom of every page or only on Page 1 to the second last page of the report.
  • Report Footer - this prints on the last page only

Page Header & Footer

First, let's start with the Report Definition window, specifically the Printing Options section. This will help you determine when your Page Header (PH) and Page Footer (PF) sections will print.

Pic_RW_ReportDefinition

In my screen shot, this particular report will NOT print a "first page" Page Header but will print a "last page" Page Footer. Looking at the layout of this report, here is a description of what will and won't print on the first page.

Pic_RW_Sections

At the very top is the PH (Page Header). In my case, this will notprint on the first page, but it will print on Page 2 to the last page of the report. You'll notice part of it is exactly the same as the RH (Report Header) section. On this report, the Report Header (first page) shows the legend of what the report options were, which only need to print on the first page. I could change this - and print the same thing on every page by moving those sections to the PH section and hiding the RH section. Similarly to the PF and RF sections (Page Header and Report Header respectively), on this report the PF was already hidden and I needed to go into the Section Options to unhide it for this pic. It is completely empty because this particular report doesn't need two footer sections or a footer on each page. When might you want a PF section? Perhaps you have a report where you want a subtotal of the report data on the bottom of each page - that's a good time to have a page footer.

What does this mean when you're editing or creating a report?

This impacts where you put things as well as where you need to edit or move titles. One very common mistake I see is someone edits a report but uses sample data that is only one page long. They never test what Page 2 beyond looks like. Then Page 2 prints and lo and behold, the titles don't line up. Why? They didn't make the same changes in the PH section that they did in the RH section. Similarly, I've seen people make a ton of changes to the PH section only to ask why their new changes didn't show up. If you print a one page sample, and didn't make the same changes in the RH section, your changes won't print (assuming you have the same Report Definition settings of no first page header). So, test with a multi-page report if you can and make sure you keep your PH and RH sections in sync, if they are intended to be similar like they are for many reports.

Other sections

There are tons of other sections on most reports in Dynamics GP, which are all sections of things where reports are grouped or sorted. Below is what the section options window looks like. You can open this window by going to the Tools menu in Report Writer.

Pic_RW_sectionoptions

First, this shows you what sections are visible in your Report Writer layout window. This is the part of Report Writer where you become a bit of a detective sometimes to figure out what the default sections are, if they are not obvious. In my report, a Payables Historical Aged Trial Balance, there are 2 extra header sections and one extra Footer section. To view more about the extra sections, click on one, then click on Open to view the settings. That is what tells you what the section is for.

Pic_RW_section1

In this particular case, the section is a grouping by Vendor ID. The sections are "Print when this field changes" meaning, for each vendor ID change, print this section. If you look back at the layout window screen shot above, you will see this section called H1 (note: it's listed first, therefore it's the first header, the numbering is in sequence from top to bottom). The H1 section contains only Vendor information, no transactional information, because that wouldn't print properly up here... it also contains some headings, so that within a report for this vendor (aging detail in this case), the headings print before that vendor's transactions to make it easier to read. Here is where you have some options. Some people prefer the headings to print once per page, not once per section. In that case, I would move the headings (the Aging Bucket fields, etc.) up to the RH section AND to the PH section. Remember, this report prints the RH for page 1 and the PH for page 2 onwards. So, I need it on both headers so it prints at the top of each page. Here is what the report looks like before the change:

Pic_RW_HATB_before

I've modified this report a bit already to highlight each new vendor section and the total due - but I left the headings at the "per vendor" section. Each vendor has the same headings. Here is what it looks like moved to a different section:

Pic_RW_HATB_after

Now the headers are at the top of the page, and there is no additional info between the vendors. Personally, I find this harder to read but it does save space and make the report look a little less cluttered.

When it gets a little more complicated!

One last example of where being a detective comes in handy. Project Accounting is one reporting dictionary where so many things are configurable in the product itself, that the Report Writer side seems entirely generic and a giant mystery! Here's a screen shot of a Project Accounting invoice and it's a bit scary looking at first!

Pic_RW_section2

Every section is generically named - Group 1 Break, huh? Then you go into a section, and the "Print when field changes" doesn't exactly help. One key field that may help is "Suppress When Field is Empty" - this is a calculated field, that defines when this section prints or doesn't print. Sometimes I will look at the calculated field to see if I can figure out what the break or related data is. Unfortunately in this case, the calculated field simply refers to the same field name above, a generic "group 2 break" field. So, that doesn't help me here. Next, I will look at the fields that are in that section. Most times this is where I start to figure out the sections. For example, this section only has one field which is a calculated field. Here is what it says:

Pic_RW_CalcField

From this point on, I should point out, if you don't have an understanding of the underlying structure of the module you are creating a report for, that is the best place to start... someone who doesn't know anything about Project Accounting would be hard-pressed to figure out the sections by looking at the report. For me, having used PA for years and years, this is where it starts to make sense. This section I now know is a heading that simply describes the content to follow - either Billings or Fees.

What if that doesn't help?

I'd be lying if I said I could figure it all out just by doing this. Sometimes I don't want to spend the time looking at this level of detail so I will take another approach: put a unique piece of text in each section I need to know more about and then print the report - or print several of the reports with different options enabled. Looking at the raw output tells me what prints where and hopefully that will help me figure out if it's a section I could hide or need to keep.

In Summary

The biggest caveat I can give you for sections - particularly around whether you can delete or hide sections - is to go slowly and try things out, continually printing test reports to see the effect. Test with lots of data, especially in a report with multiple sections. The sections are usually grouping and totaling things and a major change in a section will result in incorrect data. TIP: know your test data. Create your test data before you start modifying too much, so you have a baseline report that has correct groups, subtotals and totals before you make major changes. As you make changes, specifically hiding or removing sections, check all of the subtotals and totals. Removing a group that matters, will make a subtotal or total incorrect in a hurry and should stand out. Hopefully this gives you a bit of headway into what the various sections mean and how to navigate them.

Comments

*This post is locked for comments