Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Information in VFP report disappeared after preview 1

Status
Not open for further replies.

freddiekg

Programmer
Oct 13, 2009
25
0
0
MY
Dear all,

I have a simple grid (data from a cursor) in a VFP form. I allowed the user to click on the record in the grid and it will generate a report to preview that selected record. So it actually do another SELECT statement to create a new cursor before calling the REPORT statement. Pretty simple thing.

I can preview the report, BUT the information got 'disappear' when I print to the printer.

In the report form, I specifically put the cursor name with the field name, but still not working.

tmpRpt.customername

I know is something I did wrong but just cannot figure out why...

Thanks in advance.
Freddie





 
Hi Keith,

The following is the code. The report's data is from a cursor, and the user preview the report, then they can print the report by clicking the printer button in the preview screen. It is a very simple thing right?



SELECT * ;
FROM (epath)+"fmail!emailarc" ;
INTO CURSOR tmpRpt ;
WHERE entryID = tmpGrid1.entryID and !DELETED()

IF _TALLY > 0
SELECT tmpRpt
REPORT FORM emailarc PREVIEW
ENDIF

Thanks in advance.
Fred
 
Hi Keith,

The "REPORT FORM emailarc PREVIEW" command will create a report for user to PREVIEW. And while in the VFP preview screen, it also have a "print button" for the user to send the output to the printer, which is all basic VFP stuffs. However, my problem is when I click the preview screen to zoom, sometime, the information in the report got blank-out or the output is blank when I print the report. I cannot figure out why this is not working.

I never have this problem in all VFP prior versions until VFP9.0.

Thanks
Fred
 
The grid has a tendency to steal current alias. The solution is to move focus out of the grid before hitting print button.

 
Dear all,

The "REPORT FORM emailarc TO PRINTER" is working everytime.

But "REPORT FORM emailarc PREV" is NOT working everytime. The problem are as follow:

(1) Sometime, the preview report is good but once I click on the preview screen, the information (data) in the report is missing and only show the text (like the field headings and etc.) or

(2) Sometine, the preview report is blank to begin with, only show the field headings, lines.

The requirement for the apps is to let the user preview the report first and they can print it by clicking the "printer button" in the preview report screen.

Please help.
Thanks
Fred
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top