How do I change the CSS of the dashboard 'print' screen?

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

I have been using the developer tools to make the changes I need and then printing the file.  Is there a way to change the CSS so that I don't have to go dig through the source code every time?  

The problem I am solving for is the dashboard div being set to 7 in and the report body 100% being overridden.

Photo of enielsen0001

enielsen0001

  • 40 Points

Posted 4 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,434 Points 20k badge 2x thumb
Use Tamper Monkey for Chrome with this userscript:

$("#dashboard").css({width: "100%"});

And a URL pattern similar to this:

https://*.quickbase.com/db/*?prfry=1

See attached userscript.
Tamper Monkey Chrome Extension
https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en
Photo of enielsen0001

enielsen0001

  • 40 Points
What a fun tool!  I created and enabled the script on the print page, but the styles are not showing up in the dev tools viewer.  I must be using the tool improperly, but I am looking forward to playing with this.

I have a few roadblocks with this solution.  I will not be the one printing the dashboard and our work computers are locked down such that we can't install extensions.  Is there another way to accomplish this task native to QB?

Thanks for the tip on Tamper Monkey.  I love finding out about new tools.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,434 Points 20k badge 2x thumb
Somehow you need to arrange for custom JavaScript to run to patch QuickBase's CSS. This is going to place a burden on someone - the administrator or the end user - to add something to QuickBase or install something in the browser and depending on your choice you may restrict which browser you can provide a solution for. Other than using a user script utility (like TamperMonkey or CrossRider) you could try adding an image onload field [-] to the report to do the patching or perhaps save the script to a Chrome Snippet (Dev Tools | Sources | Snippets Tab) and have the user run the snippet.

Regarding installing an extension, I would physically test your end user's browsers to see if you can infacct install an extension. Oftentimes compters are locked down to prevent installation of programs but do allow browser extensions to be inatalled. FWIW, TamperMonkey does have a mechanism to both export user script for out of band distribution as well as a simple way to have an install script check for updates.
Photo of enielsen0001

enielsen0001

  • 40 Points
Thank you very much for the follow up.  I am not proud to say it, but the best solution I have at the moment that will be in everyone's wheelhouse is to copy and paste the dashboard page into Word where styling is more accessable to all.  It isn't elegant, but it gets the job done.

Off topic note - I would like to use your script to get all records to show on the dashboard without scrollling.  How do I get a scrip into a dashboard page?  I have found solutions, but they don't see to apply to the current version of QB.

Thanks you for your time and awesome hacks.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,434 Points 20k badge 2x thumb
> ... awesome hacks.

They are definitely hacks but they do get the job done and are definitely worth using until QuickBase offers a supported way of accomplishing the same thing. I really wish QuickBase would support a way to run user supplied JavaScript as the perception that normal users should avoid using these "hacks" is only holding back what enhanced features and data integrations users can implement themselves.

>How do I get a scrip into a dashboard page?

One way to get a script to run in the dashboard is to load a user defined HTML page (as a dashboard widget) containing only a <script> tag and running some JavaScript that modifies the host page by reaching out from the <iframe> and modifying the host dashboard page in some way. Ask a new question if you want to pursue this topic as I am trying to score a bunch of forum points so I can fund my trip to Brazil for the Mas Que Nada QuickBase User Group Conference.

Mas Que Nada
https://www.youtube.com/watch?v=KMOU9YLvHDg
Photo of enielsen0001

enielsen0001

  • 40 Points
Thank you so much.  I am going to post the question now.