[Solved] Autorefresh plus formatting of pivot report

Creating and using forms

[Solved] Autorefresh plus formatting of pivot report

Postby gkick » Mon Nov 11, 2019 9:50 pm

Hi all,

This should be in Calc, but no idea in which subforum to post this.

My reportmenu in base has a button which calls up a calc file containing a linked pivot amongst other stuff.
Is it possible to first do a autorefresh and then apply a standard format since the refresh kills the original format.
If so in calc would one do that with recording a macro ?

Thanks
Last edited by gkick on Tue Nov 12, 2019 4:20 am, edited 1 time in total.
Libre Office 6.2 on Windows 10 HSQL 2.5 backend
gkick
 
Posts: 207
Joined: Wed Aug 07, 2019 5:24 pm
Location: Chile

Re: autorefresh plus formatting of pivot report

Postby Villeroy » Mon Nov 11, 2019 10:08 pm

Pivot table number formats are broken when data come from database queries. No way to configure anything.
Anything else (font, size, color) can be configured through styles.

I use this with my report spreadsheet to refresh all database ranges and all pivot tables.:
Code: Select all   Expand viewCollapse view
Sub Main
   for each dbr in ThisComponent.DatabaseRanges
      dbr.refresh()
   next dbr
   for each sh in ThisComponent.getSheets()
      for each dp in sh.DataPilotTables
         dp.refresh()
      next dp
   next sh
End Sub
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 27879
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: autorefresh plus formatting of pivot report

Postby gkick » Tue Nov 12, 2019 4:19 am

Thank you, oh well at least we have a pivot. Very interesting, hardly any of the heavy duty dbs seem to support pivots, exception being H2 (not sure if that one is heavy duty though.
Libre Office 6.2 on Windows 10 HSQL 2.5 backend
gkick
 
Posts: 207
Joined: Wed Aug 07, 2019 5:24 pm
Location: Chile


Return to Forms

Who is online

Users browsing this forum: No registered users and 3 guests