Subject Re: MULTIPLE STREAMFRAME IN PAGETEMPLATE
From Mervyn Bick <invalid@invalid.invalid>
Date Sat, 24 Jun 2017 12:01:10 +0200
Newsgroups dbase.getting-started

On 2017-06-24 11:02 AM, Mustansir Ghor wrote:
> Dear All
>
> I need to print 3 copies of a receipt in a A4 paper.  I make my page template to size of A4. Then I create 3 streamframes on this page template and put in detail band of first streamframe the data from streamsource. But then How can I put the same data on other 2 streamframes.
>
> Can Anybody help me on this.
>
> Best regards
> Mustansir
>

The dBASE report engine is designed to print one record at a time.  When
a streamframe is filled dBASE moves on to a new streamframe for the next
record.(This is what happens with the labels.)


You have created your streamframes.  If you place fields from one record
in the first streamframe dBASE will place the same fields in each of the
other streamframes.

Running the report will print a single copy of each of the first three
records on the first page.  This is not what you want so we need a way
of adding an extra two copies of each record.  The solution is a SQL
UNION JOIN.

Edit the sql property of the report's query to look like

sql = 'select * from filename union all select * from filename union all
select * from filename order by receipt_no'

The designer normally streams out ....from "filename.dbf"...   Neither
the quote marks nor the .dbf are really needed as dBASE will accept
either the filename i.e filename.dbf or the tablename i.e filename in
teh select command.  The quote marks are only needed if there are spaces
in the name.

Mervyn.