Categories
- All Categories
- 10 Oracle Analytics Sharing Center
- 13 Oracle Analytics Lounge
- 209 Oracle Analytics News
- 41 Oracle Analytics Videos
- 15.6K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 76 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
conditional layouts in one rtf template in BI publisher

Summary
conditional layouts in one rtf template in BI publisher
Content
Hi All,
I need to develop rtf template which includes 2 layouts in one rtf file.
Meaning, conditional layouts
I am attaching sample doc for this.
If CF_FLAG=’Y’ then layout should print header and footer details in every page.
If CF_FLAG=’N’ no header and footer required
Can you please provide sample/help me on this how to develop ?
Thank you very much!
Answers
-
Hi there, Word in managing line printing. Nevertheless, when it comes to total at the end, it becomes a bit tricky.
If you want you total always at the same place on different pages, you'll have to use line counter to Limi lines per page.
There's a couple of example on the web on how to use line counter.
In the header and footer, you can't use field to hide the code , so you have to code and it could become quickly messy.
Also, you may use Template in your doc
For example, at the very bottom of your rtf document, write :
<?template:LQ_FOOTER?>
insert your code here...it could be a table with image, sub total, etc.
<?end template?>
In the body or let say in the footer, just write
<?call:LQ_FOOTER?>
0 -
Hello,
Changing header/footer means changing section in word. I've tried to make conditionnal section in rtf template, but never works. Conditionnal page break works, but for me, conditionnal section break no.
But has that changed in newer versions of bi publisher
(sorry for my english)
regards
0 -
could you please send me that rtf template if you have
0 -
This is pretty much similar to conditional display in below blog. Make sure CF_FLAG is in outermost group.
0 -
Thank you very much for early reply!
But how to handle multiple lines for cf_flay=Y layout? how about header and footer(print bottom of the page)?
please let me know if any questions or comments!
i have tried to put 2 layouts in rtf template based on Flag values , it is working fine when the data has not more than 35.
If the lines are more then 35 , i mean 50 lines ,it is printing in 2nd page , but its format is not good(The total section is printing on middle of the 2nd page not bottom of the page)
Thanks again!
0 -
Hi, you’re right; template will be called on each page if it’s in the footer.
The easiest way is probably to have two body/layouts in one rtf to avoid calling problems.
So, let say you have an rtf document
- On physical page 1 of the word
document, structure it this way :
a- Header
b- Body
In
this section, place something like<?choose:?>
<?when: CF_FLAG = ‘Y’?><?call:template1?><?end when?>
<?when: CF_FLAG = ‘N’?><?call:template2?><?end when?>
<?otherwise:?> <? call:template1?><?end otherwise?>
<?end choose?>
c - Footer
- - On physical page 2 of word document,
<?template:template1?>
all the text that need to be shown in template1
<?end template?>
<?template:template2?>
all the text that need to be shown in template2
<?end template?>
0 - On physical page 1 of the word
-
Thank you Chris.
If i use template cal in footer it will repeat in all pages as well as it will effect to CF_FLAG 'N' layout as well correct?
i am having format issue, if i have more than 1 page lines, per one parameter, the output is not look and feel type.
how to handle 2 layout in one rtf template?
I have tried like below:
CF_FLAG 'N' in 1 rtf template created in oracle xml admin like a sub-template
CF_FLAG 'Y' in another 1 rtf template created in oracle xml admin like a sub-template
called above 2 sub-templates in one main templates.(see below)
<?import:xdo://XTEST.CF_FLAG_N.en.00?>
<?for-each@section:G_DET?>
<?choose:?>
<?when://CF_FLAG!="Y"?>
<?call-template:FLAG_N?>
<?end when?>
<?end choose?>
<?end for-each?>
I am able to call only one sub-template.
but how to handle below condition based templates, in main template.
<?when://CF_FLAG="Y"?>
<?call-template:FLAG_Y?>
<?end when?>
<?when://CF_FLAG!="Y" and //CF_FLAG="Y"?>
<?call-template:FLAG_N?>
<?call-template:FLAG_Y?>
<?end when?>
can you please help me on this?
0 -
Suppose,
On physical page 1 of the word
--Header details
--Header details
--Footer Details
On physical page 2 of the word
It has T&C type description/values based on FLAG tag.
If i use your way
<?when: CF_FLAG = ‘Y’?><?call:template1?><?end when?>
<?when: CF_FLAG = ‘N’?><?call:template2?><?end when?>
So, the page 2 of the word CF_FLAG=N also printting first layout header and footer details correct?
Can u please send me Ur email id?
Thank you very much!!
0