BI Publisher - ignore section - based on info from XML input data

1.5k Views Asked by At

I have the following scenario:

I'm developing a rtf report in BIP desktop 11 containing 3 sections: intro, content, ending. Based on xml input data, each section may generate one or multiple pages. Because each section has it's own unique header and footer, I divided the rtf into 3 sections (with MS Word tool Page Layout -> Breaks -> Section Breaks - Next Page).

.. all of this let's say for an Active client. (first tag from XML is Active/Inactive)

If the client is Inactive the report should generate an empty one-page pdf. Here's the problem: For inactive clients, report generates 3 blank pages (because document is split into 3 sections). Any thougths on how to fix that? Maybe a different approach in dividing the sections?

Thanks in advance.

2

There are 2 best solutions below

0
On BEST ANSWER

Solved the issue by using the following code:

Intro

<?for-each@section:Client[Status='Active']?>

...

Content

...

Ending

...

<?end for-each?>
1
On

Use an if condition before the page break, and then end if after the section, before the next page break. in the if condition, check if the status = Active