Page 1 of 1

[Solved] Autorefresh plus formatting of pivot report

PostPosted: Mon Nov 11, 2019 9:50 pm
by gkick
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

Re: autorefresh plus formatting of pivot report

PostPosted: Mon Nov 11, 2019 10:08 pm
by Villeroy
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

Re: autorefresh plus formatting of pivot report

PostPosted: Tue Nov 12, 2019 4:19 am
by gkick
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.