Print App with only App and no Domo headers.
Hello,
I'm currently having an issue with a custom App I created using the Developer tools. My issue is the fact that my print button does not work at all and I recieve an error of: "Ignored Call to 'print()'. The document is sandboxed, and the 'allow-modals' keyword is not set".
Reading this I understand that my function is not being called because of a setting in Domo. I need my app to be printed on paper with just the App, no website headers, no website footers, just the App. My managers are extremely adamant about that. I need someone to help me figure out how to get it printed, I would have just exported it and then printed it but for some reason my export option is grayed out with this custom app.
Can someone tell me the best way I should be approaching this?
Best Answer
-
Hey there!
I ended up getting sort of an answer, what we ended up doing was adding a button to the app that essentially opens the card into fullscreen mode in another tab and then from there we can print it out.
The two functions that are being used in the app.js file:
$scope.printview = function(){
domo.navigate("https://b14e33be-5dfa-4ed5-88ba-1ca2c0a912cf.domoapps.prod5.domo.com?printing=true",true)
}
$scope.print = function(){
window.print();
}The URL is the app URL.
Then we added the buttons using this in the HTML file:
<button id="printv" ng-click="printview()" ng-hide="isprinting">Print Version</button>
<button id="print" class="fa fa-print fa-3x" ng-show="isprinting" ng-click="print()"></button>
<button id="print2" ng-click="print()" ng-show="isprinting">Print Page</button>I hope this helps a little bit!
1
Answers
-
Hi @jaz,
There are tight measures on custom apps to ensure that they are sandboxed into their iframe. It gives you free reign to have custom code but keeps code tightly packaged.
You can get this reviewed by submitting a ticked to support@domo.com. They can have our product teams review the possibility of allowing that function.
Former Domo employee you can find me in the Dojo Community here @n8isjack0 -
I was hoping for a different answer to be honest. I understand why it is the way it is, however, I need to be able to print this. I've already created a ticket, however, I really need to get this sorted out ASAP. My managers are waiting on this function and I was previously told I would be able to do this.
Do you know why the export button is not working? if I could just export it and then print it then that would work as well. I really need a solution to my problem.
0 -
This one will need to go to the support team so thay can get the best answer for you in this case.
Thanks!
0 -
Did you ever get a real answer for this? I'm running into the same issue and am hoping you might be able to help from what you learned. I don't understand why we can create the app but not print the app only.
Thanks,
Elizabeth
0 -
Hey there!
I ended up getting sort of an answer, what we ended up doing was adding a button to the app that essentially opens the card into fullscreen mode in another tab and then from there we can print it out.
The two functions that are being used in the app.js file:
$scope.printview = function(){
domo.navigate("https://b14e33be-5dfa-4ed5-88ba-1ca2c0a912cf.domoapps.prod5.domo.com?printing=true",true)
}
$scope.print = function(){
window.print();
}The URL is the app URL.
Then we added the buttons using this in the HTML file:
<button id="printv" ng-click="printview()" ng-hide="isprinting">Print Version</button>
<button id="print" class="fa fa-print fa-3x" ng-show="isprinting" ng-click="print()"></button>
<button id="print2" ng-click="print()" ng-show="isprinting">Print Page</button>I hope this helps a little bit!
1 -
Thank you! I'll see if this gets us where we need to be until Domo can figure out a better long-term solution.
1 -
Thanks @jaz for closing the loop here and sharing your solution!
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive