Forum Discussion

MichaelGraham2's avatar
MichaelGraham2
Qrew Assistant Captain
8 years ago

Add navigation to table reports

I have navigation buttons on my forms and would like to have them on reports as well.
It's not practical to embed them in the actual report.

21 Replies

  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    I'm not sure I understand the question. Or the situation.  Can you clarify?
  • MichaelGraham2's avatar
    MichaelGraham2
    Qrew Assistant Captain
    I have formula buttons that I use for navigation to go from forms to pages or reports.
    I want to be able to put the same buttons on reports.

    I know I can add the buttons into the report against each record but then I would have a navigation button for every record in the report.  - Is that more understandable? :)
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    The the navigation button applies to that record, then yes you will have that.  But if you are looking for other "report" navigation options, I'd recommend using the "Favorites" option to pin your reports to the top, no matter where you are in the app.

    As far as navigating to a "page"... Rather than cluttering up the report, I'd just keep those page buttons on your home dashboard.  
    Alternatively, if you really want them on the report I'd recommend using a small icon as the button to go to said page (it will take up less room that way)
  • MichaelGraham2's avatar
    MichaelGraham2
    Qrew Assistant Captain
    The navigation to show on reports is important.  
    There are basically 3 different places a user might want to go. 
    The buttons are not all the same but depend on a value on the report.
    e.g.
    go to the Blue section when a field in the report is Blue Agent
    go to the Red section when a field in the report is Red Agent.

    This all works and I can have a button on each record but its unnecessary and clutters things up as you say.

    Buttons somewhere at the top of the report would do the trick.
    • MichaelGraham2's avatar
      MichaelGraham2
      Qrew Assistant Captain
      By the way, in the example the report would ONLY be for a Blue section OR a Red section... just to make it clear.
  • Use BOL with code similar to this:

    Pastie Database
    https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=571

    This code display all three buttons. If you want to display only one button based on some criteria you have to detect that criteria in the script. In the same sense that you do not want to place these buttons on every row in the report, stating that 

    "The buttons are not all the same but depend on a value on the report."

    does not direct me to which record or field contains the magic value that determines which buttons to display or where they lead to.





    Notes

    (1) Since you are using BOL you have to detect the dbid and action (and perhaps the qid and/or dfid)

    (2) This code uses ES6 backticks to conveniently enter the markup over multiple lines and interpolate variables within
  • I am having trouble understanding you. In terms of functionality, a button is a hyperlink. Click it and  the browser goes to a new URL.

    "I have navigation buttons on my forms and would like to have them on reports as well. "

    When a button is on a form it has the context of a specific  [Record ID#]. But there is no record context when you are displaying a report - there are a whole bunch or records being displayed.

    So both in terms of which field is in context and which record is in context I don't understand what logic you want to use to decide which button to place on the top of the report or where it leads.

    You have to put more effort into defining your question clearly.
  • MichaelGraham2's avatar
    MichaelGraham2
    Qrew Assistant Captain
    This is one button that determines which Section to go to.   How would I implement this using your code?

    var text ImageSix = "https://realm and DBID here/g/rd6/eg/va/Rover200-25-MGZRIcon.jpg height=35;>";var text ImageSeven = "https:///realm and DBID here/up/bkttbjwpm/g/reg/eg/va/Rover400-45-MGZSIcon.jpg height=35;>";
    var text ImageEight = "https://realm and DBID here/up/bkttbjwpm/g/reh/eg/va/Rover600-RHIcon.jpg height=35;>";
    var text ImageNine = "https:///realm and DBID here/up/bkttbjwpm/g/rd7/eg/va/MetroIcon.jpg height=35;>";
    var text ImageTen = "https:///realm and DBID here/up/bkttbjwpm/g/reb/eg/va/Rover75-MGZTIcon.jpg height=35;>";
    var text ImageEleven = "https:///realm and DBID here/up/bkttbjwpm/g/rd5/eg/va/CityRoverICon.jpg height=35;>";
    var text ImageTwelve = "https:///realm and DBID here/up/bkttbjwpm/g/rej/eg/va/Rover800-RSIcon.jpg height=35;>";
    var text ImageThirteen = "https://realm and DBID here/up/bkttbjwpm/g/rei/eg/va/Rover800-RS-91Icon.jpg height=35;>";
    var text ImageFourteen = "https:///realm and DBID here/up/bkttbjwpm/g/rea/eg/va/MiniIcon.jpg height=35;>";
    var text ImageFifteen = "https:///realm and DBID here/up/bkttbjwpm/g/ref/eg/va/Rover200-400-XWIcon.jpg height=35;>";
    var text ImageSixteen = "https:///realm and DBID here/up/bkttbjwpm/g/ree/eg/va/Rover200-400-XW-CabIcon.jpg height=35;>";
    var text ImageSeventeen = "https:///realm and DBID here/up/bkttbjwpm/g/rd8/eg/va/MGF_MGTFIcon.jpg height=35;>";
    var text ImageEighteen = "https:///realm and DBID here/up/bkttbjwpm/g/rd9/eg/va/MGTFIcon.jpg height=35;>";
    var text ImageTwentytwo = "https://realm and DBID here/up/bkttbjwpm/g/rec/eg/va/Rover75V8-MG-ZT260Icon.jpg height=35;>";


    var text URLSIX = URLRoot() & "db/" & Dbid() & "?a=showpage&pageid=6";
    var text URLSEVEN = URLRoot() & "db/" & Dbid() & "?a=showpage&pageid=7";
    var text URLEIGHT = URLRoot() & "db/" & Dbid() & "?a=showpage&pageid=8";
    var text URLNINE = URLRoot() & "db/" & Dbid() & "?a=showpage&pageid=9";
    var text URLTEN = URLRoot() & "db/" & Dbid() & "?a=showpage&pageid=10";
    var text URLELEVEN = URLRoot() & "db/" & Dbid() & "?a=showpage&pageid=11";
    var text URLTWELVE = URLRoot() & "db/" & Dbid() & "?a=showpage&pageid=12";
    var text URLTHIRTEEN = URLRoot() & "db/" & Dbid() & "?a=showpage&pageid=13";
    var text URLFOURTEEN = URLRoot() & "db/" & Dbid() & "?a=showpage&pageid=14";
    var text URLFIFTEEN = URLRoot() & "db/" & Dbid() & "?a=showpage&pageid=15";
    var text URLSIXTEEN = URLRoot() & "db/" & Dbid() & "?a=showpage&pageid=16";
    var text URLSEVENTEEN = URLRoot() & "db/" & Dbid() & "?a=showpage&pageid=17";
    var text URLEIGHTEEN = URLRoot() & "db/" & Dbid() & "?a=showpage&pageid=18";
    var text URLTWENTYTWO = URLRoot() & "db/" & Dbid() & "?a=showpage&pageid=22";

    If (
    [Vehicle Range]=8777, "" & $ImageSix & "",
    [Vehicle Range]=26318, "" & $ImageSeven & "",
    [Vehicle Range]=35479,"" & $ImageEight & "",
    [Vehicle Range]=50613,"" & $ImageNine & "",
    [Vehicle Range]=60277,"" & $ImageTen & "",
    [Vehicle Range]=65806,"" & $ImageEleven & "",
    [Vehicle Range]=41989,"" & $ImageTwelve & "",
    [Vehicle Range]=48657,"" & $ImageThirteen & "",
    [Vehicle Range]=55462,"" & $ImageFourteen & "",
    [Vehicle Range]=16519,"" & $ImageFifteen & "",
    [Vehicle Range]=25447,"" & $ImageSixteen & "",
    [Vehicle Range]=3,"" & $ImageSeventeen & "",
    [Vehicle Range]=67803,"" & $ImageEighteen & "",
    [Vehicle Range]=5549,"" & $ImageTwentytwo & ""
    )
    • _anomDiebolt_'s avatar
      _anomDiebolt_
      Qrew Elite
      You are missing my point.

      Your formula evaluates for every record presumable to a different value. So when viewing a report your formula will be listed multiple times - one for each record - and  presumably the button will lead to a different URL for each record. 

      So when you suggest that you want to put three buttons on the top of a report, what logic is involved in defining those three buttons?
    • MichaelGraham2's avatar
      MichaelGraham2
      Qrew Assistant Captain
      No, the report will actually only show ONE of the Vehicle Ranges in each report.
      But the button is on every report and will go the section based on which Vehicle Range is in the report.  Does that make sense?
    • _anomDiebolt_'s avatar
      _anomDiebolt_
      Qrew Elite
      Nope it is still confusing.

      The only way some field could have a common value among all records in a report is if was included in the report's criteria (eg {fid.EX.foo}) or if there was only one record total in the report. Is that the case here?