Microsoft
Software
Hardware
Network
Question : VFP 6 - Simple Grid on Form and run reports
I have a simple Visual FoxPro 6 form with a grid and 3 buttons (Preview, Print, Cancel).
What I want to do is select a record and if Preview or Print is selected, to run the report using only the data from the selected record.
Here are the issues
1) How to set the column widths on the grid (2 fields)
2) How to get the currently selected row from the grid (just use recno()?)
3) I need to create a report (or 2 reports) - Basically, they are to be treated as 2 separate reports but I need the 2nd report to begin at page 2, so is there a way to combine 2 reports into a "set", so that when you do a report form x preview that it will run both reports and the 2nd report begins on page 2?
Answer : VFP 6 - Simple Grid on Form and run reports
1) How to set the column widths on the grid (2 fields)
THISFORM.Grid1.Column1.Wid
th = 20
THISFORM.Grid1.Column2.Wid
th = 30
2) How to get the currently selected row from the grid (just use recno()?)
Yes RECNO() is OK
3) You have to remember _Pageno value in some variable (e.g. _LastPageno) after the first report and print
_pageno + _LastPageno
in the second report
Or switch to VFP 9 which allows NORESET keyword in REPORT FORM command
Random Solutions
Controlling main application threads from within an instance of a class
MS SQL Server only using one core on a 4 core box
Outlook 2007 and Microsoft Office Online
Riverbed with Cisco GRE Tunnel
Subdatasheet behavior
SBS2008 GoDaddy as SmartHost for email.
Cisco SSL VPN vulnerabilities -how to secure
SQLCommandBuilder - GetUpdateCommand, GetInsertCommand and GetDeleteCommand Questions
cross domain javascript
PHP MySQL SELECT OPTGROUP parent value