Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Choose from grid to print preview
Message
 
 
À
19/08/2004 07:37:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00934458
Message ID:
00934752
Vues:
26
>hi all,
>
>how i can display record from mygrid(hase many records) to myreport ,when i close report,return back to mygrid with same data.to choise another record etc...
>thanks.

Do you have primary key in your table? If yes, you could do
local lnPK as Integer && assuming integer PK
lnPk = myTable.PK && put the name of your primary key field, it will get the value from the currently selected record in the grid
select * from myTable where PK = m.lnPK into cursor curToReport nofilter
thisform.cmdPrintReport.SetFocus() && you have to move focus off the grid to another object before printing your report
report form myReport Preview
thisform.grdReport.setfocus() && restore focus back
If you do not have PK in your table (but it's hardly to imagine), you may use recno() instead.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform