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

Comment box in report designer

Status
Not open for further replies.

shangrilla

Programmer
Nov 21, 2001
360
US
Whats the purpose of the comment area which appears at the bottom when you insert a field/text box in a report.
 
Shangrilla

Two purposes that I can see.
1. Strickly used for development purposes (Notes to other programmers etc..) Or a short description of the fields.

2. (I use this method)If you design reports by code or modify reports in a compiled environment, you can store the "default" size and default font, that way you can retore the default values of the textfields in your report.
 
mgagnon:

Have you ever used a program called genrepoX. This is to simulate multiple detail bands in Visual Foxpro 6.0 reports.

I have one report that uses this and in the comment box it says: *.DETAIL table1 for table1.field1 == var1

I am trying to figure out how to make use of this.
 
No I have never used GenRepoX. Since there are ways to create multiple detail bands in VFP.
I believe that GenRePox makes use of the comments box in a text field. It's one of the parameters that you can use to call a report:
=GENREPOX(Command, DoRun, CommentSnippet)


 
"Since there are ways to create multiple detail bands in VFP"

Do you knwo of any other ways to create multiple detail bands.

 
This was posted on the Wiki:

How to do a Multi-child FoxPro report:


*!* Create a cursor with fields from the parent and each of the children
*!* Include a Field called RecordType
CREATE CURSOR ReportCursor (....)

*!* SCAN through the parent table
SCAN && FOR some criteria

*!* Get a clean set of all variables
SELECT ReportCursor
SCATTER MEMVAR MEMO BLANK

*!* Make the parent variables available for each row
*!* m.PrimaryKey is the parent table's PK
SELECT ParentTable
SCATTER MEMVAR MEMO

*!* Get matching records from Child!
SELECT Child1
m.RecordType = "Child1"
SCAN FOR Child1.ForeignKey = m.PrimaryKey
SCATTER MEMVAR MEMO
SELECT ReportCursor
INSERT INTO ReportCursor FROM MEMVAR
ENDSCAN

*!* Just in case,
*!* Clean out Child1 memvars
SELECT Child1
SCATTER MEMVAR MEMO BLANK
*!* Rescatter Parent memvars
SELECT Parent
SCATTER MEMVAR MEMO

*!* Get matching records from Child2
SELECT Child2
m.RecordType = "Child2"
SCAN FOR Child2.ForeignKey = m.PrimaryKey
SCATTER MEMVAR MEMO
SELECT ReportCursor
INSERT INTO ReportCursor FROM MEMVAR
ENDSCAN

ENDSCAN && Get next Parent record



In the report, put the parent variables in the group header or page header.

Group on PrimaryKey and again on RecordType?.

Put column headers in the group header with "Print when" set to look at the record type. They will probably be on top of each other!

In the detail line you need all of the fields for each record type, again with "Print when" related to the RecordType?. Again, they will probably be on top of each other!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top