Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default Cube functions won't refresh when Printing

Hi -

I'm developing a Excel 2007 worksheet that uses cube functions. The cells
holding cube functions refresh everytime I click on a different ID stored in
a datagrid. So when I click a different ID in the datagrid, the worksheet
populates with the data in the grid which is associated with the ID. Simple
enough (once you know what to do).

The problem I'm having is with the print program ... I wrote a program to
move through the datagrid one ID at a time and then use PrintOutEx to print
the exhibit. Well, the cells with the cube functions won't update or refresh
themselves, showing blank values instead.

The code is as follows:
private void btnPrinter_Click(object sender, EventArgs e)
{
Excel.Workbook currentWB = (Excel.Workbook)
Globals.ThisWorkbook.Application.ActiveWorkbook;

Object missing = System.Reflection.Missing.Value;

Globals.Sheet2.tblUserInterface_MasterBindingSourc e.MoveFirst();
currentWB.RefreshAll();

int n = 1;

do
{
Globals.Sheet1.PrintOutEx(1, 1, 1, false, missing, missing, missing,
missing, false);
Globals.Sheet2.tblUserInterface_MasterBindingSourc e.MoveNext();
currentWB.RefreshAll();

n++;

}
while (n <= 5);
//while (n <= Globals.Sheet2.tblUserInterface_MasterBindingSourc e.Count);
}

Obviously any comments are appreciated.

Thank You
Mark

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cube refresh Date Lakshmi Excel Discussion (Misc queries) 1 May 11th 10 06:19 PM
cube functions Robert Excel Worksheet Functions 0 March 15th 10 09:16 PM
How do I refresh 2 pivot tables from same OLAP cube Peter Bebbington Excel Discussion (Misc queries) 0 April 28th 08 09:21 AM
OLAP Cube Refresh Excel 2003 Peter Bebbington Excel Discussion (Misc queries) 0 April 10th 08 11:40 AM
CUBE FUNCTIONS! Adriana Excel Programming 0 February 24th 06 06:43 PM


All times are GMT +1. The time now is 03:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"