Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01096209
Message ID:
01096516
Vues:
11
Thanks Sergey!

>Kevin,
>
>Check http://weblogs.foxite.com/andykramek/archive/2005/03/19/174.aspx
>
>
>>I'm using this to create a grid of search results. If no Station selected, then all records
>>are shown. If a Station is selected, the the query's WHERE clause is changed to include it.
>>
>>The first time I run it, I see data in the grid, after that, the grid is empty even though
>>the query returned data:
>>
>>
>>** If no Station is selected and the Show Paid only checkbox is off, then
>>** create a default WHERE clause
>>IF EMPTY(.cboStations.DisplayValue) AND .chkUnpaid.Value = 0
>>  cWhere = ".T."
>>ENDIF
>>
>>** If a Station is selected, add it to the WHERE clause
>>IF NOT EMPTY(.cboStations.DisplayValue)
>>  cWhere = cWhere + " StatName = '" + PADR(.cboStations.DisplayValue, 10, " ") + "' AND "
>>ENDIF
>>
>>** If the Show Paid only checkbox is on, then add it to the WHERE clause
>>IF .chkUnpaid.Value = 1
>>  cWhere = cWhere + " NOT Scanned AND "
>>ENDIF
>>
>>** Remove trailing 'AND'
>>cWhere = ALLTRIM(cWhere)
>>cWhere = SUBSTR(cWhere, 1, LEN(cWhere) - 3)
>>
>>** Of no sort column was passed in, use the default columns.
>>IF EMPTY(cSortOrder)
>>  cSortOrder = "StatName, InvoiceId"
>>ENDIF
>>
>>** Run the query
>>SELECT StatName, InvoiceId, DoneDate, UserId, Scanned ;
>>  FROM Commits ;
>>  WHERE &cWhere ;
>>  GROUP BY StatName, InvoiceId;
>>  ORDER BY &cSortOrder ;
>>  INTO CURSOR ReconData
>>
>>
>>.BindControls = TRUE
>>.Refresh()
>>
>>
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform