Page 1 of 1

Missing SummaryTypes and custom Comparer

Posted: Fri Aug 31, 2012 11:52 am
by LukasT
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?

Re: Missing SummaryTypes and custom Comparer

Posted: Fri Aug 31, 2012 2:01 pm
by Alex K.
Hello,
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....
Please check the sample report in attachment.
If it is does not help please send us your report with test data for analysis.
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?
Can you please describe your task in more details?
What are the basics of difference between our Comparer and ours, why it is better?

Thank you.

Re: Missing SummaryTypes and custom Comparer

Posted: Mon Sep 03, 2012 8:27 am
by LukasT
Please check the sample report in attachment.
If it is does not help please send us your report with test data for analysis.
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
Can you please describe your task in more details?
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...

Re: Missing SummaryTypes and custom Comparer

Posted: Mon Sep 03, 2012 11:28 am
by LukasT
... 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

Posted: Tue Sep 04, 2012 1:36 pm
by Alex K.
Hello,
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
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.
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..
Unfortunate, on current moment it is not possible.
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....
This functions was added for Totals functions in dictionary.

Thank you.

Re: Missing SummaryTypes and custom Comparer

Posted: Tue Sep 04, 2012 2:23 pm
by LukasT
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.
....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.
Unfortunate, on current moment it is not possible.
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.... :?

Re: Missing SummaryTypes and custom Comparer

Posted: Wed Sep 05, 2012 7:55 am
by Alex K.
Hello,
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.
Can you please send us a sample report with test data and sample how it should look like for analysis.
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....
As a way, you can use your own function in report. You can add your function in dictionary or in code of report.

Thank you.