Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone.
I have a straight table with columns from the dimensions tab as well as the expressions tab. There is one column at the end (dimension column) that will not move to a different position when I drag it. I played around by adding other dimensions after it and they too refuse to move.
Please help / advise.
Thank you.
Regards,
Ashley.
Never mind figured it out
set chart = ActiveDocument.getsheetobject("CH1112")
set cp = chart.GetProperties
need to be at the top of the macro not in the middle.
Hi all
if you use straight table you have flexibility to mix the dimension and expression Oder,
for example if you have the flowing table with
Region,OrderID as dimensions,
QTY, Amount,Discount as expression
Region | OrderID | QTY | Amount | Discount |
---|---|---|---|---|
you can drag them to be like
Region | QTY | Amount | OrderID | Discount |
---|---|---|---|---|
hope it helpful for you,
Regards
Bump... just in case someone is feeling lazy. Worked a treat, thanks all.
sub fixtablesort
set chart = ActiveDocument.getsheetobject("CH336")
set cp = chart.GetProperties
'get the current sort order
d = cp.TableProperties.DisplayOrder
for i = lbound(d) to ubound(d)
msgbox d(i)
next
cp.TableProperties.DisplayOrder = 1
chart.setproperties cp
'get the new sort order
d = cp.TableProperties.DisplayOrder
for i = lbound(d) to ubound(d)
msgbox d(i)
next
end sub
Thanks! I just spent 30 min. trying to find a solution to my straight table ordering issues with expressions among dimensions that would not move order until your simple suggestion of dragging and dropping worked like a charm!
I'm on April 2020 SR4. It's been almost 10 years since this issue got posted, and I'm still running into this problem. As noted in earlier comments, drag/drop doesn't work in my case even after unhiding all the columns. Being stuck on a such a seemingly simple step is immensely frustrating, not to mention extremely difficult to explain to management.
Hi All,
I know it's been a while, but thought I would add this.
I had the same issue and have found a possible solution using the files in the -prj folder.
Create a folder in the same directory as your .qvw file called the same as the qvw, but with -prj as the name of the folder. in this example I created this folder Dimension order 2-prj .
When you save the file Dimension order 2.qvw, it will populate the -prj folder with many files.
Your example file with the problem table, the chart id was CH1112.
Open the CH1112.xml file in the -prj folder and search for <DisplayOrder>
Your original was like this
<DisplayOrder>
<int>3</int>
<int>18</int>
<int>1</int>
</DisplayOrder>
This means that the chart will show the 1st 3 dims, then 18 Expressions, then 1 other Dim.
I deleted the 3rd line and changed the 1st line to be 4, (for 4 Dims)
Like this:
<DisplayOrder>
<int>4</int>
<int>18</int>
</DisplayOrder>
Then save the file and close it.
Close you application and reopen it. When the app opens it checks to see if there is a -prj folder and if so, takes the settings from this folder for the app.
(Thanks Rob Wunderlich for the pointer using your Cookbook site)
The table now has the right sort order for the Dims and Expressions 🙂
Hope this helps, as its taken me a few days to figure this out also with the help of the macro post above, I got to know what the numbers actually meant in the pop up box.
Even by dragging and dropping, disabling and re-enabling expressions and Dims, the error can persist on access point.
Regards
greenee