Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Choose from grid to print preview
Message
 
 
To
19/08/2004 07:37:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00934458
Message ID:
00934752
Views:
27
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform