web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Printing a long PowerApp
Power Apps
Unanswered

Printing a long PowerApp

(0) ShareShare
ReportReport
Posted on by 257

Hi

 

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.

kilaj1_0-1635451083981.png

 

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 

 

If(Parent.Printing=true,Approvals.Height+DataCard2_1.Height,680)

 

 

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"?

Categories:
I have the same question (0)
  • AmeerJab Profile Picture
    370 on at

    Hello Kilaj,

    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,

    regards.

  • kilaj1 Profile Picture
    257 on at

    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 

     

    set(Printscreen,False)

     

    .

    On the next screen Ive added to the Screen Height 

     

    If(Printscreen=true,Approvals.Height+Review.Height+88,Max(App.Height, App.MinScreenHeight))

     

    Approvals and Review are the data cards within the Canvas control

    for the canvas control I've added to the Height

     

    If(Printscreen=true,Approvals.Height+DataCard2_1.Height+100,680)

     

    I have a print button on the next screen that has Onselect

     

    set(Printscreen,true);

     

     

     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 

     

    Print()

     

    and another to confirm printing complete 

     

    Set(Printscreen,False)

     

     

    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.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard