Tuesday, July 13, 2010

Practical Usage for Sectioning

Most often you would have used Sectioning for formatting reasons. Here's how you could use Sectioning, Page-break concepts to make a single list report work like 2 lists.


Requirement: Display Data for Current Year and Previous Year as 2 separate lists on 2 separate pages.

Normally you would have used 2 separate queries for the 2 list reports. Using Sectioning and Page-Break you can use a single query to achieve this. You can use this method when you need to display multiple lists that differ in terms of filters alone.

Solution:

Step 1: Drag Product, Sales, Year in to the report

Step 2: Create a filter to filter the data for current and previous year.

Step 3: Create a data item called Section Title.


case when [YEAR] = extract(year from current_date)
then 'Current Year'
else 'Previous Year'
end


Step 4: Section on the Section Title data item



Step 5: Create a page break on Section Title data item.






 

No comments: