How to populate a global crystal variable while reading records
Posted on 2009-02-20
I have a crystal report where I want to create some variables that are global to the report and then populate them while reading records. I did this once about 5 years ago and I completey forget how to do it...also where do I place the formula that sets the variables and how do I access them later?
I should clarify a bit though,
I have a table that holds true false values for conditional formatting of the report. The report itself is returning customer information in a single row, but then linked to a table that has multiple rows that link via a Document ID. The SQL query returns as many rows as there is conditional formatting items in the application. This results in let's say 20 rows of the same customer information + the conditional formats id number and wether it is on or off.
ADDRESS, USER, AMT, CITY, ZIP, JOB, DOCUMENTID, ITEMID, ON/OFF
55 Water Street ,Administrator ,10510.88 , New York,NY,10048,21,92 ,89 ,0
55 Water Street ,Administrator ,10510.88 , New York,NY,10048,21,92 ,90 ,1
I wanted to create a variable for each ITEMID, and set it to true or false so that later in the report if there are boxes that need an X or if I need to show or hide certains sections I could use a supress formula and look at that global variable....