cancel
Showing results for 
Search instead for 
Did you mean: 

How to apply filter on webi report after scheduling (even if the document has optional prompts) ?

Former Member
0 Kudos

Hello,

I am working with the RESTFul Web Services SDK.

I've succeed to apply a filter on a webi report and to export it next.

But it doesn't work when the document has an optional prompt which is not given during the schedule.

To describe shortly the process in my java program :

1. I schedule a document (and I give it all the mandatory prompts values).

I use :

POST <webiURL>/documents/{documentId}/schedules

The schedule is ok.

2. I retrieve the last instance ID of the document.

I use :

GET <webiURL>/documents/{documentId}/schedules

I get it.

3. I create data filter on each report of the document.

I use :

POST <webiURL>/documents/{documentId}/reports/{reportId}/datafilter

It's sucessfully saved.


4. I export this instance in pdf.

I use :

GET <webiURL>/documents/{documentId}/pages

The report had been filtered by the data filter. All is ok..


BUT when the document has a optional prompt which is not given, it doesn't work and the pdf has no data (it seems like if all data had been filtered).

But nevertheless, the schedule is ok (it contains all data), so the step 2 seems to be ok. And the issue comes probably from the step 3.


Does anyone have an idea ?


Sorry for my english.



Accepted Solutions (0)

Answers (1)

Answers (1)

former_member197386
Active Contributor
0 Kudos

Hello Yann,

If you wish to skip an optional prompt, you have to provide a parameter structure to the API with no value.

Best regards,

Anthony

Former Member
0 Kudos

Hello Anthony,

I try your solution and send this :

....

<parameter type="prompt" optional="true" dpId="DP1">

            <id>8</id>

            <technicalName>NIM</technicalName>

            <answer>

                <values/>

            </answer>

</parameter>

....

but the result was the same.

The scheduling content is ok but when I apply my filter on the instance, the result is empty.

former_member197386
Active Contributor
0 Kudos

Hi Yvan,

Maybe an easier way to troubleshoot this issue would be to try to refresh data directly on the source document (without taking care of scheduling stuff).

Try calls like [GET] /parameters, [PUT] /parameters on your source document and see what is the response of the API on the last call: this should help you to understand what is wrong.

Best regards,

Anthony

former_member197386
Active Contributor
0 Kudos

Hi Yvan,

Some news? Do you still stuck?

Regards,

Anthony

Former Member
0 Kudos

Hi Anthony,

Nothing is working. I've tried a lot of solutions.

I've finally abandonned because the case is too specific and not as important as it.

I think really that there is a problem with the RESTFul Web Services on this point.

Indeed, I think I use correctly the web services in my program because that's working in the most case (99%).

Maybe it doesn't manage completely working on a target instance instead of working on the original document. I don't have any idea.

Thanks for your help.

Regards,

Yvan

former_member197386
Active Contributor
0 Kudos

Hi Yann,

If you have a testcase to reproduce the failing workflow easily, it woul be easier for us to troubleshoot this weird behavior.

By the way, we're constantly improving the RESTful API and fixing reported issues, so don't hesiatate to try the last delivered Service Pack.

Anthony