Where are the parameter values?

I have Mike who leads the Product Management team for today's post. If you create a report in the Enterprise release based on a data template you'll know you can get the parameter values entered by the user into the XML data set and can then include them in your output very easily.

But, what if you are not using a data template, maybe a single query or a web service? You can still get at the parameter values - just a little effort is required. The server actually passes all of the parameter values to the template you just need to register your interest in them.

Lets assume we have a parameter in our report called 'param1' - we want to be able to see that value in our report output. All you need to do is declare the parameter in the template:


The @begin makes it a global parameter, the 'None' is a default value for it.You can now reference that value from anywhere in the template using:

That dollar sign is important! Note that if you are using an LOV for a parameter and doing something like this for the select statement:

select department_name
, department_id
from departments

Where you show the user the name but pass the id to your data extract. We will pass the id to the template. If you are using the 'All' option on your report parameter we actually pass '*' as the All value so you need to handle that.

So, you can render the parameter values in the report output but of course you can now get into the wonderful world of template filtering. Lets assume you have a report that generates sales data for all of your local offices. You want each office manager to only see their own sales numbers. Rather than execute the report for each office you can run the extract for all offices (using the caching we provide) and just have the template limit the data that can be viewed in the output when the office manager sees the report.

Assume you have the OFFICEID as a hidden parameter in a report. You can then limit the data based on the parameter value:
<?end for-each?>

The text in the [ ] is an XPATH expression which is effectively an 'if' statement on the group.
So, there are your parameter values!


Hi Tim, I created a hidden parameter in a report with name OFFICEID. Data Type = integer. Default Value = 666. In RTF wrote <?param:OFFICEID?> <?if:OFFICEID=666?>Example 1<?end if?> When i view a report, a get error "The report cannot be rendered because of an error, please contact the administrator."

Posted by skulll on August 31, 2008 at 11:18 PM MDT #

Hi Skulll To reference the parameter value you need to prefix it with a '$' ie Example 1 you may also need to ensure the parameter gets declared globally Tim

Posted by Tim on September 02, 2008 at 02:39 AM MDT #

Respeced Sir/Madam

I am new to BI Publisher and in this phase i come across to the report in which i have to filter data according to the two parameter (From Date and To Date) which are compared with Opened Date.
So Please help me out.

Thanks in Advance.

Posted by guest on December 06, 2011 at 04:50 PM MST #

You can just use a between statement in the query and create two parameters to hold the from and to values

Posted by Tim on December 07, 2011 at 08:56 AM MST #

I want to pass a parameter to BI Publisher without to let the user to see it. I tried to use an hidden parameter but don't work.If the parameter is not checked as hidden, it work.
Any clue to do it?
Thanks in advance

Posted by alessandro on February 01, 2013 at 12:24 PM MST #

Post a Comment:
  • HTML Syntax: NOT allowed

Follow bipublisher on Twitter Find Us on Facebook BI Publisher Youtube ChannelDiscussion Forum

Join our BI Publisher community to get the most and keep updated with the latest news, How-to, Solutions! Share your feedback and let us hear your voice @bipublisher on Twitter, on our official Facebook page, and Youtube!


« June 2016