Skip to Content
avatar image
Former Member

export the same webi report several times with different prompt values using java report engine sdk

Hello,

I just started using the Java Report Engine SDK for exporting Webi-Reports on BI4.x.

What I want to achieve is the following workflow:

Connect to the server, open a webi-document and export report-sets as pdfs.

Imagine a report that contains "sales revenue" for different "cities" in different "states" in several "years".

What actually works very fine for me is to get the full report with the entire dataset or to select for example some special cities or years using the setPrompts()-method.

But what I really want is to get a set of pdfs with for example all combinations of states and years (4 states, 3 years --> 12 pdfs).

I actually tested my code with to nested loops with the following code:

for .... {
     for ... {
          doc.refresh();
          ....
          doc.setPrompts();
          save(doc,filename);
     }
}

Now the thing is, that I was wondering if this is the right way to call the refresh()-method every time or if there is a more simple way.

I suppose there is some sort of caching when the refresh-method is called for example severeal thousand times in a row?

By the way, I don't need the prompts if there is another way for filtering the data.

thanks for any advice.

best regards,

peter

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 30, 2014 at 03:38 PM

    First off, you need to call .refresh() AFTER setting the prompts - otherwise it won't have the correct prompt values before your export.

    Another way to do this might be to put the report into a Publication, which can burst it for you.  You'll need to create a second report that will pull the information about where to burst the report into separate files.  This can then be scheduled directly in BO and doesn't need to have any code written.

    -Dell

    Add comment
    10|10000 characters needed characters exceeded