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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

display msg in report header

Status
Not open for further replies.

ridhirao22

Programmer
Aug 27, 2010
140
US
Using CR2008 and Oracle 11g

We have lot of reports which compares data from current year vs. last year. We also follow a custom calendar (fiscal calendar) where every 4 year or so the fiscal calendar has 53 week instead of 52 week.



I am trying to show a message in the report header section to display “this year vs. last year data compare is shifted to 53 –week” when applies.

I have 2 columns in the table last year calday and calday_shifted. So how can I display the meassage above when the 2 columns are different and don't display when they are same.


I tried this formula but doesn't work when the report run for different date ranges ( specfic range or year)

@msg // place in report header section and suppress login maximum(ly_calday) = maximum(calday_shifted)

If maximum(ly_calday) <> maximum(calday_shifted) then

'this year vs. last year data compare is shifted to 53 –week'


Can anyone please help?

TIA,
RR
 
The maximum function is used with arrays. Create two totals and then use them in the formula. Just click on one of the fields and press the right mouse key. Pick Insert and then pick maximum. Make it a grand total. Do the same with the second field. Then use the two in your formula.

Include else "" at the end just to make it neater.

Howard Hammerman,
Crystal Training and Crystal Material
On-site classes and one-on-one coaching
Low-cost telephone/email support
 
Thank you fo rthe reply; but how do I get total on date field?
 
When you create your formula you will find the totals in the "report fields" section of the field list. Typically this is the left-most list. Just double-click to bring it into your expression.

Howard Hammerman,
Crystal Training and Crystal Material
On-site classes and one-on-one coaching
Low-cost telephone/email support
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top