Page 1 of 1

Combine cards in a stack possible?

Posted: Sun Apr 20, 2014 12:37 am
by jalz
Hi all,

Just wondering whether the following question is possible. I have three cards in a stack
1) header
2) body
3) footer

The header contains a logo and some general text, whilst the footer contains company address, registration number etc.
Both the header and footer contain information i would like to store once but call up if necessary for a report. The body will change depending on the type of report.

Is there a way i can pull these layouts together to make a single printable report.

Thanks jalz

Re: Combine cards in a stack possible?

Posted: Sun Apr 20, 2014 5:22 am
by dunbarx
Jalz.

The content of any control on any card, and the controls themselves, are always accessible. Check out the following examples:

put field "yourField" of cd "header" into field "headerInfo" of cd "report" -- some text on the header card
copy image "yourImage" of cd "header" to cd "report" -- the logo
put field "address" of cd "footer" into field "addressInfo" of cd "report" -- some text on the footer card

The card "report" is where you might collect all this data and stuff.

The important lesson here is to know that both information and actual objects on any card in any stack can be moved or copied to any card of any other stack. It is simply a matter of identifying the sources and destinations. Experiment with this and you will soon see how easy it is. Read up on the "copy" command in the dictionary. Understand that the "put" command has all that power built into it.

Once you have collected all your data and other stuff, you can print in any number of ways. I would start by laying out the "report" card itself in the way you want it, and simply printing that card.

Craig Newman

Re: Combine cards in a stack possible?

Posted: Sun Apr 20, 2014 5:30 am
by Simon
...and simply printing that card
For testing yes, in the end you may want to use an invisible card so as not to frighten the user (card will be larger than the stack, I believe).

Simon

Re: Combine cards in a stack possible?

Posted: Sun Apr 20, 2014 8:13 am
by FourthWorld
You may want to explore the IDE'S revPrintField command, as it builds print output from three separate stacks pretty much as you described.