PC Review


Reply
Thread Tools Rate Thread

Cube functions won't refresh when Printing

 
 
Mark
Guest
Posts: n/a
 
      9th Sep 2008
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_MasterBindingSource.MoveFirst();
currentWB.RefreshAll();

int n = 1;

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

n++;

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

Obviously any comments are appreciated.

Thank You
Mark

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Cube refresh Date Reeza Microsoft Excel Misc 0 11th May 2010 06:19 PM
cube functions Robert Microsoft Excel Worksheet Functions 0 15th Mar 2010 09:16 PM
CUBE FUNCTIONS! =?Utf-8?B?QWRyaWFuYQ==?= Microsoft Excel Programming 0 24th Feb 2006 06:43 PM
Automatic refresh of cube Hansje Microsoft Excel Discussion 0 27th May 2004 01:32 PM
refresh offline cube robert.wagner Microsoft Excel Misc 0 26th Jan 2004 10:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:57 AM.