Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I am creating the chart from Macro and also added the dimension and expressions.
Sub FunctionStraightTable
set myStraightTable=ActiveDocument.ActiveSheet.CreateStraightTable
GetDimName = ActiveDocument.Variables("vDim").GetContent.String
myStraightTable.AddDimension GetDimName
GetMeasureName = ActiveDocument.Variables("vMeasure").GetContent.String
myStraightTable.AddExpression GetMeasureName
end sub
Now i want to make the expression conditional. How can i enable the conditional option from Expression Tab of Chart Property and how can i write the condition.
if anybody have idea then pls let me no.
Thanks in advance !!
Not sure how to enable or disable expression condition using script.
But a workaround could be, set the value of expression to zero to disable it.
Have a look on this example from APIGuide.qvw:
set chart=ActiveDocument.GetSheetObject("CH01")
set cp=chart.GetProperties
set dims=cp.Dimensions
set expr=cp.Expressions.Item(0).Item(0).Data.ExpressionData
dims(0).Show.Type=1 '0=false, 1=true, 2=cond
expr.Show.Type=2
expr.Show.Expression="sum(a)<10000"
chart.SetProperties cp
- Marcus
why u need to write macro to create straight table?