Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to reindex a report programaticaly
Message
De
17/04/2003 10:58:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
17/04/2003 10:50:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Divers
Thread ID:
00778856
Message ID:
00778862
Vues:
18
>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 && ComboBox on form
do case
case lnSortOrder = 1 && By Name
  lcOrderClause = "order by ClientName"
case lnSortOrder = 2 && By City
  lcOrderClause = "order by City, ClientName"
case lnSortOrder = 3 && By creation date
  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.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform