At 11:08 PM 3/3/2016, Kayza Kleinman wrote:
We have a report that we need to run on a regular basis that has
about 5 rows per page.
However, each row stretches across the width of 2 pages, and each
page needs to have
its specific background on it.
Does anyone have any idea how I can do this without running two
reports? Right now I
have a routine that prints all of Page 1 then all of Page 2 and
someone then needs to
physically interleave all the pages. That's not a viable path though.
Kayza,
Here's how ...
01. While in Report Designer, place a "Page Style" band on your report
Report Designer | Main Menu | Report | Page Style
02. Stretch the Page Style band as the same size of the desired page
03. Place a "Shape" object on the Page Style band and enable the
Parent Height and
Parent Width
Standard Controls | Shape
Right-click on the Shape object and then click on Parent Height
Right-click on the Shape object and then click on Parent Width
04. Assign a Component ID to "Shape" object, such as "cidShape"
Right-click on the Shape object and click on Component ID ...
Value: cidShape
05. Use the sample code below as "On Before Generate Custom EEP..."
for Page Style
band
Right-click on Page Style Band and click on On Before Generate
Custom EEP...
-- Example
-- Page Style On Before Generate EEP
-- Set Page Colors for Page 1 and Page 2
SET VAR vPageNumber TEXT = NULL
GETPROPERTY REPORT PAGENO 'vPageNumber'
SWITCH (.vPageNumber)
CASE '1'
PROPERTY cidShape BRUSH_COLOR 'YELLOW'
BREAK
CASE '2'
PROPERTY cidShape BRUSH_COLOR 'NAVY'
BREAK
DEFAULT
PROPERTY cidShape BRUSH_COLOR 'WHITE'
BREAK
ENDSW
CLEAR VARIABLES vPageNumber
RETURN
That's all there is to it!
Hope that provides you with some directions to accomplish your goal
of assigning
specific background color for page 1 and page 2 of your report.
Feel free to reach out to me with any questions.
Very Best R:egards,
Razzak