Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default How to control the OLAP Cube Value updating in Excel 2007 Workbook

I have a Excel 2007 worksheet that makes a connection to a OLAP Cube on a
server.

When I change a cube member, i.e., a parameter, the cube values update
themselves automatically.

When the parameter change is made programatically, the program execution
will NOT wait for the cube values to resolve before moving up to the next
line of code. This is obviously no good when the next line of code is to
print the worksheet.

How can I make the program wait allowing it to update the cube values before
moving on.

Thanks,
Mark
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default How to control the OLAP Cube Value updating in Excel 2007 Workbook

Mark, Can you add the line of code that is passing the parameter to the OLAP
object.

"Mark" wrote:

I have a Excel 2007 worksheet that makes a connection to a OLAP Cube on a
server.

When I change a cube member, i.e., a parameter, the cube values update
themselves automatically.

When the parameter change is made programatically, the program execution
will NOT wait for the cube values to resolve before moving up to the next
line of code. This is obviously no good when the next line of code is to
print the worksheet.

How can I make the program wait allowing it to update the cube values before
moving on.

Thanks,
Mark

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default How to control the OLAP Cube Value updating in Excel 2007 Work

Kent -

I'm not sure this answers the question you asked but here goes.

Here is the code that I have developed so far. The parameter (Contract ID)
is stored in a BindingSource which is referenced in a worksheet cell. Each
move through the BindingSource updates the cell (cube member) in the
worksheet which inturn causes the cube values to update.

private void btnPrint_Click(object sender, EventArgs e)
{
int n = 1;

this.tblUserInterface_MasterBindingSource.MoveFirs t();

do
{

//Globals.ThisWorkbook.Application.ActiveWorkbook.Co nnections[1].Refresh();
// does not stop program execution
while (Convert.ToDecimal(this.testrange.Value2) <
-2100000000M)
{
System.Threading.Thread.Sleep(10000); //stops the
workbook from doing anything including updating the cube values. **** is
there an equivalent to the Application.DoEvents()?
}


//this.PrintOutEx(1, 1, 1, false, missing, missing, missing,
missing, missing);
this.tblUserInterface_MasterBindingSource.MoveNext ();
n++;

}
while (n <= this.tblUserInterface_MasterBindingSource.Count);

}

"Kent Prokopy" wrote:

Mark, Can you add the line of code that is passing the parameter to the OLAP
object.

"Mark" wrote:

I have a Excel 2007 worksheet that makes a connection to a OLAP Cube on a
server.

When I change a cube member, i.e., a parameter, the cube values update
themselves automatically.

When the parameter change is made programatically, the program execution
will NOT wait for the cube values to resolve before moving up to the next
line of code. This is obviously no good when the next line of code is to
print the worksheet.

How can I make the program wait allowing it to update the cube values before
moving on.

Thanks,
Mark

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default How to control the OLAP Cube Value updating in Excel 2007 Work

Sorry Mark, This looks to me like C++ and I know nothing about it.

"Mark" wrote:

Kent -

I'm not sure this answers the question you asked but here goes.

Here is the code that I have developed so far. The parameter (Contract ID)
is stored in a BindingSource which is referenced in a worksheet cell. Each
move through the BindingSource updates the cell (cube member) in the
worksheet which inturn causes the cube values to update.

private void btnPrint_Click(object sender, EventArgs e)
{
int n = 1;

this.tblUserInterface_MasterBindingSource.MoveFirs t();

do
{

//Globals.ThisWorkbook.Application.ActiveWorkbook.Co nnections[1].Refresh();
// does not stop program execution
while (Convert.ToDecimal(this.testrange.Value2) <
-2100000000M)
{
System.Threading.Thread.Sleep(10000); //stops the
workbook from doing anything including updating the cube values. **** is
there an equivalent to the Application.DoEvents()?
}


//this.PrintOutEx(1, 1, 1, false, missing, missing, missing,
missing, missing);
this.tblUserInterface_MasterBindingSource.MoveNext ();
n++;

}
while (n <= this.tblUserInterface_MasterBindingSource.Count);

}

"Kent Prokopy" wrote:

Mark, Can you add the line of code that is passing the parameter to the OLAP
object.

"Mark" wrote:

I have a Excel 2007 worksheet that makes a connection to a OLAP Cube on a
server.

When I change a cube member, i.e., a parameter, the cube values update
themselves automatically.

When the parameter change is made programatically, the program execution
will NOT wait for the cube values to resolve before moving up to the next
line of code. This is obviously no good when the next line of code is to
print the worksheet.

How can I make the program wait allowing it to update the cube values before
moving on.

Thanks,
Mark

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default How to control the OLAP Cube Value updating in Excel 2007 Work

Actually it's C#, but it's really your concept that I'm interested in ...
maybe I can make it happen in C#.

Thanks,
Mark

"Kent Prokopy" wrote:

Sorry Mark, This looks to me like C++ and I know nothing about it.

"Mark" wrote:

Kent -

I'm not sure this answers the question you asked but here goes.

Here is the code that I have developed so far. The parameter (Contract ID)
is stored in a BindingSource which is referenced in a worksheet cell. Each
move through the BindingSource updates the cell (cube member) in the
worksheet which inturn causes the cube values to update.

private void btnPrint_Click(object sender, EventArgs e)
{
int n = 1;

this.tblUserInterface_MasterBindingSource.MoveFirs t();

do
{

//Globals.ThisWorkbook.Application.ActiveWorkbook.Co nnections[1].Refresh();
// does not stop program execution
while (Convert.ToDecimal(this.testrange.Value2) <
-2100000000M)
{
System.Threading.Thread.Sleep(10000); //stops the
workbook from doing anything including updating the cube values. **** is
there an equivalent to the Application.DoEvents()?
}


//this.PrintOutEx(1, 1, 1, false, missing, missing, missing,
missing, missing);
this.tblUserInterface_MasterBindingSource.MoveNext ();
n++;

}
while (n <= this.tblUserInterface_MasterBindingSource.Count);

}

"Kent Prokopy" wrote:

Mark, Can you add the line of code that is passing the parameter to the OLAP
object.

"Mark" wrote:

I have a Excel 2007 worksheet that makes a connection to a OLAP Cube on a
server.

When I change a cube member, i.e., a parameter, the cube values update
themselves automatically.

When the parameter change is made programatically, the program execution
will NOT wait for the cube values to resolve before moving up to the next
line of code. This is obviously no good when the next line of code is to
print the worksheet.

How can I make the program wait allowing it to update the cube values before
moving on.

Thanks,
Mark



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default How to control the OLAP Cube Value updating in Excel 2007 Work

Well, I know with vb and ado you can execute an ado object Asynchronously and
wait for it's execution to stop.

Execute ado object
Do Wail adoObj.StillExecuting
DoEvents
Loop


"Mark" wrote:

Actually it's C#, but it's really your concept that I'm interested in ...
maybe I can make it happen in C#.

Thanks,
Mark

"Kent Prokopy" wrote:

Sorry Mark, This looks to me like C++ and I know nothing about it.

"Mark" wrote:

Kent -

I'm not sure this answers the question you asked but here goes.

Here is the code that I have developed so far. The parameter (Contract ID)
is stored in a BindingSource which is referenced in a worksheet cell. Each
move through the BindingSource updates the cell (cube member) in the
worksheet which inturn causes the cube values to update.

private void btnPrint_Click(object sender, EventArgs e)
{
int n = 1;

this.tblUserInterface_MasterBindingSource.MoveFirs t();

do
{

//Globals.ThisWorkbook.Application.ActiveWorkbook.Co nnections[1].Refresh();
// does not stop program execution
while (Convert.ToDecimal(this.testrange.Value2) <
-2100000000M)
{
System.Threading.Thread.Sleep(10000); //stops the
workbook from doing anything including updating the cube values. **** is
there an equivalent to the Application.DoEvents()?
}


//this.PrintOutEx(1, 1, 1, false, missing, missing, missing,
missing, missing);
this.tblUserInterface_MasterBindingSource.MoveNext ();
n++;

}
while (n <= this.tblUserInterface_MasterBindingSource.Count);

}

"Kent Prokopy" wrote:

Mark, Can you add the line of code that is passing the parameter to the OLAP
object.

"Mark" wrote:

I have a Excel 2007 worksheet that makes a connection to a OLAP Cube on a
server.

When I change a cube member, i.e., a parameter, the cube values update
themselves automatically.

When the parameter change is made programatically, the program execution
will NOT wait for the cube values to resolve before moving up to the next
line of code. This is obviously no good when the next line of code is to
print the worksheet.

How can I make the program wait allowing it to update the cube values before
moving on.

Thanks,
Mark

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default How to control the OLAP Cube Value updating in Excel 2007 Workbook

Does the refresh trigger a worksheet change event? If the answer is yes,
then the routine could simply exit and rely on the Change Event to do the
printing.
--
Gary''s Student - gsnu200804


"Mark" wrote:

I have a Excel 2007 worksheet that makes a connection to a OLAP Cube on a
server.

When I change a cube member, i.e., a parameter, the cube values update
themselves automatically.

When the parameter change is made programatically, the program execution
will NOT wait for the cube values to resolve before moving up to the next
line of code. This is obviously no good when the next line of code is to
print the worksheet.

How can I make the program wait allowing it to update the cube values before
moving on.

Thanks,
Mark

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default How to control the OLAP Cube Value updating in Excel 2007 Work

How can I tell? (It's late in the day?)


"Gary''s Student" wrote:

Does the refresh trigger a worksheet change event? If the answer is yes,
then the routine could simply exit and rely on the Change Event to do the
printing.
--
Gary''s Student - gsnu200804


"Mark" wrote:

I have a Excel 2007 worksheet that makes a connection to a OLAP Cube on a
server.

When I change a cube member, i.e., a parameter, the cube values update
themselves automatically.

When the parameter change is made programatically, the program execution
will NOT wait for the cube values to resolve before moving up to the next
line of code. This is obviously no good when the next line of code is to
print the worksheet.

How can I make the program wait allowing it to update the cube values before
moving on.

Thanks,
Mark

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default How to control the OLAP Cube Value updating in Excel 2007 Work

Create a small event macro and see if it gets tripped. What is the range of
cells that get refreshed??
--
Gary''s Student - gsnu200804


"Mark" wrote:

How can I tell? (It's late in the day?)


"Gary''s Student" wrote:

Does the refresh trigger a worksheet change event? If the answer is yes,
then the routine could simply exit and rely on the Change Event to do the
printing.
--
Gary''s Student - gsnu200804


"Mark" wrote:

I have a Excel 2007 worksheet that makes a connection to a OLAP Cube on a
server.

When I change a cube member, i.e., a parameter, the cube values update
themselves automatically.

When the parameter change is made programatically, the program execution
will NOT wait for the cube values to resolve before moving up to the next
line of code. This is obviously no good when the next line of code is to
print the worksheet.

How can I make the program wait allowing it to update the cube values before
moving on.

Thanks,
Mark

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default How to control the OLAP Cube Value updating in Excel 2007 Work

It's quite large ... probably at least 1000

"Gary''s Student" wrote:

Create a small event macro and see if it gets tripped. What is the range of
cells that get refreshed??
--
Gary''s Student - gsnu200804


"Mark" wrote:

How can I tell? (It's late in the day?)


"Gary''s Student" wrote:

Does the refresh trigger a worksheet change event? If the answer is yes,
then the routine could simply exit and rely on the Change Event to do the
printing.
--
Gary''s Student - gsnu200804


"Mark" wrote:

I have a Excel 2007 worksheet that makes a connection to a OLAP Cube on a
server.

When I change a cube member, i.e., a parameter, the cube values update
themselves automatically.

When the parameter change is made programatically, the program execution
will NOT wait for the cube values to resolve before moving up to the next
line of code. This is obviously no good when the next line of code is to
print the worksheet.

How can I make the program wait allowing it to update the cube values before
moving on.

Thanks,
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
Creating an OLAP cube in Excel 2007? Andy Excel Discussion (Misc queries) 1 January 25th 09 10:03 PM
OLAP Cube Wizard in Office 2007 SoftServ Guy Excel Discussion (Misc queries) 1 September 19th 08 02:37 PM
suppress warning and locate cube in a pivot table from olap cube Tewari Excel Discussion (Misc queries) 0 March 28th 07 06:54 AM
Importing local OLAP cube in Excel 2007 keren Excel Worksheet Functions 0 October 30th 06 09:06 AM
OLAP: Security Error when updating a Cube Johan N Excel Programming 0 August 24th 06 01:29 PM


All times are GMT +1. The time now is 09:24 AM.

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"