Nested tables in RTF templates

Hi,
I've developed several templates including nested tables(to display parent/child transactions together in a single column group, displaying all the detail transactions but the parent only once), in PDF output this looks fine. However the users want all their output in Excel, this same layout is not picked up by Excel(all column headers for the data in the nested table move to the right, while all the data in the nested table is grouped under a 'merged cell' column header). Output of BI Publisher reports in Excel is generally terrible with a template designed for publishing in PDF, usually I can solve this with a lot of tweaking but haven't found a solution for this issue yet. Has anyone else run into this formatting issue and may have a tip to solve this?
Regards,
Arthur

Hi,
You need to declare a TYPE object as and then use it in the table structure.
CREATE TYPE type_emp IS TABLE OF VARCHAR2(15);
CREATE TABLE Biscuits Company SA
(company_name COMPANY NOT NULL,
Company_Owner VARCHAR2(20) NOT NULL)
NESTED TABLE staff_tab STORE AS type_emp;
Please see the link for more info.
http://www.developer.com/db/article.php/10920_3379271_3
Thanks

Similar Messages

  • PA_CONTRACT_XSLFO: How to invoke a RTF-template with related data template

    Dear Reader,
    actually I want to extend the standard Document Type Layout for a Purchase Agreement Contract with additional data from approved supplier list (ASL).
    Therefor I have created a RTF-template and a data template with the needed sql-statement. For testing I put this in a standalone concurrent programm and it works fine (result was a blue table with all data rows).
    Next step for me was to invoke the RTF-template into the PA_CONTRACT_XSLFO template for extending the Document Type Layout for my Purchase Agreement Contract. So I put the neede invoke-statements
    <xsl:import href="xdo://XXOC.XX_RTF_TEMPLATE.de.00/"/>
    and
    <xsl:call-template name="XX_RTF_TEMPLATE"/>
    into the XSLFO-template. Also I extend the RTF-template with the define template statement
    <?template:XX_RTF_TEMPLATE?>
    So all seems to be fine.
    As result I get the standard document for Purchase Agreement Contract with the additional blue table from RTF-template BUT WITHOUT DATA !
    From my point of view there is no execution of the sql-statement in data template. But I dont know why.
    Do Oracle support a combination of XSLFO-template with data template?
    [XSLFO-template] with related [XSD-data definition]
    calls [RTF-template] with related [data template (with included sql-statement)]
    Thanks for your help.
    Best regards
    Mario.

    How to call a rtf template from another rtf template by passing a value try in main template create hyperlink of url with parameters for another template
    http://bipconsulting.blogspot.ru/2010/02/drill-down-to-detail-or-another-report.html
    When user pull a quote report from siebel this new rtf template should attach to the quote at the end.it'll be only another report
    IMHO you can not attach it to main. it'll be second independent report
    you can try subtemplate but it's not about rtf from rtf by click
    it's about call automatically rtf subtemplate from main rtf based on some conditions
    for example, main template contain some data and if some condition is true then call subtemplate and place it instead of its condition

  • Nested Tables Repeat Header Row RTF Output Not Working v5.6.2(PDF does)

    All,
    Has anyone used nested tables in heading rows where they are set to repeat nested table header row across page breaks for RTF output ? This seems to work for PDF generation (line breaking enforcement doesn't) but I don't even get RTF Header ROWS indicated in my RTF output document. I have enabled them in my RTF template for the outer table row plus the inner nested table. Is this possible for RTF output or have I not indicated something in my RTF template or grouping clause ??
    Thanks,
    Tom

    All,
    Has anyone used nested tables in heading rows where they are set to repeat nested table header row across page breaks for RTF output ? This seems to work for PDF generation (line breaking enforcement doesn't) but I don't even get RTF Header ROWS indicated in my RTF output document. I have enabled them in my RTF template for the outer table row plus the inner nested table. Is this possible for RTF output or have I not indicated something in my RTF template or grouping clause ??
    Thanks,
    Tom

  • In Rtf Template ,table is not fit with window after hide columns

    Hi,
    In my RTF template i have table with 5 columns in that 3 colums will display based on condition. During runtime it showing correctly with 5 columns i.e fit to window.
    suppose if any of column is not displayed(hide) and table is shrinking and not fit with window.
    Tried with following option in word doc:
    Right click on table and select Auto Fit--> Auto fit to window. but didn't work. Please let me know is any options to make table to fit with window.
    Thanks..
    Edited by: user9530489 on May 3, 2011 1:09 PM

    Hi,
    I've changed the output device in order to test with the LP01 printer.
    This device is not active in SPAD but if i setup my action with this device I can preview the smartform. It is not possible to preview the smartform with the printer that I'd like to use.
    Any ideas?
    Thanks in advance,
    Stephanie

  • RTF Template: sums with nested groups

    Hi all,
    i've got quite a pickle of a problem it seems ...
    my data structure looks something like this:
    <COMPANY>
    --<STORE>
    ----<DEPARTMENT>
    ------<ITEM></ITEM>
    ----</DEPARTMENT>
    --</STORE>
    </COMPANY>
    multiple companies can have multiple stores, which in turn have multiple departments, which also in turn can have multiple items.
    my select statement looks something like this:
    select company_id,
    store,
    department,
    item,
    sum(qty) as my_sum
    from
    table_1, table_2, table_n
    where ...
    group by ...
    order by company_id;
    my xml data template grouping looks something like this:
    <group name="G_company" ...
    --<element name="E_company" ...
    --<group name="G_store" ...
    ----<element name="E_store" ...
    ----<group name="G_department" ...
    ------<element name="E_department" ...
    ------<group name="G_item" ...
    --------<element name="E_item" ...
    --------<element name="E_item_total" value="my_sum" ...
    ------</group>
    ------<element name="E_department_total" value="G_item.E_item_total" function="SUM()" />
    ----</group>
    ----<element name="E_store_total" value="G_department.E_department_total" function="SUM()" />
    --</group>
    </group>
    my report currently looks something like:
    ------------------<b>Store</b>--------<b>Dept</b>---------<b>Dept</b>---------<b>Item</b>-----------<b>Item</b>---------------<b>Store</b>-----------<b>Dept</b>----------<b>Item</b>-----------<b>Item</b>
    <b>Company</b>---Townsville---TDept_1------TDept_2-----TDItm1----------TDItm2-------------Newcastle------NDept1----------NDItm1--------------NDItm2
    ---CompanyA------2----------------4------------3---------------2---------------1------------------1-------------------3----------------2-------------------4
    ---CompanyB------1----------------2------------4---------------5---------------2------------------1-------------------6----------------3-------------------1
    if i just focus on the Store --> Department --> Item, i achieved this in my RTF template by doing something like the following:
    <table>
    --<tr>
    ----<td><?for-each-group@column:G_store;E_store?>Store</td><td><?for-each-group@column:G_department;E_department?>Department</td><td><?for-each-group@column:G_item;E_item?>Item<?end for-each-group?> <?end for-each-group?> <?end for-each-group?> </td>
    --</tr>
    --<tr>
    ----<td><?for-each-group@column:G_store;E_store?><?E_store_total?></td><td><?for-each-group@column:G_department;E_department?><?E_department_total?></td><td><?for-each-group@column:G_item;E_item?><?E_item_total?><?end for-each-group?> <?end for-each-group?> <?end for-each-group?> </td>
    --</tr>
    </table>
    as you can see, the store --> department --> item go across the report horizontally.
    my problem is i want to have grand totals for each column, like:
    ------------------<b>Store</b>--------<b>Dept</b>---------<b>Dept</b>---------<b>Item</b>-----------<b>Item</b>---------------<b>Store</b>-----------<b>Dept</b>----------<b>Item</b>-----------<b>Item</b>
    <b>Company</b>---Townsville---TDept_1------TDept_2-----TDItm1----------TDItm2-------------Newcastle------NDept1----------NDItm1--------------NDItm2
    ---CompanyA------2----------------4------------3---------------2---------------1------------------1-------------------3----------------2-------------------4
    ---CompanyB------1----------------2------------4---------------5---------------2------------------1-------------------6----------------3-------------------1
    ---<b>Total</b>------------3----------------6------------6---------------7---------------3------------------2-------------------9----------------5-------------------5
    so i did a SUM on each of the E_store/department/item_totals like:
    <?sum(current-group()/E_store_total)?>
    now that works for E_store_total ... but not for E_department_total and E_item_total!
    it seems BI Publisher doesn't like sums used with inner loops.
    because if i extract just the column for E_department, the grand total value at the bottom is correct!
    but once i put back the outer store loop, it breaks.
    what i am currently getting with this is:
    ------------------<b>Store</b>--------<b>Dept</b>---------<b>Dept</b>---------<b>Item</b>-----------<b>Item</b>---------------<b>Store</b>-----------<b>Dept</b>----------<b>Item</b>-----------<b>Item</b>
    <b>Company</b>---Townsville---TDept_1------TDept_2-----TDItm1----------TDItm2-------------Newcastle------NDept1----------NDItm1--------------NDItm2
    ---CompanyA------2----------------4------------3---------------2---------------1------------------1-------------------3----------------2-------------------4
    ---CompanyB------1----------------2------------4---------------5---------------2------------------1-------------------6----------------3-------------------1
    ---<b>Total</b>------------3----------------4------------3---------------2---------------1------------------1-------------------3----------------2-------------------4
    it is doing the grand total for Store correctly, but it just gives me the first row for the other grand totals.
    i have tried:
    1. using the CUBE function in my SQL query, which gives me the results i want with all the totals i want, except i cannot seem to translate it into XML.
    2. trying to use the pivot table option but i can't seem to ever get it to work the way i want.
    3. using a separate sql query to retrieve the grandtotals but that doesn't work either because of the multiple looping required.
    i'm at a complete dead end, any help would be really appreciated!
    ps. i'm a very fresh newbie

    Hi Vetsrini,
    thank you very much!
    when you said to use current-group i was confused because i thought i was using it, but when i opened up the RTF template i realized you meant the actual looping.
    so instead of doing:
    <?for-each-group@column:G_DEPARTMENT;E_DEPARTMENT?>
    <?sum(current-group()/E_STORE_TOTAL)?>
    i should have been doing:
    <?for-each-group@column:current-group()//G_DEPARTMENT;E_DEPARTMENT?>
    <?sum(current-group()/E_ITEM_TOTAL)?>
    thanku!
    S.

  • Best approach -To create RTF template having more than 50 tables.

    Hi All,
    Need your help.I am new to BI publisher. Currently we are using BIP 11g.
    I want to develop.rtf template having lots of layout and images.
    Data is coming from different tables (example : pulling from around 40 tables). When i tried to pull data from 5 tables by joining tables. It takes more time using data model in BI publisher 11g saved in xml and used in word doc.
    Could you please suggest best approach  weather i need to develop .rtf template via data model or query to generate a report.
    Also please suggest / guide me .
    Regards & Thanks in advance.

    it's very specific requirements
    first of all it's relate to logic behind
    as example 50 tables are related ? or 50 independent tables ? or may be 5 related and another independent ?
    based on relation of tables you create sql statement(s)
    how many sql statement(s) you'll have lead to identify ways to get data, as example, by package or trigger etc
    kim size of resulting select statement(s)
    if size say 1mb it's must be fast to get report but for 1000mb it can consume many time
    also kim what time it's not only to select data but to merge data and template
    looks like experimenting and knowing full logic of report is only ways to get needed output in projection of data and time

  • RTF Template: table that goes to the next page

    Hi All,
    I am building an RTF template.. The basic layout consists of one page only, and there's a table in it. Depending on the data, there can be quite a few rows. For some reason, if the data does not fit on the first page, the entire table shifts onto the second page. However, the table should start on the first page independent of the row count. Once again, your help would be very much appreciated. :)
    Regards, Matilda

    Hi Vetsrini and Amit, thanks a lot to you both.
    What you suggest works well when there is only one template row that is repeated... I actually have two template rows in the table, since depending on certain elements in the data row different handling is required. Is it so that I would need to work everything into the same template row to get this row-break-accross-pages-functionality?
    The funny thing is that the table breaks properly for page 3, 4, etc (with a longer data), just that it starts only at the second page.
    Regards, Matilda

  • Page break on nested table

    Hi,
    I am getting blank page because of page break after nested table.
    When page is full with the records then because of nested table, it added one space after that.
    Has anyone faced this issue before?
    Thanks

    Hi,
    Upload the .rtf template and XML sample so we can see your issue.
    Also I recommend you to review our page-break document:
    http://docs.oracle.com/cd/E28280_01/bi.1111/e22254/create_rtf_tmpl.htm#BIPRD2457
    Regards,
    Liviu

  • Do nested tables conflict with ?split-by-page-break:? -getting blank pages

    I have an RTF template with multiple levels of groupingwith sub-totals and pagebreaks at several levels. I'm using nested tables to keep the lowest level group together. The nested table works fine as far as keeping the rows together - if a group doesn't fit on a page, it is pushed to the next page; however, it has created some blank pages in the report. The first time I report the lowest level group details, if they don't fit on one page, I get a blank page followed by the data. Each time the lowest level group changes, this may or may not occur depending on the amount of data.
    If you have come across this before or have some suggestions, I would really appreciate a response. I've been working on this for quite some time and have run out of things to try.
    The template is quite complex and the XML very long, so I won't post. However I can email them to you if you'd like to take a look.
    Thank you for your help,
    Tam
    Edited by: Tam_11 on Nov 19, 2009 2:42 PM

    Thanks for replying.
    Yes, I tried removing the <?split-by-page-break:?> and using MS hard page break (ctrl-enter) and that doesn't work either. My totals moved to a separate page by themselves and I'm still getting the blank pages.
    <?split-by-page-break:?> did exactly what it was supposed to until I added in the nested tables. It's very possible that I did something wrong with my nested tables (only my second XML report). Does anyone have a sample with nested tables that they would be willing to share?

  • Complex if statement in rtf template?

    Hello,
    I want to build an if statement in rtf template, the idea is like:
    <?if:address!='' and phone!=''?>
    <?end if?>
    what's the correct way to do it if it is possible? Thanks in advance!
    Shichao

    stevencallan wrote:
    Conditional statements, in the user guide or the report developer guide, depending on the version you use.
    Page 7-62 in the 10.1.3.2 user guide:
    Use an if statement to define a simple condition; for example, if a data field is a specific value.
    1. Insert the following syntax to designate the beginning of the conditional area.
    <?if:condition?>
    2. Insert the following syntax at the end of the conditional area: <?end if?>.
    For example, to set up the Payables Invoice Register to display invoices only when the Supplier name is "Company A", insert the syntax <?if:VENDOR_NAME='COMPANYA'?> before the Supplier field on the template.
    Enter the <?end if?> tag after the invoices table.Thanks for the reply. But what about two conditions in one if statement? That was my question. :)
    Shichao

  • How to call a rtf template from another rtf template by passing a value

    Hi Gurus,
    Its about calling a rtf template from another rtf template by passing a value.
    My requirement is like:
    I got a quote report from Siebel, based on the product PartNumber I need to pull product description or literature from another database database.
    My approach is something like; get a partnumber from quote report pass it to another rtf template which uses the partnumber and get the data from table using DataSource. When user pull a quote report from siebel this new rtf template should attach to the quote at the end.
    I've gone through all available blogs about sub-reports and white papers from Oracle they are not much helpful since I need step-by-step.
    http://www.adivaconsulting.com/adiva-blog/item/36-working-with-rtf-sub-templates.html
    bip-subtemplate-1-132933.pdf
    I'm using 10g obiee integrated with Siebel.
    Just started learning BIP.
    Thanks in advance.
    Edited by: 911927 on Apr 2, 2013 8:56 AM
    Edited by: 911927 on Apr 2, 2013 8:57 AM

    How to call a rtf template from another rtf template by passing a value try in main template create hyperlink of url with parameters for another template
    http://bipconsulting.blogspot.ru/2010/02/drill-down-to-detail-or-another-report.html
    When user pull a quote report from siebel this new rtf template should attach to the quote at the end.it'll be only another report
    IMHO you can not attach it to main. it'll be second independent report
    you can try subtemplate but it's not about rtf from rtf by click
    it's about call automatically rtf subtemplate from main rtf based on some conditions
    for example, main template contain some data and if some condition is true then call subtemplate and place it instead of its condition

  • How can we get Dynamic columns and data with RTF Templates in BI Publisher

    How can we get Dynamic columns and data with RTf Templates.
    My requirement is :
    create table xxinv_item_pei_taginfo(item_id number,
    Organization_id number,
    item varchar2(4000),
    record_type varchar2(4000),
    record_value CLOB,
    State varchar2(4000));
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'USES','fever','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'HOW TO USE','one tablet daily','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'SIDE EFFECTS','XYZ','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'DRUG INTERACTION','ABC','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'OVERDOSE','Go and see doctor','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'NOTES','Take after meal','TX');
    select * from xxinv_item_pei_taginfo;
    Item id Org Id Item Record_type Record_value State
    493991     224     1265-D30     USES     fever     TX
    493991     224     1265-D30     HOW TO USE     one tablet daily     TX
    493991     224     1265-D30     SIDE EFFECTS     XYZ     TX
    493991     224     1265-D30     DRUG INTERACTION     ABC     TX
    493991     224     1265-D30     OVERDOSE      Go and see doctor     TX
    493991     224     1265-D30     NOTES     Take after meal     TX
    Above is my data
    I have to fetch the record_type from a lookup where I can have any of the record type, sometime USES, HOW TO USE, SIDE EFFECTS and sometimes some other set of record types
    In my report I have to get these record typpes as field name dynamically whichever is available in that lookup and record values against them.
    its a BI Publisher report.
    please suggest

    if you have data in db then you can create xml with needed structure
    and so you can create bip report
    do you have errors or .... ?

  • Problem in RTF template

    Hi all,
    I use Bi publisher version (11.1.6 )
    First Question : What is the best template type for making operational reports not statistical report ( RTF template or PDF template or others ) ? --
    Second Question :
    when i try to make report template using RTF template in ms-word by using Bi publisher desktop
    1- How can i make repeating header dynamically ( header contain data from data model ) ?
    2- when i insert an image in the header it did't appear in the runtime ?
    3- when i insert line in the header it did't appear completely just part of the line .

    First Question : What is the best template type for making operational reports not statistical report ( RTF template or PDF template or others ) ? --it will be clear if you look at "Table 2-6 Valid Output Formats for Each Layout Type" - http://docs.oracle.com/cd/E23943_01/bi.1111/e22254/create_report_new.htm#layout_config
    Second Question :
    when i try to make report template using RTF template in ms-word by using Bi publisher desktop
    1- How can i make repeating header dynamically ( header contain data from data model ) ?did you try
    >
    To repeat header rows:
    Select the row(s) that you want to repeat on each page.
    From the Table menu, select Heading Rows Repeat.
    from http://docs.oracle.com/cd/E23943_01/bi.1111/e22254/create_rtf_tmpl.htm#BHBFEJJI ?
    2- when i insert an image in the header it did't appear in the runtime ?
    3- when i insert line in the header it did't appear completely just part of the line .did you try "4.5 Defining Headers and Footers" http://docs.oracle.com/cd/E23943_01/bi.1111/e22254/create_rtf_tmpl.htm#do_handf ?

  • .rtf template and bi server repository failure (newbee tutorial)

    I've installed BISE1 on Windows Server 2003 and followed the tutorial. I successfully fulfilled all the excercises except the last one: the creation of Oracle BI Publisher Report from BI Server Metadata. I have created .rtf template in Word. The preview of the template is working showing data. But when I connect to BI Publisher and open From BI Server report and click View I get the message: "The report cannot be rendered because of an error, please contact the administrator." And as the error detail: String index out of range: -1
    What could be the reason of that problem? Or where to search for the solution of that problem?
    Any help for newbee will be appreciated.
    Regards
    Adam

    Hi,
    I am having the exact same issue.
    I've created a .rtf template using Oracle BI Publisher Desktop. I insert a very simple table and a very simple Chart (a bar graph) just to test it out. The table and the chart wwere showing correct data in the rtf and the pdf when I preview it on the BI server located on my local machine, and when I click on validate template in word, no errors were found. However when I run the pdf in the client BI Publisher Server, the charts doesn't show up in the pdf output while the other contents (headers, tables) are displayed correctly. If I select the html output in the client BI Publisher server, it gives the same error mention above: The report cannot be rendered because of an error, please contact the administrator." And as the error detail: String index out of range: -1
    What security configurations do I have to check? If anyone can give a more detail explanation on this will be greatly appreciated. Thanks in advance!

  • Page Protect in RTF Template

    I have a RTF template in which I have the following defined:
    header text
    start:body
    body text 1
    for each g_group
    text table
    end g_group
    body text 2 **** Page protect this
    end body
    footer text
    I would like to do something like a page protect on the "body text 2" part
    because if the group is longer than 10 rows the "body text 2" goes over
    onto the second page and looks strange when it is split in two parts.
    Has anybody done this?
    I tried using the normal word paragraph formatting but as soon as I put in
    a break I get the following error:
    org.xml.sax.SAXException: element xdofo:start is not supported yet.
    Thanks
    Ellen

    This functionality is only supported for table cells. So you can wrap your body text in a table with a single row/column and no borders. Then you select the table and then select Table -> Table Properties from the menu bar. Select the row tab and uncheck the checkbox:
    [ ] Allow row to break across page
    That should do the trick. Let me know, if it works for you.
    Klaus

Maybe you are looking for