Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
Expand all | Collapse all

Hyperlink within the same BIRT report

  • 1.  Hyperlink within the same BIRT report

    Posted Mon April 13, 2020 01:26 PM
    Hi,
    I would like to know how to set up hyerlink within the same BIRT report. For example I have a report with 3 data set and all the 3 data set has same field location which has the hyperlink functionality enabled. So when user clicks on the hyperlink in the first dataset it should move to second dataset and then from second to third dataset.  In the same way it should move from third > second > first data set.  I was able to move from 1>2>3 and then 3>2 however 2>1 does not move at all instead it moves back to 3 rather than 1.  In the report guide there is a functionality however I do not know where it should be configured.
    <structure>
    <property name="paramName">__requestid</property>
    <expression name="expression">java.lang.System.currentTimeMillis() +
    (hyperlinkCounter++) </expression>
    </structure>
    Below is how I have defined the hyperlink and bookmark,

    Please advise whether someone has achieved this before. Thanks!!

    ------------------------------
    MAX092012
    ------------------------------

    #AssetandFacilitiesManagement
    #Maximo


  • 2.  RE: Hyperlink within the same BIRT report

    Posted Tue April 14, 2020 03:17 PM
    Hi,

    You will need a separate Hyperlink enabled so that when you are moving from 3 to 2 you can "set the direction". Essentially you will need a "forward" and "back" link such that as you drill down the data sets, you will be able to go forward and backward depending on which link you click.  The link as it is set now does not know which direction you are heading.  Further as you develop more levels it is entirely possible your user would want to be able to do up and down at will, i.e. in a sequence such as: 1>2>1>2>3>4>3>2>3>2>1.  So any of the "middle" layers will require two links.

    ------------------------------
    Bradley K. Downing , MBA
    IBM Certified Adv. Deployment Prof. Maximo v7.6.1
    IBM
    Bakersfield CA
    ------------------------------



  • 3.  RE: Hyperlink within the same BIRT report

    Posted Wed April 15, 2020 05:04 AM
    Hi Bradley,

    Thanks for your reply! Is there an example on how to define separate hyperlink ? I understand two links would be required for each dataset which would be enabled based on the scenario however I'm not sure where and how to get them defined.

    ------------------------------
    MAX092012
    ------------------------------



  • 4.  RE: Hyperlink within the same BIRT report

    Posted Wed April 15, 2020 10:17 AM
    So you have embedded a control in section of the report to "take" you to another section of the report.  When you click on the hyperlink it essentially reruns the report with the embedded parameter, and renders the view as you direct.  So the accomplish what I suggest simply add another control with the desired parameters and place it next to the existing control.  Perhaps I am envisioning what you are doing as different from what I have in mind?

    ------------------------------
    Bradley K. Downing , MBA
    IBM Certified Adv. Deployment Prof. Maximo v7.6.1
    IBM
    Bakersfield CA
    ------------------------------



  • 5.  RE: Hyperlink within the same BIRT report

    Posted Wed April 15, 2020 12:37 PM
      |   view attached
    Hi Bradley,
    Thank you for your response. I have used hyperlink and bookmark properties to navigate from one data set to another. There is a report parameter which decides whether user would like to view 3/2/1 data set. Hence based on this report parameter I have written logic and a conditional logic in the second dataset however I'm not sure how to achieve the ELSE part since when in second dataset the hyperlink can move to 3 or 1. I have attached the report design file and also explained how it works. Please advise.

    ------------------------------
    MAX092012
    ------------------------------

    Attachment(s)

    zip
    hyperlink_report.zip   25 KB 1 version


  • 6.  RE: Hyperlink within the same BIRT report

    Posted Wed April 15, 2020 02:19 PM
    Howdy!

    So based on your report design I do not see how you are actually setting the report parameter gprmLevel.  If when you click on the hyperlink you take an action and set that value then you can use that as a way of managing the actions.  Secondly I noticed that of the four tables in your design file, the first has referent to your dummyData set.  the second and fourth tables are bound to your L2dataSet, and the third table is bound to your L3DataSet.  I find this odd since the second table is identified int he report as Level 1, the third table is Level 2, and the third is Level 3.  Perhaps this is part of the issue?

    ------------------------------
    Bradley K. Downing , MBA
    IBM Certified Adv. Deployment Prof. Maximo v7.6.1
    IBM
    Bakersfield CA
    ------------------------------



  • 7.  RE: Hyperlink within the same BIRT report

    Posted Thu April 16, 2020 06:23 AM
    Hi Bradley,

    First answering the second part of your question, dummyData set is to fetch user's default site. The second and fourth table are bound to L2dataSet because of the concatenate function to determine whether the data is present or not based on which the hyperlink would be enabled. You can look into the visibility set on the BLUE and RED fields to understand better. I do not think this is a issue since even if I do not enable the hyperlink conditionally the hyperlink does not move back and forth . I do not know how to set gprmLevel during run time , I assumed this cannot be achieved however if its possible then I think my issue would get resolved.
    Thanks! Stay safe!!

    ------------------------------
    MAX092012
    ------------------------------



  • 8.  RE: Hyperlink within the same BIRT report

    Posted Thu April 16, 2020 11:44 AM
    Hi Max,

    I would suggest at the end of the open method you insert a statement to set the gprmLevel to the desired value.  You may want to set some logic to provide a "direction" i.e. if coming from level 3 set level to 1 if coming from 1 set it to 3 so that when in level 2 it will then take you to the correct level.  Might be something like gprmLevel ="1" inside logic block.  Try that and let me know.

    ------------------------------
    Bradley K. Downing , MBA
    IBM Certified Adv. Deployment Prof. Maximo v7.6.1
    IBM
    Bakersfield CA
    ------------------------------



  • 9.  RE: Hyperlink within the same BIRT report

    Posted Thu April 16, 2020 12:20 PM
    Hi Bradley,

    Is it something like creating an attribute in the database and inserting the gprmLevel through executing insert query using BIRT? If the report parameter gprmLevel = 3 then the report output will have all the 3 levels ( 3 dataset) however depending on the data parameter it might have more number of pages so in order to move easily user would like to have hyperlink on each level so that when they click on location in level 1 the report would move to the corresponding location in level 2 and then to level 3. Hence in this case I'm not sure if we can capture the direction as to where its coming from because I do not know if the report would run again when user is clicking on the hyperlink from level 1 to level 2 and so on...


    ------------------------------
    MAX092012
    ------------------------------



  • 10.  RE: Hyperlink within the same BIRT report

    Posted Fri April 17, 2020 11:01 AM
    HI Max,

    No.  No DB side stuff is required for setting the report parameter.  Just set the parameter as you would any other variable when programming.  When you first except the report it will bring you to Level 1 of the report.  There is a single control to take you to Level 2 correct?  the value of the param does not appear to be set at that moment as I looked at your report code.  When you click on the button, set the parameter in your open method to leave a breadcrumb trail.  When you click to go to level 2, it will take you to level two and you have a breadcrumb to return to level 1 when you click the same button.  However you now have a second section that is preset to take you to the next level. When you click on that button reset the parameter to again level a breadcrumb telling the report from whence you came.  
    I see in your response, that you provide additional operational data. (To be fair I have not tried executing the report code. I just reviewed the code.) It may turn out that in order to gain the desired behavior you need to create an additional parameter.  If you think of it as an elevator, you may need to set a parameter for which "floor" you want to go to.  In that case if the user is allowed to go to any floor they want.  I want to make sure I fully understand the use case scenario.  Do I have to go to level two from three to get to one (like an escalator) or can I skip level two and go to one (like an elevator?)

    ------------------------------
    Bradley K. Downing , MBA
    IBM Certified Adv. Deployment Prof. Maximo v7.6.1
    IBM
    Bakersfield CA
    ------------------------------



  • 11.  RE: Hyperlink within the same BIRT report

    Posted Fri April 17, 2020 12:44 PM
    Hi Bradley,
    Thank you for your response! Yes there is a single control to move to Level 2 .  As you have stated I need to follow the escalator scenario and not the elevator. Sorry to bother you, I do not understand how to set the parameter in the open method when click on the button , can you give me an example ?  I tried to declare a variable in the initialize method and then increment it in fetch method of each dataset but it does not seem bring the desired result.



    ------------------------------
    MAX092012
    ------------------------------



  • 12.  RE: Hyperlink within the same BIRT report

    Posted Mon April 20, 2020 07:18 PM
    you will want to increment on the Open method not the Fetch method. The open method is accessed on each row.  You only want to do it on the open method when you first open the data set.

    ------------------------------
    Bradley K. Downing , MBA
    IBM Certified Adv. Deployment Prof. Maximo v7.6.1
    IBM
    Bakersfield CA
    ------------------------------



  • 13.  RE: Hyperlink within the same BIRT report

    Posted Fri April 24, 2020 12:42 PM
    Hi Bradley,
    Thanks a lot for your help I was able to get it done. One last question is it possible to fetch the name of the dataset during run time ?

    ------------------------------
    MAX092012
    ------------------------------



  • 14.  RE: Hyperlink within the same BIRT report

    Posted Fri April 24, 2020 12:46 PM
    Edited by System Admin Wed March 22, 2023 11:49 AM

    +++++++++++

    I was never able to post using my IBM ID due to cookies error and surprising it got posted today, so the duplicate message. 
    ++++++++
    Hi Bradley,
    Thanks I was able to get this done.. One last question, Is it possible to fetch the Dataset name during run time ?

    ------------------------------
    Vijayalakshmi Laxman
    ------------------------------