cursor to report 
Author Message
 cursor to report

From the link below
http://www.*-*-*.com/ ~MultiChildFoxProReports~VFP

Create the cursor to the report, I have the question that the cursor is
created in run time,
Then how can it be related with the fields in the table to the report and
create the report
fields to relate to the table field from the cursor. As you know that
you cannot add the cursor to the report data environment.

Moreover I want to know the code should place in where? In the report what
properties or in other where?



Wed, 04 Jan 2006 22:12:20 GMT  
 cursor to report
Hi Raymond,

I'm the one that initially wrote that article.

I do all my reports by using SQL to select exactly the data I want and in
the order I want it in into what's commonly known as a "report cursor." This
would include every field that I want to use in my report. There will be no
need for any relations with any other tables, and there will be nothing in
the report's data environment. When the report is run the report cursor is
the selected or current work area. The report cursor for a multi-child
report is a little more complicated than a "regular" report, but it's still
all data in one cursor.

I create all my report controls individually by drawing them on the report
form. I don't use drag-drop. In my controls I refer to the field as MyField
only - not MyCursor.MyField.

I do my reports this way because it's saved me hours of frustration from
trying to run reports from related tables.

--
Cindy Winegarden  MCSD, Microsoft Visual FoxPro MVP


Quote:
> From the link below
> http://fox.wikis.com/wc.dll?Wiki~MultiChildFoxProReports~VFP

> Create the cursor to the report, I have the question that the cursor is
> created in run time,
> Then how can it be related with the fields in the table to the report and
> create the report
> fields to relate to the table field from the cursor. As you know that
> you cannot add the cursor to the report data environment.

> Moreover I want to know the code should place in where? In the report what
> properties or in other where?



Thu, 05 Jan 2006 05:56:56 GMT  
 cursor to report
Dear cindy,

Where should the code be placed and the cursor name should place in where?



Quote:
> Hi Raymond,

> I'm the one that initially wrote that article.

> I do all my reports by using SQL to select exactly the data I want and in
> the order I want it in into what's commonly known as a "report cursor."
This
> would include every field that I want to use in my report. There will be
no
> need for any relations with any other tables, and there will be nothing in
> the report's data environment. When the report is run the report cursor is
> the selected or current work area. The report cursor for a multi-child
> report is a little more complicated than a "regular" report, but it's
still
> all data in one cursor.

> I create all my report controls individually by drawing them on the report
> form. I don't use drag-drop. In my controls I refer to the field as
MyField
> only - not MyCursor.MyField.

> I do my reports this way because it's saved me hours of frustration from
> trying to run reports from related tables.

> --
> Cindy Winegarden  MCSD, Microsoft Visual FoxPro MVP



> > From the link below
> > http://fox.wikis.com/wc.dll?Wiki~MultiChildFoxProReports~VFP

> > Create the cursor to the report, I have the question that the cursor is
> > created in run time,
> > Then how can it be related with the fields in the table to the report
and
> > create the report
> > fields to relate to the table field from the cursor. As you know that
> > you cannot add the cursor to the report data environment.

> > Moreover I want to know the code should place in where? In the report
what
> > properties or in other where?



Thu, 05 Jan 2006 18:01:30 GMT  
 cursor to report
Hi Raymond,

Assume you have a form with a button labeled "Print Report". In the Click()
of that button you would have code like:

*!* ThisForm.cmdPrintReport.Click()
SELECT SomeFields FROM SomeTables ;
    INTO CURSOR Temp
*!* Temp is current work area after the SELECT code.
REPORT FORM MyReport TO PRINTER PROMPT PREVIEW
USE IN Temp

--
Cindy Winegarden  MCSD, Microsoft Visual FoxPro MVP


Quote:
> Where should the code be placed and the cursor name should place in where?



Fri, 06 Jan 2006 02:39:03 GMT  
 cursor to report
I mostly do the same thing Cindy, but I tend to run the SQL statement from
the command window, and save the cursor to a dbf.  That way I can just let
the report wizard toss everything where I need, and all I have to do is move
the controls around and do some minor edits.  After I'm totally done with
the report format, I can then delete the temp dbf I used to create the
report, and just use the report from the cursor generated in the programs.
I've just found that sometimes it's nice to have a static, unchanging data
source to build reports on, instead of going against live data during the
development process.

Bryan


Quote:
> Hi Raymond,

> I'm the one that initially wrote that article.

> I do all my reports by using SQL to select exactly the data I want and in
> the order I want it in into what's commonly known as a "report cursor."
This
> would include every field that I want to use in my report. There will be
no
> need for any relations with any other tables, and there will be nothing in
> the report's data environment. When the report is run the report cursor is
> the selected or current work area. The report cursor for a multi-child
> report is a little more complicated than a "regular" report, but it's
still
> all data in one cursor.

> I create all my report controls individually by drawing them on the report
> form. I don't use drag-drop. In my controls I refer to the field as
MyField
> only - not MyCursor.MyField.

> I do my reports this way because it's saved me hours of frustration from
> trying to run reports from related tables.

> --
> Cindy Winegarden  MCSD, Microsoft Visual FoxPro MVP



> > From the link below
> > http://fox.wikis.com/wc.dll?Wiki~MultiChildFoxProReports~VFP

> > Create the cursor to the report, I have the question that the cursor is
> > created in run time,
> > Then how can it be related with the fields in the table to the report
and
> > create the report
> > fields to relate to the table field from the cursor. As you know that
> > you cannot add the cursor to the report data environment.

> > Moreover I want to know the code should place in where? In the report
what
> > properties or in other where?



Mon, 09 Jan 2006 03:38:57 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. CURSOR in REPORT

2. Need Help! Cursors and Reports

3. VFP, Reports, Data Environment and Cursors - Help!

4. Cursor->Array->Report?

5. Print Report after SELECT into CURSOR

6. Transparent images on report from a table/cursor

7. Report from cursor, created with CROSSTAB VIEW ?

8. VFP7 reports from a cursor

9. creating a report from a cursor

10. Reporting from a cursor

11. How to SQL CURSOR link to REPORT FROM

12. Making a report from a query, view or cursor

 

 
Powered by phpBB® Forum Software