Missing SummaryTypes and custom Comparer
Missing SummaryTypes and custom Comparer
Hello,
we have need to sort groups by another column than it is grouped by. For this purpose is usable SummaryExpression and SummaryType. But there aren't all aggregate functions for all types.... for example MaxStr() etc. So we are not able to sort groups by string value....
And second problem is, that you are probably using IComparer object from CurrentCulture, but we have our own Comparer object. Is any possibility to set up Comparer on StiReport (StiEngine) object? Or it could be added?
we have need to sort groups by another column than it is grouped by. For this purpose is usable SummaryExpression and SummaryType. But there aren't all aggregate functions for all types.... for example MaxStr() etc. So we are not able to sort groups by string value....
And second problem is, that you are probably using IComparer object from CurrentCulture, but we have our own Comparer object. Is any possibility to set up Comparer on StiReport (StiEngine) object? Or it could be added?
Re: Missing SummaryTypes and custom Comparer
Hello,
If it is does not help please send us your report with test data for analysis.
What are the basics of difference between our Comparer and ours, why it is better?
Thank you.
Please check the sample report in attachment.LukasT wrote:we have need to sort groups by another column than it is grouped by. For this purpose is usable SummaryExpression and SummaryType. But there aren't all aggregate functions for all types.... for example MaxStr() etc. So we are not able to sort groups by string value....
If it is does not help please send us your report with test data for analysis.
Can you please describe your task in more details?LukasT wrote:And second problem is, that you are probably using IComparer object from CurrentCulture, but we have our own Comparer object. Is any possibility to set up Comparer on StiReport (StiEngine) object? Or it could be added?
What are the basics of difference between our Comparer and ours, why it is better?
Thank you.
- Attachments
-
- SimpleGroup.mrt
- (25.05 KiB) Downloaded 253 times
Re: Missing SummaryTypes and custom Comparer
Try to rename CategoryName in Data.xml in order not to be in alphabetical order.... and you will see, that it is still ordered by CategoryIDPlease check the sample report in attachment.
If it is does not help please send us your report with test data for analysis.
We have another (specific) requirement for alphabetical and numerical order. For example we need to have numbers on end.... or if we decide to have some modifications in data order, we need to have possibility to somehow change Comparer object...Can you please describe your task in more details?
Re: Missing SummaryTypes and custom Comparer
... I found my old topic http://forum.stimulsoft.com/viewtopic.p ... 432#p13432 .... you added string versions of Max/Min functions (MaxStr/MinStr) but maybe you forgot to add this functions to SummaryType enumeration....
Re: Missing SummaryTypes and custom Comparer
Hello,
Please check the modified report in attachment.
Thank you.
Sorry for mistake, as a way, you can set the necessary sort order for databand and for GroupHeader band set SortDirection property to None.LukasT wrote:Try to rename CategoryName in Data.xml in order not to be in alphabetical order.... and you will see, that it is still ordered by CategoryID
Please check the modified report in attachment.
Unfortunate, on current moment it is not possible.LukasT wrote:We have another (specific) requirement for alphabetical and numerical order. For example we need to have numbers on end.... or if we decide to have some modifications in data order, we need to have possibility to somehow change Comparer object..
This functions was added for Totals functions in dictionary.LukasT wrote:... I found my old topic viewtopic.php?f=8&t=3206&p=13432#p13432 .... you added string versions of Max/Min functions (MaxStr/MinStr) but maybe you forgot to add this functions to SummaryType enumeration....
Thank you.
- Attachments
-
- SimpleGroup_modified.mrt
- (25.16 KiB) Downloaded 247 times
Re: Missing SummaryTypes and custom Comparer
....but we have data sorted from server and I don't wont to define new sorting rules on DataBand... solution is MaxStr function in SummaryTypes.Sorry for mistake, as a way, you can set the necessary sort order for databand and for GroupHeader band set SortDirection property to None.
Please check the modified report in attachment.
Ok, but we have a lot of expressions with for example MaxStr function exported from old reporting system and there is expecting concrete result. We are not able to manually rewrite theese expressions it due another sorting rules. But if it is not possible, what shall we do....Unfortunate, on current moment it is not possible.

Re: Missing SummaryTypes and custom Comparer
Hello,
Thank you.
Can you please send us a sample report with test data and sample how it should look like for analysis.LukasT wrote:....but we have data sorted from server and I don't wont to define new sorting rules on DataBand... solution is MaxStr function in SummaryTypes.
As a way, you can use your own function in report. You can add your function in dictionary or in code of report.LukasT wrote:Ok, but we have a lot of expressions with for example MaxStr function exported from old reporting system and there is expecting concrete result. We are not able to manually rewrite theese expressions it due another sorting rules. But if it is not possible, what shall we do....
Thank you.