Dear all,
I wonder whether anyone may be able to give some advice here.
I have set up a report as follows:

The months in the 'Key month' drop-down object is a timerange driven from the year box and the months in the column header are the values of the 'Key Month' drop down. I then want to sort the table based on the Key Month selection - e.g. if Jul is selected the table values should be sorted based on the values in the Jul Column.
I then add a 'sort' link as follows:

But the result is then as follows:

As you can see, it actually restricts the values to Jul (hides other months) and certainly does not perform a sort.
I then had a look at the SQL statement:
SELECT SUM(T00.`Amount`), T00.`DETAIL` FROM `RawData` T00 WHERE T00.`PAYMENT DATE` BETWEEN {d '2010-07-01'} AND {d '2010-07-31'} AND T00.`DETAIL` IN ('Advertising Recharge', 'Barstocks (Spirits Etc)', 'Bin Collection', 'Book Of Remembrance Costs', 'Clinical & Medical Waste', 'Communications', 'Computer Hardware Maintenance', 'Computer Software Maintenance', 'Contracted Services', 'Country Grounds', 'Credit Card Recharge', 'Dayworks/Miscellaneous', 'Decoration', 'Derv.', 'Disposal Cost Architect', 'Donations', 'Electricity Direct Invoices', 'Entertainment Percentage Shows', 'Equipment') AND T00.`PAYMENT DATE` BETWEEN {d '2010-01-01'} AND {d '2010-01-31'} GROUP BY T00.`DETAIL` ORDER BY 2 ASC
and it is clear that it is adding a 'Jul' filter for each month.
What am I doing wrong here....?
Regards
7 Replies
Hello Theunis,
Instead of doing the Sort using the dragging arrow, I suggest you use the sort function to sort the Table based on the column of the month. Put this formula on the switch event of the Month menu and Based on the setting of the menu you can detrmine which column to base the sort on.
Hope that helps.
Best regards,
Aju Mathew
Hi Theunis,
As per your request here is a screenshot of the example. OF you can't make out the formula in the screenshot then here it is
SORT ( REFERENCE ( [<DataTable>] ; SETTING ( [<MonthMenu>] ) ; 1 ; SETTING ( [<MonthMenu>] ) ; LAST ) ; ASCENDING ; [<DataTable>] )
Thank you very much Aju - works like a dream!
Regards
Theunis
Help! help! I'm an Arcplan beginner. I have problem in date sorting. my date sorting only sort day and month NOT including the Year. E:g-
I'm using <Tarikh Keluar> button as a control.
Hope the expertise here can help me..
Thanks a lot.
Regards;
Zira
looks like it sorts the "string" but not the real value.
Try to transform it on the database or in arcplan to int in a second column in the format yyyymmdd and sort by that column instead of the date column
you can use SQL-Function datepart to workaround this. Pls note that you may have internationally different type of display date as well (have to mention: arcplan has loads of problems concerning localizition beyond engl / german)
Would you like to comment?
You must be a member. Sign In if you are already a member.