Discussions

 View Only
  • 1.  Possible to hide Options in Report Link?

    Posted 01-14-2020 21:20
    Is it possible to hide the "Full Report, Grid Edit, Email, etc...from the top of report links? I figure I can do some of them with selections in user roles, but hoping there is a simpler and more elegant solution.

    ------------------------------
    Mike Tamoush
    ------------------------------


  • 2.  RE: Possible to hide Options in Report Link?

    Posted 01-15-2020 09:59
    You can do this via JavaScript fairly easily as long as your form doesn't change very much. If it did change you might have to point the code at a new element to fix it. Are you using the BOL or IOL techniques anywhere in your app?

    One a random embedded report on my form this is the command that removes the entire line that says "Full Report | Grid Edit | Email | More" etc.

    document.querySelector("#tdf_7 > div > table > tbody > tr.Toolbar.ui-widget-header > td > table > tbody > tr > td.ActionsBar.FS-Tool-B.EmbeddedReport.DisplayNone").style.display = ""

    The way I got that was to open up Chrome and simply right click on Full Report and select "inspect". Then on the right hand side Chrome will highlight the element. To hide the entire bar you just need to move up to the parent element. Then right click that element inside the Chrome console and select Copy > Copy JS Path and you have it. Then add .style.display = "" to the end and put it into the console and the bar will go away. It is a little more involved to set up automatically if you do not already have IOL or BOL in your app.

    This can be reversed by a knowledgeable person though, they just have to change the command to be "table-cell" and it displays again. If you don't ever want that report header to display you can just delete the entire element and then nobody can just change the display property and get it back. If you want to remove it check this site out. https://gomakethings.com/removing-an-element-from-the-dom-with-vanilla-js/

    It is essentially the same thing as I wrote above except once you have selected the parent element you use that in the second command to delete it. I will give an example below, again just get the JS Path as I said above and then use it here. If you have any questions about any of this feel free to ask.

    var elem = document.querySelector("#tdf_7 > div > table > tbody > tr.Toolbar.ui-widget-header > td > table > tbody > tr > td.ActionsBar.FS-Tool-B.EmbeddedReport.DisplayNone")

    elem.parentNode.removeChild(elem)





  • 3.  RE: Possible to hide Options in Report Link?

    Posted 09-04-2020 11:27
    Thanks Austin. I ended up using this in a code page to hide the table row:

    $("#tdf_5 > table > tbody > tr.std_mini_bar > td > table > tbody > tr").hide();

    ------------------------------
    Adam Keever
    ------------------------------