sorting options are not working for a table
I have placed a table on a report. The rows in the table need to be sorted first by two column. After that the rows should be sorted dynamically based on report parameters. So in tablix sorting properties i have set expressions as seen in below screenshot. The 3 expressions are as follows. (First expression uses PrmSort1By. rest two use PrmSort2By and PrmSort3By respectively) =IIF(Parameters!PrmSort1By.Value = "Vendor_Number",Fields!Vendor_Number.Value, IIF(Parameters!PrmSort1By.Value = "Vendor_Name",Fields!Vendor_Name.Value, IIF(Parameters!PrmSort1By.Value = "Stage",Fields!StageSeq.Value, IIF(Parameters!PrmSort1By.Value = "Status",Fields!Status.Value, IIF(Parameters!PrmSort1By.Value = "Claim_Category",Fields!Claim_Category.Value, IIF(Parameters!PrmSort1By.Value = "Claim_Type",Fields!Claim_Type.Value, IIF(Parameters!PrmSort1By.Value = "Claim_Code",Fields!Claim_Code.Value, IIF(Parameters!PrmSort1By.Value = "Claim_Code",Fields!Claim_Code.Value, IIF(Parameters!PrmSort1By.Value = "Current_Buyer",Fields!Current_Buyer.Value, IIF(Parameters!PrmSort1By.Value = "Audit_Number",Fields!Audit_Number.Value, IIF(Parameters!PrmSort1By.Value = "Claim_Key",Fields!Claim_Key.Value,Fields!Claim_Number.Value))))))))))) The sorting is not working in the report. Let me know if I am missing some logic or Im doing something wrong.
June 14th, 2012 3:26am

Hi There Just a quick question are you using any row group inside your tablix ? if that is the case then you have to sort on the group level Please update then I might be able to help you out If you have any question please let me know. Many Thanks Syed Qazafi Anjum Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful
Free Windows Admin Tool Kit Click here and download it now
June 14th, 2012 4:08am

there are 2 static groups and 3 dynamic (which are optional as well) groups. These dynamic /optional groups are created based on report parameters. so if user does not select any parameters values for groups, these 3 dynamic groups are not formed. only 2 static groups will be present in report. thus i cannot add sorting at group level. because if groups are not formed, sorting will not be applied. and i need report to be dynamically sorted inrespective of dynamic groups. let me know if problem statement is not clear yet. i will elaborate it even more with some more screenshots. Note: there are total 6 report parameters which are optional. 3 for dynamic groups and 3 for dynamic sorting. sorting does not depend on grouping parameters.
June 14th, 2012 4:49am

Hi There All the sort criteria are based on your details group? Please try to put your sort expression on the static group as well as dynamic group and see if the problem gets resolved If you have any question please let me know. Many Thanks Syed Qazafi Anjum Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful
Free Windows Admin Tool Kit Click here and download it now
June 14th, 2012 5:37am

ok. i am little confused here. do you mean to say that instead of setting sorting for tablix, i should set it for every group level? the groups are as seen below. so do you mean, that for outer most group, auditnumber, i should set sort by "audit number' column? for audit year, same should be by audit year and for rests 3 groups, i should set expression as given in posted question? OR i should set all sorting for details group? please suggest.
June 14th, 2012 6:10am

Hi There When you have multiple groups and you put sort expression inside tablix, it does not give the result as expected So my suggestion is please put complete sort expression on first group and see if problem get resolved if not then you can put same sort expression on the next group there is no harm in that Many Thanks Syed Qazafi Anjum Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful
Free Windows Admin Tool Kit Click here and download it now
June 14th, 2012 6:33am

ok. i tried to set sorting by simple setting. for example, in first group i set to sort rows by one column (stage). the rows were not sorted. then i removed it from first group sorting and added it in tablix sorting properties. the rows were sorted by stage properly. then i added one more column (vendor number) for sorting after stage. but that did not work :( whenever i add any sorting criteria at group level it does not work. when i add it at tablix level, it works fine for first sort by but not for 2nd sort by.
June 14th, 2012 7:12am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics