For Programmers: Free Programming Magazines  


Home > Archive > Clarion > April 2007 > 1 header 1 footer









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author 1 header 1 footer
chris miller

2007-04-25, 9:55 pm

i realize this has been hashed on in past, but i need to print a
header only once and a footer only once (how original). unfortunately
i don't see any more recent posts (c6) that shed any light. i realize
there are some templates that might perform this. in my mind, one
should be able to click on properties of the header, and click 'Print
only on first page' and one should be able to do same with footer. any
help would be appreciated

pblais@odstrategies.org

2007-04-25, 9:55 pm

By definition a header and footer always print on the page. At least
as far as the Clarion print engine is concerned. The best way is to
make no header or footer and just print the your header first and
print the footer last yourself by making them detail bands and
manually doing it . There are a lot of ways to do that but the concept
of always printing a header and footer are pretty universal. It's why
they call them that. Your problem is you don't want a footer or a
header.

It's possible to compute your own page breaks too if need be.

On 25 Apr 2007 17:21:13 -0700, Chris miller <pharmaki@gmail.com>
wrote:

>i realize this has been hashed on in past, but i need to print a
>header only once and a footer only once (how original).

---------------------------------------
Paul Blais - Hayes, Virginia
chris miller

2007-04-26, 6:55 pm

On Apr 25, 9:58 pm, pbl...@odstrategies.org wrote:
> By definition a header and footer always print on the page. At least
> as far as the Clarion print engine is concerned. The best way is to
> make no header or footer and just print the your header first and
> print the footer last yourself by making them detail bands and
> manually doing it . There are a lot of ways to do that but the concept
> of always printing a header and footer are pretty universal. It's why
> they call them that. Your problem is you don't want a footer or a
> header.
>
> It's possible to compute your own page breaks too if need be.
>
> On 25 Apr 2007 17:21:13 -0700, Chris miller <pharm...@gmail.com>
> wrote:
>
>
> ---------------------------------------
> Paul Blais - Hayes, Virginia


thanks for insight. i have actually gathered that i have to place this
info in detail bands. the big however is that i still have been
unsuccessful in using some of the code examples from previous user
group...presumably because it is pre-c6. any guidance with regard to
the nitty gritty would be greatly appreciated.

pblais@odstrategies.org

2007-04-26, 9:55 pm

Open the source and find the PRINT() commands. Use an OMIT() and
basically eliminate them. Write your own code. Just be sure all the
values of the fields in the band are in scope before you manually
execute the PRINT(?TheBand) command. In between use anything you know
to handle the details. Of course you can delete the header and foot
bands so they don't print or make them print on their own as you may
desire. It's can be handy for page numbers.

The header is easy:

IF NOT HeaderAlreadyPrinted
PRINT(?MyHeader)
HeaderAlreadyPrinted = TRUE
END

This is the first code to print the header before any details now it
won't be printed again - ever. It's nice if you are sure you have the
first record else you'll get a header with no records. Now figure out
when the last record is printed and you can manually print the footer
as the very last band.

It's not hard to manually make all your own bands. It's just basic
Clarion logic. The VIEW engine is just going to give you one record at
a time and you can do what you will. You can eliminate even the VIEW
if you pass the data into the report as a queue. At that point you do
the whole job in code. At times it can be worthwhile. I've done 10
reports in one report procedure doing it that way. It meant I recycled
a lot of bands.

This is a fun place to cut your teeth in Clarion hand code. Until I
got into this I always hated reports more than everything else. They
can be so tedious and the customers never can say what they want but
always know what they don't like and it looks just like what you gave
them. Once you get more comfortable you can make anything you need and
reports are very easy. It is what the customers see and makes them
look good!.

On 26 Apr 2007 05:20:15 -0700, chris miller <pharmaki@gmail.com>
wrote:

>any guidance with regard to
>the nitty gritty would be greatly appreciated.

---------------------------------------
Paul Blais - Hayes, Virginia
Davor

2007-04-27, 7:55 am

Hi,

you can do it with Break manager;
- draw your header and footer as detail bands
- set them not to print (in Report properties, tab Filters, add "False" as a
filter expression)
- add a break (Report properties, tab Breaks), add a field that does _not_
change it's value during report, check header and/or footer to print, and
select your details.

HTH,
Davor

> i realize this has been hashed on in past, but i need to print a
> header only once and a footer only once (how original). unfortunately
> i don't see any more recent posts (c6) that shed any light. i realize
> there are some templates that might perform this. in my mind, one
> should be able to click on properties of the header, and click 'Print
> only on first page' and one should be able to do same with footer. any
> help would be appreciated

chris miller

2007-04-27, 9:55 pm

On Apr 26, 10:46 pm, pbl...@odstrategies.org wrote:
> Open the source and find the PRINT() commands. Use an OMIT() and
> basically eliminate them. Write your own code. Just be sure all the
> values of the fields in the band are in scope before you manually
> execute the PRINT(?TheBand) command. In between use anything you know
> to handle the details. Of course you can delete the header and foot
> bands so they don't print or make them print on their own as you may
> desire. It's can be handy for page numbers.
>
> The header is easy:
>
> IF NOT HeaderAlreadyPrinted
> PRINT(?MyHeader)
> HeaderAlreadyPrinted = TRUE
> END
>
> This is the first code to print the header before any details now it
> won't be printed again - ever. It's nice if you are sure you have the
> first record else you'll get a header with no records. Now figure out
> when the last record is printed and you can manually print the footer
> as the very last band.
>
> It's not hard to manually make all your own bands. It's just basic
> Clarion logic. The VIEW engine is just going to give you one record at
> a time and you can do what you will. You can eliminate even the VIEW
> if you pass the data into the report as a queue. At that point you do
> the whole job in code. At times it can be worthwhile. I've done 10
> reports in one report procedure doing it that way. It meant I recycled
> a lot of bands.
>
> This is a fun place to cut your teeth in Clarion hand code. Until I
> got into this I always hated reports more than everything else. They
> can be so tedious and the customers never can say what they want but
> always know what they don't like and it looks just like what you gave
> them. Once you get more comfortable you can make anything you need and
> reports are very easy. It is what the customers see and makes them
> look good!.
>
> On 26 Apr 2007 05:20:15 -0700, chris miller <pharm...@gmail.com>
> wrote:
>
>
> ---------------------------------------
> Paul Blais - Hayes, Virginia


i actually got it to work successfully. i have never had to omit code
and just wasn't handling the syntax correctly. you are right, reports
are a pain. i actually have a day job that is not related to
programing (clinical pharmacologist). this is the excuse i give for
not knowing how to handle mundane issues. most of the development is
spawned out of necessity but i attempt to stay in the box. of course,
this is where clarion is so robust that on most projects, i can get
90% done without having to even touch code. if there was a template to
use a template, i would use it. thanks again!!

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com