Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I print 2 detail bands one after one
Message
From
29/01/2010 15:45:48
 
 
To
28/01/2010 16:09:13
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01446416
Message ID:
01446564
Views:
64
>HI All
>I want to print a report that displays all the patients for a doctor with the code of each patient's disease.
>After this part I want to print a cumulative of each code of disease for patients of this doctor.
>
>I have a table that contains all patients of the doctor and another that contains the cumulative codes, these two tables are linked by a relation with the medical code.
>
>it look like this
>
>
>First table Alias
>
>Nom Med Code1 Code 2 Code 3
>Mr xxxxx 123 8800 8802 8803
>Mr. YYY 123 8800
>Mr. AAA 123 8802 8804
>
>
>Second Table
>
>Med Code Qty
>123 8800 2
>123 8802 2
>123 8803 1
>
>
>How can i print the first table informatyion and after that the second one
>I have Try to put the fields of the second table in the 2 second detail band and i have write the name of the second table in the taget Alias expression but the best i have got is something like this.
>
>
>Mr xxxxx 123 8800 8802 8803
>123 8800 2
>123 8802 2
>123 8803 1
>
>Mr. YYY 123 8800
>123 8800 2
>123 8802 2
>123 8803 1
>
>Mr. AAA 123 8802 8804
>123 8800 2
>123 8802 2
>123 8803 1
>


Hi Benoit

Have look at www.report-sculptor.com.
(Free!)

RS supports writing reports using foxpro native form objects.
So you design your report bands as (white) form containers, place your textboxes and labels on each container band as you want it to be
and then finally drive report directly from code using ordinary scan/endscan loops or any other looping method you wish.
In this case you do not use FRX at all but ordinary foxpro forms instead.


Simple code sketch looks something like;
local oRS
oRS=GetRsObject(thisform)

with oRS
.
.

select myTable1

.FlashContainer(thisform.Header1) &&Container designed to be detail1 header
scan
  .FlashContainer(thisform.Detail1)  &&Container designed to be detail1
endscan
.FlashContainer(thisform.Footer1) &&Container designed to be detail1 Footer

select myTable2

.FlashContainer(thisform.Header2) && ...
scan
 .FlashContainer(thisform.Detail2)
endscan
.FlashContainer(thisform.Footer2)

&&etc

.
.
endwith


oRS.Output(1,.t.)  
This offer much more flexibility in building free multi-band reports then native VFP frx. You can report multiple related (or unrelated) tables in any way you want wihout resorting to complex data preprocessing necessary to satisfy FRX execution pattern

Tip: Use format/inputmask properties of textboxes to properly format numbers output.
Also see RS Demo project for samples.


RS is completely free.

HTH
Sergio
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform