cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JürgenD
Helper II
Helper II

Changing the position of a datatable before printing

Hello everybody,

for optical reasons i want to change the position of elements before printing.

I tried this in the OnSelect-property of the Print-Button:

DataTable5.Y=120;;

UpdateContext({bolKopfVisible: true});;
Print();;
DataTable5.Y=250;;
UpdateContext({bolKopfVisible: false})

 

But this does not work.

Do you have an idea?

 

Regards, Jürgen

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @JürgenD ,

You cannot set an element like that. You could use the Variable on the Y of DataTable5

If(
   KolKopfVisible;
   120;
   150
)

Your print code would be

UpdateContext({bolKopfVisible: true});;
Print();;
UpdateContext({bolKopfVisible: false})

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @JürgenD ,

You cannot set an element like that. You could use the Variable on the Y of DataTable5

If(
   KolKopfVisible;
   120;
   150
)

Your print code would be

UpdateContext({bolKopfVisible: true});;
Print();;
UpdateContext({bolKopfVisible: false})

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz ,

thank you. I make this mistake again and again... 😀

After more than 20 years of programming with VBA, it is still difficult for me to think the opposite direction.

Regards

Jürgen

Thanks @JürgenD ,

I had about 30 years of VBA/SQL before I started on Power apps three years ago, so know what you mean. You have to think like Excel where everything can be dynamically calculated on the values of other things.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,016)