<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Crystal Reports</title><link>http://forums.asp.net/76.aspx</link><description>Questions and discussions about Crystal Reports.  &lt;a target="_blank" href="http://aspadvice.com/SignUp/list.aspx?l=181&amp;c=11"&gt;Mailing List&lt;/a&gt; &lt;a href="http://www.businessobjects.com/devzone/009"&gt;Dev Zone&lt;/a&gt; &lt;a href="http://aspalliance.com/crystal/"&gt;Community&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Change sort order in Crystal Report</title><link>http://forums.asp.net/thread/3270784.aspx</link><pubDate>Thu, 02 Jul 2009 08:51:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3270784</guid><dc:creator>gbetsos</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3270784.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=76&amp;PostID=3270784</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;I have the following very simple piece of code:&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="c-sharp"&gt;ReportDocument ReportDoc = new ReportDocument();
string sReportFile = this.Server.MapPath(&amp;quot;~/Reports/catalogue.rpt&amp;quot;);
ReportDoc.Load(sReportFile);
ReportDoc.SetDataSource((DataTable) dtCatalogue);
rpvCatalogue.ReportSource = ReportDoc;
&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; rpvCatalogue is just a CrystalReportViewer used to display the report on a web page. What I want &lt;br /&gt;is to programmatically change the sort order of the report&amp;#39;s DataTable (dtCatalogue).&lt;/p&gt;&lt;p&gt;I have tried this:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; dtCatalogue.DefaultView.Sort = &amp;quot;title desc&amp;quot;;&lt;/p&gt;&lt;p&gt;but it does not work. Titles still appear on my report in ascending, not descending order.&lt;/p&gt;&lt;p&gt;Any help will be greatly appreciated!&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>