Академический Документы
Профессиональный Документы
Культура Документы
To drill from one Answer to another and pass parameter values from one Answer to another when
clicking on a linked value in a table/pivot table line we use the GoURL command.
For the target report the column values you wish to be passed need to be set to prompted or at least
have some filter on them. In this example we are passing values from the base report for the
department name and job title
We need to create a manual link on a value in the source report. This can be a string or numeric value.
In the case of a numeric value we will need to use a function to cast it to a char. The URL will not
support a numeric value. For example, say we have a report that we want to be able to click on the
employee count, passing the department and job title to the target report. Once clicked, we show a
detail report with only those employees that have that department and job.
1
Here are the steps to get the drill to work.
1. In the case of a numeric value, use the expression builder to cast the numeric count to a char.
For a string value this can be ignored.
CAST(COUNT(Employees."Employee ID")
Once this is done click OK to get back to the criteria page. We need to do this to allow the other
dialogs to know that our value is now a string value and not numeric.
2. Now click on the property icon and change the default data format to HTML.
Note: you can only do this once the CAST has been set
http://SERVERNAME:PORT/analytics/saw.dll?path=REPORT_PATH&Action=Navigate&P0=
NUMBER_OF_PARAMS&P1=OPERATOR&P2=TABLE_NAME.COLUMN_NAME&P3=VALUE_TO_BE_PASSED&
Pn=OPERATOR&Pn=TABLE_NAME.COLUMN_NAME&Pn+2=VALUE_TO_BE_PASSED
Where
If there are space characters in the path or name you will need to escape them using the
%20 code e.g. path =/shared/HR/Parameter%20From
Action=Navigate – there are other types of action but for the report navigation we use
Navigate
&P0=NUMBER_OF_PARAMS – this is the number of parameter values you want to pass
&P1=OPERATOR – this is the operator to be used when comparing the parameter value
to the target column. Valid values are:
Further parameter values can be passed using the &Pn variables. They are grouped by
threes.
3
&Pn – operator
&Pn+1 – target table column
&Pn+2 – value to be passed
So a second parameter will take the P4,P5 and P6 spots. A third, the P7,P8 and P9 spots.
An example URL construct for our drill from employee count to detail passing Department Name
and Job Title would be:
'<a href='http://127.0.0.1:9704/analytics/saw.dll?GO
&path=/shared/HR/Parameter%20From
&Action=Navigate
&P0=2 passing 2 parameters
&P1=eq
P1 &P2=Departments."Department%20Name" Note space escaping
&P3='||REPLACE(Locations."Department Name",' ','%20')||' note REPLACE function
&P4=eq
P2 &P5=Jobs."Job%20Title"
&P6='||REPLACE(Jobs."Job Title",' ','%20')||'>'
||CAST(COUNT(Employees."Employee ID") AS CHAR)|| this is the link value
'</a>'
Everything must be enclosed in a single quote when it is resolved for it to render as a URL link. Notice
the use of pipes (||) to concatenate the parts of the URL. The space character encoding is very
important to avoid a truncated URL at runtime.
http://127.0.0.1:9704/analytics/saw.dll?GO&path=/shared/HR/Parameter%20From&
Action=Navigate&P0=2&P1=eq&P2=Departments.%22Department%20Name%22&P3=Shippin
g&P4=eq&P5=Jobs.%22Job%20Title%22&P6=Stock%20Clerk
4
'<a href='||VALUEOF("HOSTNAME")||'?GO …
We can now drill from one Answer report to another passing parameter values from the first to the
second.
5
6