Difference between revisions of "LabLynx KB:Adding order by in AR6"
From LIMSWiki
Jump to navigationJump to searchShawndouglas (talk | contribs) (Added article.) |
Shawndouglas (talk | contribs) |
||
Line 31: | Line 31: | ||
</pre> | </pre> | ||
[[Category:LabLynx KB:Developer training]] | [[Category:LabLynx KB:Developer training and documentation]] |
Latest revision as of 17:31, 24 October 2011
![]() |
This is an article specific to the Category:LabLynx knowledge base. Its context outside of LabLynx, Inc may not be apparent, thus why it appears inside the LabLynx KB namespace. |
Problem
There has been a problem with adding the "Order By" field to the report engine.
Resolution
The "datasource" being set by the AR6 ReportEngine is a DataSet. So, to add "Order By", you need to create/manipulate the default view as shown below and then reset the report DataSource with that new modified view. Code is as follows:
public void ActiveReport_ReportStart() { System.Data.DataSet ds = (System.Data.DataSet) rpt.DataSource; System.Data.DataView dv = ds.Tables[0].DefaultView; dv.Sort = "basetestid,paramorder,reportorder"; rpt.DataSource = dv; }