Sorting Matrix report
-
14 maja 2012 18:30
i have matrix report like
Transaction name
Month Date trans1 trans2 trans3 TOTAL
April 4/4/2012 33 11 22 66
August 8/8/2012 33 11 22 66
May 5/5/2012 33 11 22 66
---------------------------------------------------------------------------
i want to sort the main row group by Date
April,May,August
Ahmed Osman
- Przeniesiony przez Min ZhuMicrosoft Contingent Staff 22 maja 2012 02:42 (From:Windows Presentation Foundation (WPF))
Wszystkie odpowiedzi
-
15 maja 2012 09:41
no one can sort month by date ,not alphabetic, like
Month
April
May
August
Ahmed Osman
-
16 maja 2012 07:36
Hi Ahmed Osman2,
What kind of control are you using to show the data, you could use SortDescriptions to complete the sorting.
ICollectionView dataView = CollectionViewSource.GetDefaultView(myDataGrid.ItemsSource); dataView.SortDescriptions.Clear(); dataView.SortDescriptions.Add(new SortDescription(strPropertyName, paramDirection)); dataView.Refresh();
Best regards,
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
16 maja 2012 11:17
Hi Ahmed Osman
There are three ways to sort your report.
1) If you want to do it UI: You can populate your report in a Datagrid. Bind your report collection to the Data Grid. When you click on the the Column Header, all the rows are sorted.
2) In business logic: After retrieving your collection from database, use some logic to sort like:
var sortedCollection = MyCollection.OrderBy(p => p.Date).ToList();
3) While retrieving your result from the database, modify the query and use ORDER BY clause to sort the collection by Date.
Mark as Answer, if it solves your query.
Thanks
Murali Mahendra Banala
-
20 maja 2012 11:52
-
20 maja 2012 12:58
Thanks Murali Mahendra Banala fro you effort,
but i use Procedure order by date, in preview data oky but in report sort alphabetic .
Ahmed Osman
-
22 maja 2012 02:40
Hi Ahmed Osman2,
Since your question is not about Windows Presentation Foundation(WPF), I will be moving this thread to Where is the Forum for... forum to help you find the appropriate forum for your question.
Have a nice day!
Min Zhu [MSFT]
MSDN Community Support | Feedback to us
-
22 maja 2012 07:39Właściciel
-
22 maja 2012 11:20
thanks ED
this is VS 2010 ,SQL 2008, Report (wizard )
Ahmed Osman
-
22 maja 2012 15:24
-
28 maja 2012 17:11Właściciel
thanks ED
this is VS 2010 ,SQL 2008, Report (wizard )
Ahmed Osman
Then try here: http://social.technet.microsoft.com/Forums/en-US/sqlreportingservices/threads
Ed Price (a.k.a User Ed), SQL Server Experience Program Manager (Blog, Twitter, Wiki)
- Zaproponowany jako odpowiedź przez Ed Price - MSFTMicrosoft Employee, Owner 28 maja 2012 17:11
- Oznaczony jako odpowiedź przez Ed Price - MSFTMicrosoft Employee, Owner 6 czerwca 2012 01:11