Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Repeat content in Header

Received Response
192
Views
10
Comments

Summary

Repeat content in Header

Content

Hello,

I'm working on a report where I need to have a barcode (amongst other content) that repeats itself on all the pages in the header. The thing is that this used to work before because I had this structure :

"content to be repeated in header"

<?start:body?>

"content not to be repeated"

< ?end:body?>

But the thing is I enabled multi-reporting so I could select multiple shipments (my reports are based on a shipment number) so it gives out multiple report in one PDF. So, now that I have activated this, I must use this structure :

<?start:body?>

"content to be repeated"

"content not to be repeated"

< ?end:body?>

If the <?start:body?> comes after the "content to be repeated", I will get this message of error:

element xdofo:start is not supported yet.

PS :The "repeat as header" option in table properties doesn't work

Answers

  • Carlos Carvalho
    Carlos Carvalho Rank 6 - Analytics Lead

    Hello,

    It seems to me you´re problem is alike the one i had in: ​ (perhaps when you read the post you´´ll think is not, but i assure you it is, cause the error is the same; i just did not wrote it).

    Can you try to create a new rtf from scratch (with desired new layout) and run it?

    Regards,

    Carlos

  • timdexter
    timdexter Rank 6 - Analytics Lead

    You can still use the for-each-group with the @section  command

    1. Lose the start body tags

    2. Place the header content into the MSWord header. You will not be able to use formfields in the header (See blog post)

    3. Use for-each-group@section:xxxx;yyyy

    Test it out

    Tim

  • Antoine KAIBER
    Antoine KAIBER Rank 6 - Analytics Lead

    I don't think I really understood your article as I get a blank report when I try to follow it. I created a field with this data in it :

    What am I doing wrong ?

  • timdexter
    timdexter Rank 6 - Analytics Lead

    Hi

    Rather than use the start|end body. USe the MSWord header and combine it with the for-each@section command. This will repeat the contents of the header for each document in the batch and reset the page numbering.

    I wrote up a series of posts on invoice formatting a few years back -

    https://blogs.oracle.com/xmlpublisher/anatomy-of-a-template-i-fixed-row-enumeration

    https://blogs.oracle.com/xmlpublisher/anatomy-of-a-template-ii-headers-and-filler

    https://blogs.oracle.com/xmlpublisher/anatomy-of-a-template-iii-page-totals-and-last-page

    The second one should be of use and is still applicable

    Tim

  • Antoine KAIBER
    Antoine KAIBER Rank 6 - Analytics Lead

    When I say that I have activated multishipment it means I changed the SQL query in the data model (but that's not important here) and I inserted a for-end loop as shown here:

    The "BCR" field is the barcode register which is necessary to be before the barcode in order for it to work. So basically my problem comes from the fields because, If I put the "start body" after the content I want to repeat, the fields won't work because they aren't in the start body. I might be able to move my for-end loop field but my BCR field needs to be before my barcode.

  • Antoine KAIBER
    Antoine KAIBER Rank 6 - Analytics Lead

    1. I deleted start and end body

    2. I wrote the code <?format-barcode:SHIPMENT_XID;'code128a'?> directly in the header and this is what I get :

    image

    This super long barcode displays this way in the report but I don't know if I can move it to the right, it seems pretty challenging ( for me) as the barcode in the rtf (above) is huge...

    image

    But appart from the barcodes position, putting it in the header disables the multiple barcodes -> I get the rest the information for both shipments but the barcode (and PUS#) stay the same, it keeps the number of the first shipment. If i put my <?for-each-group:SHIPMENT;./SHIPMENT_GID?> in the header, I do get the multiple barcodes but both in the same header:

    image

    3. Actually (my needs have changed) I would like to put a specific table (the one with arrival, departure, service transport, service provider) in the header each time there is a page with a new stop that belongs to a shipment. Example :

    Page 1:

    Shipment N°XXX1 - barcode XXX1

    Header (table with arrival etc..)

    Stop 1

    *content of stop1*

    ...

    ...

    Page 2:

    Shipment N°XXX1 - barcode XXX1

    Header (table with arrival etc..)

    Stop 2

    *content of stop2*

    ...

    ...

    Page 3:

    Shipment N°XXX1 - barcode XXX1

    NO Header

    *Signature*

    Page 4:

    Shipment N°XXX2 - barcode XXX2

    Header (table with arrival etc..) -> header is different from header of Shipment N°XXX1

    Stop 1

    *content of stop1*

    ...

    ...

    And so on...

    So I suppose my encoder isn't <?for-each@section:SHIPMENT_XID?> anymore because it needs to take into account my shipment stop.

    PS: You should have the rtf I sent you by mail several weeks back, this would help you understand what i'm talking about when I talk about stop-num etc...

  • Antoine KAIBER
    Antoine KAIBER Rank 6 - Analytics Lead

    Should I have this in my RTF template in MSWord Header ? :

    I'm sorry but i'm lost, I found documentation on internet but I can't find my answer...

  • Antoine KAIBER
    Antoine KAIBER Rank 6 - Analytics Lead

    Hello,

    Do you know what seems to be the problem in my header ? This is what I have in my template

    image

  • Antoine KAIBER
    Antoine KAIBER Rank 6 - Analytics Lead

    Ok I have deleted a For-each loop and it works fine now, sorry for spamming my thread... :

    image

  • Antoine KAIBER
    Antoine KAIBER Rank 6 - Analytics Lead

    For information I've added this for-each@section outside the header which seems to work better :

    image

    The template changes the information in the header but all of the rest of the template is blank :

    image