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

Report suddenly needs a table to run?

Status
Not open for further replies.

greywalk

Programmer
Apr 12, 2002
23
US
I have created a form which prints a logo and a set of varibles.

On Friday it ran fine without a table open. Today it is suddenly requiring a table to run at all.

I have opened the data Environment and there is nothing in it.

I have opened the report as a table and browsed through the expr field looking for a reference to a table or something. Nothing.

Ideas on how to debug this sad situation? Dancing is easy. Now dancing on a floating raft in the middle of an October storm in the middle of the North Atlantic, that is hard.
 
Reports always require a table to run. You must have had some table or cursor or whatever open at that time that you have forgotten about or were unaware of. Even if it's some bogus table with one record and nothing from the table is printing, the report expects to report data a record at a time.

Dave S.
 
Just create a single field cursor with one record in it.
select it before running your report.
 
HI
In the Init Event of the Reports Dataenvironment.. add the code..

SELECT * FROM SYS(2005) INTO CURSOR TEMP WHERE .f.

This will solve your issue and the cursor will get closed automatically when the report is over.

:)

ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Thanks everyone. With the lead from DSummZZZ and mgagnon I created a cursor stuck a bogus record in it like so...

SELECT 0
CREATE CURSOR crsReport (bogus C (15))
INSERT INTO crsReport (bogus) VALUES('')

Ran the report and it ran just fine.

I tried ramani's solution because it was more elegant (less code) however the it gave me the same blank sheet of paper.

Removed the 'where .f.' and it worked beautifully.



Dancing is easy. Now dancing on a floating raft in the middle of an October storm in the middle of the North Atlantic, that is hard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top