"generate a report by loop"

currant
currant New Altair Community Member
edited November 5 in Community Q&A
Dear All,

I want to use the loop operators of RM to generate a report:
In a survey we had a lot of questions. For each question I want to create a bars-plot for each question on single page within a pdf-file.
So the loop should be based on the attribute "question", right? If so, is the operator "Loop attributes" the correct one? I tried this operator, but it does not work ...

Thanks in advance!

BW
currant

Answers

  • colo
    colo New Altair Community Member
    Hi currant,

    if you have each question as an example in your example set, you should use "Loop Examples". Otherwise you might have to give a little info about the structure of your data, if you need further suggestions.

    Regards
    Matthias
  • currant
    currant New Altair Community Member
    Dear Matthias, dear all

    here is my table:
    questionYearTxtMean
    0720063,4
    0720113,9
    0820062,4
    0820111,5
    0920064,0
    0920112,2
    so, the loop should generate a bar plot for the question 07 on one side of the pdf-file, then on the next side of the pdf-file the bar plot for question 08 and so on.
    Probably it is very easy to design the loop process, but ...

    Thanks a lot
    currant
  • currant
    currant New Altair Community Member
    Hi All,

    ... after hours of searching and testing, I found out how to introduce the loop...

    I use now the Loop Values-operator (select the attribute "question"; set the iteration macro = loop_value);
    inside the loop value-operator I use the "Filter example"-operator with condition class = attribute_value_filter and parameter string = "question = %{loop_value}"

    I hope some other people can use this process-info.

    currant
  • Currant,

    Thank you so much, this post was a huge help, I'd be struggling with the same problem for a while now.