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 without an underlying cursor

Status
Not open for further replies.

AndrewMozley

Programmer
Oct 15, 2005
621
GB
A form is required to calculate several totals from various tables and then to produce a report of these totals, with a suitable page header.

I am accustomed to producing a report from a cursor, with a detail band, and various group totals.

Is it possible to define and produce a report where there is no underlying cursor, and so, no detail band in the report?

Thanks. Andrew
 
No. Why don't you put the totals into a cursor with a single record?

Bye, Olaf.

PS: If you don't want that create a cursor with any empoty record used as report driving cursor and print the variables. Anyway a report with no table is impossible and with an empty (0 records) cursor will just flash it's preview and close. So you need a record and what is easier than putting the totals into it?
 
Olaf is right, create a cursor with one blank record in it. Report on that.

You could always create a cursor which holds your totals etc. as he says.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are not good for you.
 
You can create dummy cursor with one field and one record
and use variables in report :)


Borislav Borissov
VFP9 SP2, SQL Server
 
Thank you all for your replies.

I shall create a dummy cursor with one record (so that the report runs and does not just flash).

I am inclined then to put the values directly into the page header (or footer) from the memory variables - I believe this is Borislav's approach; but I take your point that I could define fields in the dummy cursor, populate them from the memory variables and then define the report in the detail band.

Andrew
 
You can have report fields in any place, that are either variable, field or generally expression driven. Indeed only the detail band scans through the data, but with only one record that record data also is available in header/footer or any section, in the same manner as you can access the current record in code, too, whtout putting a scan loop on it.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top