mysticfall / pivot4j

Pivot4J provides a common API for OLAP servers which can be used to build an analytical service frontend with pivot style GUI.
Other
128 stars 99 forks source link

Support for bookmarkable URL for reports. #117

Closed mysticfall closed 10 years ago

mysticfall commented 10 years ago

Add support for the bookmarkable URLs for each reports. And we can add someway to provide EL context variables for additional request parameters as well (see #37)

mysticfall commented 10 years ago

With this change, you can now open an existing report using an URL like this:

In case of the Pentaho plugin, for example :

(Pentaho URL starts with lower case '/home', not '/Home'. And if you know the ID of the file, you can also use fileId parameter with it, instead of the path parameter)

Combined with #37, you can pass additional parameters to the URL and refer them in your MDX using the FreeMarker expression language.

For example, with MDX like below,

SELECT {[Measures].[Store Cost], [Measures].[Unit Sales]} ON COLUMNS, 
Hierarchize({[Product].[All Products], [Product].[Drink], [Product].[Food], [Product].[Non-Consumable]}) ON ROWS 
FROM [Sales] WHERE $['[Gender]].[' + (parameters.gender!'All Gender') + ']]']

you can pass the gender parameter like this:

Note that, expressions used in WITH MEMBER or WHERE clauses are 'sticky', which means they are preserved even if the MDX is transformed by drill down, sorting, etc. In this way, you can save the modified MDX with your report and still use a parameterized URL to open it next time.

ravindragullapalli commented 8 years ago

What if we have to pass multiple parameters? For example if I have to filter with age 25 and 26 or age range 25 to 30, how can I do that?

mysticfall commented 8 years ago

@ravindragullapalli You can just define the parameter multiple times with different values (i.e. ?age=25&age=26) and expect the parameter value to be java.util.List.

Sorry for the very late response.