Hi Hilmar, I´m not using VFP Reports, I´m using Crystal Reports :)
>>Hello *.*
>>
>>
>>I need to change the order of my report bypassing parameters, can I do it?
>>I have a Customer Report that I need to show it ordering by Name and by City, my user will decide wich order he wants.
>>
>>Tanks in advance
>
>In my programs, I use something similar to the following (more complicated, but I am omitting details which are irrelevant for the explanation):
>
>
>local lnSortOrder, lcOrderClause
>lnSortOrder = ThisForm.CboSortBy.Value
>do case
>case lnSortOrder = 1
> lcOrderClause = "order by ClientName"
>case lnSortOrder = 2
> lcOrderClause = "order by City, ClientName"
>case lnSortOrder = 3
> lcOrderClause = ""
>endcase
>
>select * from Client &lcOrderClause into cursor Temp
>
>report form ClientList ...
>
>
>It is important that the report have nothing in its DataEnvironment.
>
>Note that with macro substitution, you could also easily create a SELECT command with a variable WHERE condition.
>
>HTH,
>
>Hilmar.