Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple report formats
Message
 
To
24/11/1998 14:22:29
Nick Berryman
Computer Automation Technologies
Kennesaw, Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00161027
Message ID:
00161089
Views:
34
Nick,

Have one report with the fields for both formats in the detail band and put a condition in the fields Print When so under one condition certain fields print and under another condition the others print. You can do the same for necesary text, boxes, lines, etc.

>I'm sorry, we seem to have gotten off the subject of reports and into other subjects. I have already collected the data to be used by the reports into a single table. each record of the table has all the fields necessary to print both reports. My only problem is in coallating the report output so that I can alternate report number one and report number 2 without having to run all the way through report #1 and then print report #2. It seems that i can't call one report from another report to do this. The way I have done this in the past is to set up a loop and then call the 2 reports repeatedly, printing 1 record from the table each time I call the report this would alternate the reports and print the output of the 2 seperate reports together. I hope this makes it clearer for you. Thank you for the assistance.
>
>
>Nick Berryman
>
>
>>You have to collect data from parent and child record to the cursor applying certain condition to SQL:
>>Select Parent.Id, Parent.Field1 ..., Child.Field1... ;
>> From Parent,Child ;
>> Into Cursor tmpReport ;
>> Where Parent.Id=Child.Parentid ;
>> And *** first condition here *** ;
>> Union All Select Parent.Id, Parent.Field1 ..., Child.Field1... ;
>> From Parent,Child ;
>> Where Parent.Id=Child.Parentid ;
>> And *** second condition here *** ;
>>
>>Now tmpReport will contain exactly the data which should go to report form. You may also Order or Group this cursor by Parent.Id to get final output.
>>
>>>I am just using the report generator to make the print formatting easier, I am not actually grouping data or anything in this report. add the data for the parent and child report would be contained in the one record in the table.
>>>
>>>
>>>
>>>ie:
>>>
>>>there will only be one parent record and possibly one child record per record in the table.
>>>
>>>* print parent record
>>>* if a certain condition is true now print the child record that would go with this parent record after it.
>>>* if a certain other condition is true now print different child record (using a different report format).
>>>* now go to the next parent record and print it and do it all over again.
>>>
>>>
>>>
>>>Nick
>>>
>>>>It's still possible. What is exact format of your report should be. All parents on first page, and all childs on second, or something else? Give me example, please.
>>>>
>>>>>unfortunatly I need the 2 pages from the parent and child report printed together to avoid matching them up after they are printed. thanx for you input though.
>>>>>
>>>>>Nick
>>>>>
>>>>>
>>>>>>>I have a need for the capability of calling one report format from inside another report which is running. foxpro doesn't appear to allow this. alternatively, if i could have a multi-page report with the second page being optional this would work as well. does anyone have any ideas how either of these could be accomplished?
>>>>>>>
>>>>>>>Thank you
>>>>>>>Nick Berryman
>>>>>>
>>>>>>There are few ways to do this. One of them is to have separate report forms for each report, then REPORT FORM ... TO FILE ... when necessary, and concatenate these files. Then you COPY FILE ... TO LPT1:
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Reply
Map
View

Click here to load this message in the networking platform