Forum Discussion

JuleneDS's avatar
JuleneDS
New Contributor II
2 months ago

Report Book - Loop with a XFBR string

We are looking to turn some of our existing cube views into report books to loop through entities. Right now we use an XFBR string (referencing Brapi.Workflow.Metadata.GetParent) instead of a parameter to determine the entity. Is it possible to create a report that loops through the entities with the XFBR string or would we have to duplicate the cube views and use a parameter instead? 

  • Henning's avatar
    Henning
    Valued Contributor II

    Hi, I may be misunderstanding the question as I am not sure why you are using GetParent.

    However, to loop through entities in a cube view to put the same cube view multiple times into a book (PDF; Excel) you need to create a Loop (Documentation: Loop) and a Change Parameter (Documentation: Change Parameters) in your book.

    The documentation gives the example of using all base entities in a Loop using the Member Filter Option:

    • E#[NA Clubs].Base
      This loops over each base entity under NA Clubs and performs the process for however many base entities there are.

    And below the loop one has to use a Change Parameter and set Change POV to True, as per documentation:

    • E#[|Loop1Variable|]
      POV: Set to True to change the book’s POV without having to change the actual cube view or report.

    (It's been a while since I set this up myself, so forgive me in case there is some inaccuracy here. Test it to make sure it works as intended.)

    The documentation is comprehensive and hopefully gets you where you need to get to:

    Presenting Data Using Report Books

    • JuleneDS's avatar
      JuleneDS
      New Contributor II

      Yes this is how we are making the report book, it works if a parameter is set in the entity POV, but with the XFBR strings it doesnt work. (I'm not sure why we are using GetParent either but our CVs that were build by our consultants all use it instead of just referencing the WF). 

      • Henning's avatar
        Henning
        Valued Contributor II

        Thank you for the feedback! However, without any further information, it is hard to help here. An XFBR can be used almost anywhere in many kind of ways. 

        What I usually recommend in such a case is to re-create the issue piece by piece. Create a simple cube view, add it to a book, and then add a single XFBR to it and so forth, until you identified where it stopped working. And once you got the exact point, test different approaches to see how to fix it.

  • MG's avatar
    MG
    Community Manager

    JuleneDS If you still need some help with building your report books, you may want to raise a ticket and have one of our remote consultants assist you directly. Alternatively, if you have solved it, please share the solution. Thank you!