Sorting depending on given conditions
FYI: Delphi 2007 for Win32/RB10.09
Hi all.
I'm having an issue with sorting a field.
Given some condition I need to be able to sort a field in a report.
Is there any way to do it, maybe throught DataPipeLine or any other method?
Thanks in advance.
Regards,
Fabio Reynoso
Hi all.
I'm having an issue with sorting a field.
Given some condition I need to be able to sort a field in a report.
Is there any way to do it, maybe throught DataPipeLine or any other method?
Thanks in advance.
Regards,
Fabio Reynoso
This discussion has been closed.
Comments
Typically you use SQL to sort data (the DataPipeline cannot sort data.)
If you are using the RB Data workspace (DADE) to build queries, here is an
example that shows how to use TdaSQLBuilder to sort data programmatically.
www.digital-metaphors.com/tips/SQLBuilderSimpleOrderBy.zip
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
This example shows me how to add the fields I'd like to sort, but is there a
way to specify the order? (Ascending, Descending).
Because that is exactly what I want to achieve (of course, after your
example).
Thanks a lot again.
Regards,
Fabio Reynoso
According to the RBuilder Help topic for TdaSQLOrderByFields there ia an
AddDescending method
public function AddDescending(const aTableNameOrAlias: String; const
aFieldNameOrAlias: String): TdaField; virtual;
Adds a specified field to the Order By array and sets the TdaField.Ascending
property to False.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Regards and thanks for your support.
Fabio Reynoso