Q: I have a database that prints out cards for a quiz game. On one side of the card is a question, and on the back of the card is one of three symbols, depending on the question type. My layout prints 10 cards per page. I've had difficulty getting the card backs to sort so they make a set of backs that prints on the back of my questions. Also, because different questions require different symbols, I need to have the symbols flipped to the other side of the page. For example, if the top left question is a type A question, and the top right question is a type B question, the other side of the page has to have B on the left and A on the right. Getting this last part to work has been especially difficult. Can you help?
A: Wow. First off, we just want to say for the record that what you're asking is the hard way to do your printing. The easy way is to make a separate table for each question type, or even just print found sets of each question type so you don't have to worry about matching the card backs to the question.
However, if you have time to burn and are up for a challenge, this task is surprisingly rigorous. Given a database of 30 questions numbered 1 through 30, you must have 30 identically numbered blank questions for a total of 60 records. You'll use this second set to print your card backs. You have a relationship set up so a card back record relates to its identically numbered question record and can determine which type of question it is. For the purposes of this discussion, we'll say questions can be of type A, B, or C and the back conditionally displays a symbol for A, B, or C.
Here we've come to the first challenge. You're using a single layout to print questions and card backs. One side of the page must print the question number, the question text itself, four possible answers, and a graphic that illustrates the question. The other side of the page must be entirely blank except for the question type symbol. You have to pile all these elements on top of each other on the card layout, and store the labels for answer choices 1, 2, 3, or 4 in a global field and conditionally display them in a calculation field that hides the choice labels if the question is blank.
You can do it fairly simply with:
z_LabelDisplay = Case ( not IsEmpty (Question) ; z_Labels )
This calculation returns a container result, because the labels are stored in the container field z_Labels (which uses global storage so it's available to all records).