Printing or previewing Report Form results in incorrect data (185628)
The information in this article applies to:
- Microsoft Visual FoxPro for Macintosh 3.0b
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 7.0
- Microsoft Visual FoxPro 8.0
- Microsoft Visual FoxPro for Windows 6.0
- Microsoft Visual FoxPro 9.0 Professional Edition
This article was previously published under Q185628 SYMPTOMS
When a REPORT FORM <report name> TO PRINTER command is issued and a grid
object has focus, incorrect data may be printed in the detail band of the
report.
CAUSE
When a REPORT FORM <report name> TO PRINTER or REPORT FORM <report name> TO PRINTER PREVIEW command is issued, and a grid object has focus, incorrect data may be printed in the detail band of the report.RESOLUTION
Here are three workarounds:
- Add a command button with print functions to the form containing the
grid.
-or-
- Create another form to accept the focus before printing. Here is a
code example:
oxprint=CREATEOBJECT('prtform')
oxprint.SHOW
DEFINE CLASS prtform AS FORM
TOP = 50
LEFT = 50
HEIGHT = 2
WIDTH = 2
DOCREATE = .T.
CAPTION = ""
NAME = "Form2"
PROCEDURE ACTIVATE
* Insert REPORT FORM and any associated commands here.
RELEASE THISFORM
ENDPROC
ENDDEFINE
-or-
- Create a user-defined function (UDF) that sets the workarea and
reference the UDF in the report. A code example is shown below:
PROCEDURE SETWORKAREA
IF USED('mytable')
SELECT mytable
ENDIF
retval=ALIAS()
RETURN retval
Modification Type: | Major | Last Reviewed: | 2/22/2005 |
---|
Keywords: | kbnofix kbprb KB185628 kbAudDeveloper |
---|
|