Print a report?
Posted: Sun Aug 17, 2014 11:19 pm
I have a stack that I'm using like a database. Each card contains one record's worth of information (16 fields). The user will add more cards or delete cards as necessary so I don't know a specific number of cards (but I know there wouldn't be more than a hundred or so). Periodically, the user will want to print a report that would essentially be a "datasheet" or "spreadsheet" view of all records with a header at the top of the page displaying all the field labels. I have a rough idea of the number of characters that will be in each field (and I can, if necessary, enforce this with scripts).
What do you think the easiest solution to this problem? I was thinking I might create a sub-stack with one card of about 8.5"x11" and one field on that card; then, when the user clicked the "Print Report" button, I'd have a handler that would travel through all the cards of the stack and add the contents of the fields into a variable (with a "return" at the end of the last field in each card). Finally, I'd open the sub-stack, put the contents of the variable into the field, and print the card. Of course, formatting the text in the field so everything lines up is the trick.
Suggestions are always welcomed.
Thanks,
Barry
What do you think the easiest solution to this problem? I was thinking I might create a sub-stack with one card of about 8.5"x11" and one field on that card; then, when the user clicked the "Print Report" button, I'd have a handler that would travel through all the cards of the stack and add the contents of the fields into a variable (with a "return" at the end of the last field in each card). Finally, I'd open the sub-stack, put the contents of the variable into the field, and print the card. Of course, formatting the text in the field so everything lines up is the trick.
Suggestions are always welcomed.
Thanks,
Barry