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

Grid to Report

Status
Not open for further replies.

Salmano

Programmer
Oct 4, 2001
34
RO
Hello !
In Vfp50, I have a grid control populated by a sql statement (cursor) changed by users' various selections; there could by 1 up to 19 fields in the cursor, at user decision. The problem is that I want to programmatically generate a simple form (that look as a browse for example) from the data in cursor.
Is it possible ? how ?
Thanks in advance.
Salmano.
 
As long as the cursor is in the curretly selected work area you can create a report which calls the fields from the cursor. When you create the report just add the fields that you want. Before you "report form..." make sure you "select cursorname" and the report will know to use the right fields.

If you are testing and previewing the report in design mode, just make sure that you have a version of the cursor open and selected at the time. Derren
[Mediocre talent - spread really thin]
 
Thanks Derren !
I did ~ as you said... I get no error but the report does not appear; the code looks like this:
select &campuri from &tabele where &conditie order by &ordonare into cursor cursorul
select cursorul
report form rpt_total preview

and in the report created I put the name of first 2 fields... I can see that it extracts data, but the report does not appear; shouldn't it appear in a distinct window ?
Do you now why ?
Salmano.
 
Hi

If you have the report open in design mode, and your cursor cursorul is open and selected, can you preview the report? If you can then it is very likely that the cursor contains no records at run time. If so, check the code to get the data. Derren
[Mediocre talent - spread really thin]
 
Thanks Darren !
I tried on another computer and it works as I said... I'll try to find out why doesn't work on my own.
Thanks again.
Salmano.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top