Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
All -
Trying to figure out a way to create a straight table box chart on the Main sheet as the document opens, and dynamically add the fields in the table created in a loadscript. The reason for this is that the table in loadscript is drawn from Oracle metadata tables and the field list will be variable.
the painfully manual alternative is to manually create the chart each time there is a change in the underlying table structures.
Any insight appreciated. Thanks,
Chris
first try to reload script, then press button.
I have a QV 9.0 SR2 but this code worked also in 8.5
I thought that would work once you mentioned it, but no dice.
may be it's bug in your QV Build?
Can you try this example on QV 9 SR1 ?
I agree. Downloading the update. Anyhow thanks for your help!
Hi Guys,
I tried it and I got the same error. I doubt that we both have a bg in te build.
Hi, I got the same error too.
I finally managed to get it to work, although the "solution" seems a little odd ...
sub chartmaker()
set tbl = ActiveDocument.Sheets(0).CreateStraightTable
tbl.AddExpression "sum(Amount)" 'add expressions first
tbl.AddDimension "Product"
set tbl = nothing
end sub
After stretching the code in many ways, I noticed that it would make it just by swapping two lines in Anatoly's code (ie adding expressions first, and then dimensions).
Hope this will help
Hilaire