Consultor Eletrônico



Kbase 20950: Actuate: How to Create Link that Might Contain Ampersand (&)
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/16/2008
Status: Unverified

GOAL:

How to link one report to another report in Actuate via the linkexp property of a control when you the control value might contain an Ampersand (&). For example, if you linked to reports on customer name and one of the customers was AT&T.

FACT(s) (Environment):

Actuate 4.x
Actuate 5.x

FIX:

The following example illustrates how to link to reports at runtime using the report executable file (.rox) of the reports and have the link pass a parameter to the report that is called.

The following steps build the report to be linked to:

   1) Set up the first report that is the one called by the link (to
       be referred to as "destrep" from here on in).

    2) Go to the DataSource Editor.

    3) Go to the conditions.

    4) Choose the column name you wish to search on (for example, the
       database field).

    5) Add the query expression using the :parameter as the parameter
       that is to be passed (for example, =:custnam).

    6) Do any other changes to the report as needed (for example,
       formatting).

    7) Build and save the report.

The following steps build the report that is linked from:

    8) Set up the second report that is to be the one that contains
       the field to be linked from.

    9) Go to the properties of the item you want to link from (for
       example, the database fields text control).

   10) Go to the linkexp property.

   11) Add the following as the value for this property

    "destrep.rox?parameter=" &"""" &datavalue &""""

         (destrep.rox is the report that you are linking to)

          ?parameter= is the parameter that you are passing on.

          &"""" &datavalue &"""" - once this is evaluated by Actuate, it
leaves you with the value of the field
                      with double quotes(") around it. For
example, if the link is on customer name
and the customer is AT&T, the result is
                      "AT&T" from this expression.

   12) Do any other steps you need to the report (for example,
       formatting).

   13) Run and save the report to test it.

   14) This will show you the report.

       When you run your mouse over the field, the mouse cursor
       should change to a pointing hand, and the status bar at the
       bottom of the screen should show you the link expression
       that it will use (for example, destrep.rox?parameter="AT&T"
       if you hover over the customer name AT&T).

   15) Double click on the field and the first report you built
       should open and the condition you defined should be applied.