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
Combine cards in a stack possible?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Combine cards in a stack possible?
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
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?
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)....and simply printing that card
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Combine cards in a stack possible?
You may want to explore the IDE'S revPrintField command, as it builds print output from three separate stacks pretty much as you described.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn