Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I Initialize time and date date variables?

Status
Not open for further replies.

5timesnc

Programmer
Feb 21, 2002
8
0
0
US
Hello,
In Crystal Reports, I have a main report with multiple sub reports that is essentialy printing the same information. I have created shared variables (PrtFromTime, PrtToTime, PrtFromDate, PrtToDate) within formulas to print both dates and times on the reports. The same variables are in all reports. In some cases I need the date or time to print, and others I do not. I have those selection criteria in the formulas. However once a valid condition is met, and the variable is populated and printed on the report, because it is a shared variable the value is perpetuated in the remaining reports. I need to create a formula to initialize these values in the report header of each report so that the fields are initialized and nothing is printed on the remaining reports. Can anyone please provide an example of how to do this? THANKS!
 
create another shared variable (I would use a boolean) that is false until the first time your criteria is met to print your shared variables. In that same check set it to true. Then you can conditionally suppress the remaining fields with the now true boolean.

Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top