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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Form DataEnviroment.cursor1.Nodataonload?

Status
Not open for further replies.

SMCmtg

Programmer
Mar 27, 2000
90
US
This is request for a ideas on how?. . .to follow is my click code of print btn:

Report Form "reportwdata.frx" for recno()=currec noconsole to printer
contract1
go currec

The report form "reportwdata.frx" has a base table of contract1 with many fields on the report. (it works fine.)

What I am trying to do is print report(s) without data in the fields: Workarounds I can think of are: duplicate the report(s), remove any fields and leave only formatage and use as. . .Report form "withoutdata.frx" for recno()=currec noconsole to printer or in the "PRINT WHEN" m.nodata=.t. of each field.. .but I have many reports with many fields and looking for a "gobal".

In the dataenvironment.int()of the report I attempted:

=TABLEUPDATE(.T.)
CURSOR1.NODATAONLOAD=.T.

but it won't let me do that. . .
Any ideas on how I can work this or am I just going to have the muscle it the long way? Thx in advance for any feedback.



 
I know 2 good ways.
1. Make cursor with the same structure as main report table, but with empty fields in a single record. If report prints it ok - this is enough.
2. Make global variable (or field in report cursor) that will contain logical value (flag). If it is .T., report prints as usual. If it is .F., report prints as empty. Than, in the report, in the 'Print When...' condition specify that variable (field).



Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
I think Vlad's pretty much covered your options. This is by design in the VFP report system, and has been that way since dBase days; if you had a table or alias with 0 records and you ran a report to print, nothing would come out.

To expound on Vlad's option 1, simply:

[tt]select contract1
copy to c:\temp\temp
use in contract1
use c:\temp\temp alias contract1
append blank
report form reportwdata
use in contract1
erase c:\temp\temp.*
[/tt]

or some variation that fits your environment.

Robert Bradley

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top