开发者

Sorting results in Advanced System Reporter in Sitecore

开发者 https://www.devze.com 2023-02-12 21:19 出处:网络
In Sitecore\'s Advanced System Reporter (v1.3) shared source module, is there an out-of-the-box way of sorting the results before the results are displayed to email/screen or will I need to implement

In Sitecore's Advanced System Reporter (v1.3) shared source module, is there an out-of-the-box way of sorting the results before the results are displayed to email/screen or will I need to implement something myself?

In a standard ASR install, I can see the Media Viewer viewer configuration item has a sort parame开发者_Python百科ter in the attributes field but it's using ASR.Reports.Items.ItemViewer class which, after checking in reflector, doesn't respect the sort parameter. I take this to mean that the class might have respected the sort parameter previously but doesn't now.

As a side thought, I would have thought that a Scanner class would be a much more logical place to put sorting logic than at the Viewer class level.


Ok, found the answer. The sort parameter I found is actually used when running the report by the ASR module.

The sort parameter is set up in the attributes and is in the following format:

sort=ColumnName,ASC|DESC,[DateTime]

where Column Name is the display name of the column, ASC or DESC is the sort direction and is required and DateTime is to be set if the column is a date time value.

Example: Given the column formatting of

<Columns>
  <Column name="item name">Item Name</Column>
  <Column name="publish date">Publish Date</Column>
</Columns>

to sort by publish date descending, the appropriate sort parameter would be

sort=Publish Date,DESC,DateTime

and to sort by item name, the sort parameter would be

sort=Item Name,ASC


I'm not sure anyone can answer your question immediately, apart from probably the module author. But you have a huge advantage in this case - the module sources. Instead of browsing the assemblies with the Reflector, you can check out the latest sources and just debug it. One debug session can answer more questions than a bunch of SO posts. ;-)

Also, as a side note, you might have noticed special Sitecore logos on that page - this blog post will tell you what it means.

0

精彩评论

暂无评论...
验证码 换一张
取 消