How to Use Default Report Parameters

Post Reply
colinfrewen
Posts: 67
Joined: 10 Dec 2013, 01:22
Location: Australia

Hi,

We are trying to push out a number of reports with default parameters already set. This creates a list of personalised reports. But we are struggling to get the default parameter to work.

What is the structure of the string value? We jhave tried many variations of this "PMA=KB_247201_Class1" but with no luck,.

Regards
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Hi Colin,

There are a couple of mechanisms available for passing parameters to the Views and you will see both applied in the out-of-the-box Views.

First, the Essential Viewer Engine allows you to pass your own, user-defined parameters as part of the URL, as standard request parameters, e.g. parameterName=value&parameterName2=value2
These are available within the View XSL as parameters that are passed to it by the Engine and you can pick these up by defining the parameter, using the <xsl:param> statement at the top of your View template XSL. e.g.

<xsl:param name=“parameterName”/>

and also this enables you to define default values for this within your template. The name of the parameter is taken from the name part of the URL request parameter that you’ve specified.

There are a number of reserved parameter names that must not be used:
  • XML
  • XSL
  • LABEL
  • PMA
  • PMA2
  • PMA3
  • PMA4
  • CT
  • FILE
  • PGH
  • cl
  • i18n
These are most commonly used to manage dynamic values or to simply pass a value from a particular request (e.g. from a form or a link on a page).

Alternatively, there is the concept of Report Constants that can be made available to the Views. These constants are values that are defined and managed from within the repository as instances and can be queried by the Views. The Report Constant allows values to be set or to select a particular instance (e.g. see the Application Reference Model Layers Report Constant).

Finally, we have the Report Parameter class in the repository. The idea with this class is to enable you to define parameters for a selected Report instance and set either a String value or an instance - very much like the Report Constant. In the same way as the Report Constant, you can query for these from within your Views but there is nothing in the Viewer framework that automatically makes use of these. Rather you must query for them.

Within the Viewer XSL, the utility function ‘eas:get_report_by_name()’ will return the Report instance given its name and from there you can easily query to find all the Report Parameters that are related to that Report.

Hope this helps

Jonathan
Essential Project Team
colinfrewen
Posts: 67
Joined: 10 Dec 2013, 01:22
Location: Australia

I Jonathan,

We have created a query against the parameter class. We are using this to pass personalized reports to the portal structure.

Thanks
Colin


jonathan.carter wrote:Hi Colin,

There are a couple of mechanisms available for passing parameters to the Views and you will see both applied in the out-of-the-box Views.

First, the Essential Viewer Engine allows you to pass your own, user-defined parameters as part of the URL, as standard request parameters, e.g. parameterName=value&parameterName2=value2
These are available within the View XSL as parameters that are passed to it by the Engine and you can pick these up by defining the parameter, using the <xsl:param> statement at the top of your View template XSL. e.g.

<xsl:param name=“parameterName”/>

and also this enables you to define default values for this within your template. The name of the parameter is taken from the name part of the URL request parameter that you’ve specified.

There are a number of reserved parameter names that must not be used:
  • XML
  • XSL
  • LABEL
  • PMA
  • PMA2
  • PMA3
  • PMA4
  • CT
  • FILE
  • PGH
  • cl
  • i18n
These are most commonly used to manage dynamic values or to simply pass a value from a particular request (e.g. from a form or a link on a page).

Alternatively, there is the concept of Report Constants that can be made available to the Views. These constants are values that are defined and managed from within the repository as instances and can be queried by the Views. The Report Constant allows values to be set or to select a particular instance (e.g. see the Application Reference Model Layers Report Constant).

Finally, we have the Report Parameter class in the repository. The idea with this class is to enable you to define parameters for a selected Report instance and set either a String value or an instance - very much like the Report Constant. In the same way as the Report Constant, you can query for these from within your Views but there is nothing in the Viewer framework that automatically makes use of these. Rather you must query for them.

Within the Viewer XSL, the utility function ‘eas:get_report_by_name()’ will return the Report instance given its name and from there you can easily query to find all the Report Parameters that are related to that Report.

Hope this helps

Jonathan
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

colinfrewen wrote:I Jonathan,

We have created a query against the parameter class. We are using this to pass personalized reports to the portal structure.

Thanks
Colin


Hi Colin,

Is this the 'Report Parameter' class that you're using? Although this is available, there is not automated support for these in the Essential Viewer framework.

In fact, this is a feature that we don't really make much use of as passing dynamically-set parameters works best using the URL parameter approach, which enables Views to set parameters on-the-fly that can then be passed to other Views.

That certainly doesn't mean that you shouldn't be using the Report Parameter class if that provides what you need but perhaps you could tell me more about the problems that you are encountering and some more details around how you are approaching the creation of these personalised reports?

Jonathan
Essential Project Team
universaldirect333
Posts: 1
Joined: 08 Mar 2014, 12:27

how you are approaching the creation of these personalised reports?
Post Reply