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!

Help needed with variable formula display

Status
Not open for further replies.

staceyn

Technical User
Nov 19, 2004
107
0
0
US
Hello,
I am using Crystal 11 with an informix 10 database.
I have a main report that is grouped by store region, store district then by store number and a sub report that is also grouped by store number. The main and subeport are linked by store number.
I have successfully created the shared variables from the subreport to display on the main report. The subreport is located in my gf3a (store number group)and my variable formula is displaying in gf3b.

My main report is pulling current sales data by store. My subreport is pulling sales data by store for the same day last year.
Here is my issue. Some stores were not open on the same date last year. So in my report output, the values are being repeated for these stores.
Here is an example, stores 003,004 and 010 are accurate, however there were no last year sales values for stores 005 and 008, so they should be showing zero under the sales ly column, instead they are repeating the previous store value:
Store sales today sales ly difference
003 2453.99 1373.00 1080.99
004 1624.51 249.00 1375.51
005 3716.99 249.00 3467.99
008 3551.96 249.00 3302.96
010 1432.47 509.28 923.19

How can I go about displaying zeros for stores 005, 008 in this example instead of it showing the previous store value?

Thanks in advance for any help!

Stacey
 
In the group header of the store place a formula that resets the shared variable to '0'.

Just my opinion, but wouldn't a comparison of the monday of the 34th week this year compared to the monday of the 34th week last year be a better comparison? Not trying to complicate the report.

This still would have 0 days not matching up though.

--

I'm not talking to myself, I'm just the only one who's listening.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top