cancel
Showing results for 
Search instead for 
Did you mean: 

Simple report level filter 4.2 SP2

Former Member
0 Kudos

Dear All,

I am able to get html response of a webi report with REST SDK, now my requirement is to apply selected simple report level filters which I have designed in a custom application and populated with lov getting through REST SDK.

Could you please guide me to pass selected report level filter through REST request, expecting filtered html response applying the filter?

Thanks & Regards,

Deepak Kumar

Accepted Solutions (1)

Accepted Solutions (1)

former_member197386
Active Contributor
0 Kudos

Hello,


You can look at this API:


[GET][PUT] <url>/documents/{documentId}/reports/{reportId}/datafilter

Regards,

Anthony

Former Member
0 Kudos

Hello Anthony,

Thanks for replying, I'll try this api.

As of now, I am following below steps with eFashion universe.

1. GET, http://<server>:6405/biprws/raylight/v1/documents/1972284/reports/22/driller/filters/DP0.DObc

Response:

<filter qualification="Dimension" inQuery="false" ambiguous="false" inScope="true">

<id>
DP0.DObc

</id>

<name>

Year

</name>

<lov hierarchical="false" partial="false" refreshable="false" searchable="true" mandatorySearch="false">

<values>
<value>
2004

</value>

<value>

2005

</value>

<value>

2006

</value>
</values>

<columns mappingId="0">

<column id="0" type="String" />

</columns>
</lov>

</filter>


2. PUT, http://<server>:6405/biprws/raylight/v1/documents/1972284/reports/22/driller/filters/DP0.DObc

Raw payload:

<filter qualification="Dimension" inQuery="false" ambiguous="false" inScope="true">

<id>DP0.DObc</id>

<name>Year</name>

<lov hierarchical="false" partial="false" refreshable="false" searchable="true" mandatorySearch="false">

<values>

<value>2004</value>

</values>

<columns mappingId="0">

<column id="0" type="String" />

</columns>

</lov>

</filter>

Response:

<success>

<message>
The resource of type "DrillerFilter" with identifier "DP0.DObc" has been successfully updated.

</message>

<id>

DP0.DObc

</id>

</success>


3. GET, http://<server>:6405/biprws/raylight/v1/documents/1972284/reports/22/

accept:text/html


But still, filter selected in step 2 is not applied and I am getting years 2004,2005,2006 in report html.


Please let me know, is it the right way to use this.

Best regards,

Deepak Kumar



Former Member
0 Kudos

Hello Anthony,

Thanks a lot for making me aware about this API, this is amazing and working well.

I am able to filter report but for that I need to follow pattern: POST, PUT,GET.

I implemented a filter in webi and tried to fetch this with Rest service, but got below error:

[GET],http://<server>:6405/biprws/raylight/v1/documents/1972284/reports/22/datafilter

<error>

<error_code>
WSR 00400

</error_code>

<message>

The resource of type "Report" with identifier "22" does not have any inner resources of type "Data filter".

</message>

</error>

Thanks & Regards,

Deepak Kumar

former_member197386
Active Contributor
0 Kudos

Deepak,

You're welcome

Be aware that "driller" API and "datafilter" API are two differents ways to filter data.

Driller API is working with the "Drill Engine": this is what you can see in Webi client, behind the button "Start Drill", "Stop Drill", etc...

DataFilter API is working with report filter: this is what you can see when you right-click on a table column for instance, then you select "Filter > Add Filter ..."

Best regards,

Anthony

Former Member
0 Kudos

Hello Anthony,

Thanks a lot for this nice clarification.

Best Regards,

Deepak Kumar

former_member197386
Active Contributor
0 Kudos

This is an Azot workflow showing how to apply a drill filter on year 2004, on the first report into the Webi document "Formatting Sample".

At the end, you can see you will get an PDF output with data properly filtered

Anthony

former_member197386
Active Contributor
0 Kudos

Another Azot file demonstrating how to use data filter instead.

Regards,

Anthony

Answers (0)