Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating an OLAP cube in Excel 2007? | Excel Discussion (Misc queries) | |||
OLAP Cube Wizard in Office 2007 | Excel Discussion (Misc queries) | |||
suppress warning and locate cube in a pivot table from olap cube | Excel Discussion (Misc queries) | |||
Importing local OLAP cube in Excel 2007 | Excel Worksheet Functions | |||
OLAP: Security Error when updating a Cube | Excel Programming |