Excel export

Discussion forum for PivotCube VCL users. Common questions. Bug and problem reports

Moderator: Alex Zencovich

Excel export

Postby Siegmar Gieseler » Mon Jun 26, 2006 5:50 pm

I am using a STAR SCHEMA but as the dimension name I use the content of the FACT TABLE ( to keep the correct alphabetic order ).
When I export to EXCEL I would like to insert 2 or 3 fields of the FACT TABLE besides the dimension name.

Rows Value

A 1
B 2
C 3

But I would like to export:

Rows Value

A AA AAA 1
B BB BBB 2
C CC CCC 3

I understand it's a very specific feature, but I really need it :-(
Do I have to change de source code to make this work ?
Siegmar Gieseler
User
 
Posts: 9
Joined: Mon Jun 19, 2006 2:49 am

Re: Excel export

Postby AlexZencovich » Mon Jun 26, 2006 6:14 pm

Siegmar Gieseler wrote:I am using a STAR SCHEMA but as the dimension name I use the content of the FACT TABLE ( to keep the correct alphabetic order ).
When I export to EXCEL I would like to insert 2 or 3 fields of the FACT TABLE besides the dimension name.

Rows Value

A 1
B 2
C 3

But I would like to export:

Rows Value

A AA AAA 1
B BB BBB 2
C CC CCC 3

I understand it's a very specific feature, but I really need it :-(
Do I have to change de source code to make this work ?


You may use next way.
In your code, before you call TPivotGrid.ExportToExcel, set event handler to TPivotGrid.OnAfterRefresh. Then call TPivotGrid.RefreshData so handler procedure will called.
In even handler, move along Rows[] or Columns[] to find dimension you need and change corresponding PHeaderCell.Text to value you need to setup. After it, call to ExportToExcel will use changed header cells. Then you may clear event handler and call refreshData to restore original look.


PS You may need to call LockWindowUpdate(TPivotGrid.Handle) to prevent screen update .
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am


Return to PivotCube VCL

Who is online

Users browsing this forum: No registered users and 0 guests

cron