save current pt view

R

rfierro

Hi



Is there a way to save the users current pivot table view over the web
without exporting to excel?



So it can be retrevied over web again....
 
D

Dan Ricker

Yes there is.

The PivotTable.XMLData property holds the current pivot
state. This property is a string (XML).

Client Side Basic Steps:

1) Save Pivot View:
szPivotXML = PivotTable1.XMLData
szViewName = ''' Get user input for view name
szUserID = ''' Some User ID
''' One an Ado Connection and stuff the above
information in the "ViewSaveTable" or whatever you want to
call it

2) Open Saved Pivot View:
szUserID = ''' Get User ID
szViewName = ''' Get View Name - Could be from a list
of names generated when the user opened the page
szPivotXML = ''' Retrieve the XML from the database
table
PivotTable1.XMLData = szPivotXML

********************
Notes:

If the PivotTable is using an External DataSourceControl,
this will no work so nicely. The DSC needs to be persisted
and saved also. There are probably timeing issues that
need to be dealt with too...

If the PivotTable is using an ADODB.RecordSet object (or
any other "DataSource" this will probably not work at all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top