I have a Power App that can expand to over 4000 in height. I'm using the Print() function to print this and while I see a lot of information on expanding a gallery using the Self.Printing this option does not work for a canvas control.
If I hard code the height or set it to the datacards within the canvas height it works just find, but I cant leave it like this because when the app runs its taking that 4000+ height into account for the entire canvas and its unreadable/usable.
There is a Parent.Printing option, but it doesn't seem to work with my IF
Is there another way to get the canvas to expand for printing? I was thinking about using a variable to set the height when you click on print, but then what would reset it? may be a popup to say "return to form"?
you got the good idea for it, you can as you said declare a variable first on the OnStart and set it to the default value which is ex(680) and then ofc the expand will be made by a trigger so you could also add a formula to change the value of the variable, where you could also add a button and set it's visibility to be if(height variable > 680, true, false)
hope this help,
Thanks for the reply
so I've got some of this sorted out, but I'm having a few weird issues.
When i select one of my records and they test the print, its cutting off the app, but when i do it the second time with no changes it works.
After the print screen comes up, because the Canvas control AND the Screen height are set to the datacard size (over 4000) when you close the print screen it goes back to the back VERY zoomed out.
What Ive done is have a line in a Gallery that Onselect
On the next screen Ive added to the Screen Height
Approvals and Review are the data cards within the Canvas control
for the canvas control I've added to the Height
I have a print button on the next screen that has Onselect
i cant add the Print() here because the heights don't adjust in time for the print preview. The print preview comes us, sometimes with the issues I've mentioned above and with a huge white space to the right.
I then have two other buttons that show up once PrintScreen is set to true, a button to Print
and another to confirm printing complete
The idea is that once you've printed, it would have taken you back to the APP to click on done to return to the normal size and view of the record. Problem is its zoomed out once you close the preview and even if you click on the button to set the variable back to false, it says zoomed out. I've opted to navigate back to the home page afterwards but this might not be ideal.
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.