Friday, June 4, 2010

Hyperlinks from a Birt Report to Aim

Since many, if not all, records in Aim have a unique URL, you can create hyperlinks from a Birt Report back to the Aim application. This avoids the tedious searches by typing in the work order number, for example. BIRT provides a Hyperlink Editor for the creation of links to other BIRT reports, external content, and bookmarks within the same report. In this section we see how to use hyperlinks to link to AIM application.

In Birt, build your report. Then select the particular field for which the hyperlink is to be applied. Click on the properties editor and choose hyperlink. Select Link to and the hyperlink editor is displayed. In the hyperlink editor, select URI. Click the Fx button on the right to open the Expression builder. Type the URL of the AIM application surrounded by double quotes and end by referring the unique value that will direct the hyperlink to the corresponding Aim record.

A couple examples:
"https://gwuapp.assetworks.com/fmax/screen/WO_VIEW?proposal=" + row ["PH_WORKORDER"]

"https://gwuapp.assetworks.com/fmax/screen/SC_INVOICE_VIEW?tranxNo=" + row ["tranx_no_con"]

To find the exact URL, you can see it Aim, by doing a search and then selecting a record. The URL that is displayed is the unique url associated with that record. From that you'll understand the basic format, and how you need to modify it as a dynamically constructed hyperlink in BIRT.

9 comments:

  1. Hi,

    Is there a way to avoid hard coding of the host and port and use javascript to build the url, like http://: and then append the page to navigate (JSF page). The hyperlink works for me if I hard code the entire url.

    Thanks

    ReplyDelete
  2. Hi,

    Is there a way to avoid hard coding of the host and port and use javascript to build the url, like http://<host>:<port> and then append the page to navigate (JSF page). The hyperlink works for me if I hard code the entire url.

    Thanks

    ReplyDelete
  3. The short answer, I believe, is yes. I couldnt follow from your note whether the host/port was dynamic in addition to the rest of the url or not. Another option, depending on your exact challenge, would be to use relative path. In the example above, I could have used "fmax/screen/SC_INVOICE_VIEW?tranxNo=" + row ["tranx_no_con"]

    ReplyDelete
  4. Thank you Eric. I tried the relative path and it worked. (I meant, dynamic in addition to the rest of the url, so that the application can be deployed anywhere).

    ReplyDelete
  5. Hi, I am trying to create a hyperlink in a report for AiM but my url is:

    https://fms-dev.nmsu.edu/fmax/screen/ACCESS_POINT_VIEW?regionCode=TEST&facId=WIND&locId=146A%5E1&apId=ZD2-146AN-2&bldg=261

    how do write the hyperlink so that it will pass the regioncode, facid, locid and bldg?

    I tried https://fms-dev.nmsu.edu/fmax/screen/ACCESS_POINT_VIEW?apID=" + row ["AP_ID"] but it only gives me a blank access point.

    Any help is greatly appreciated! Thanks, Lisa

    ReplyDelete
  6. you'll need to do something like this:

    "https://gwuapp.assetworks.com/fmax/screen/CONSTRUCTION_CONTRACT_CHANGE_ORDER_VIEW?changeOrderNo="+row["change_order_no"]+"&contractNo="+row["contract_no"]

    ReplyDelete
  7. Thanks Eric I'll give that a try!!! :)

    ReplyDelete
  8. Thank you, I followed your instructions and the hyperlink worked, however, it is making me log into AiM again even though I am already logged in, any ideas? Thanks~

    ReplyDelete
    Replies
    1. I think I figured it out. Thanks~

      Delete