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
|