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

Crosstab Static Message 2

Status
Not open for further replies.

RJL1

Technical User
Oct 3, 2002
228
US
Hi,

I have a crosstab that displays the total orders received per day. I need to add a message (static) on the days that the orders received exceed certain number (14)

This is how the cross tab looks
Code:
DATE         ORDERS
2/1/2009       12   
2/2/2009       28 
2/3/2009       15

This is how the crosstab should look with the message

Code:
DATE         ORDERS  MESSAGE
2/1/2009       12    
2/2/2009       28    "MORE THAN 14 ORDERS RECEIVED"
2/3/2009       15

Thanks in advance
RJL1
 
Hi RJL1,

This is very possible however it is complicated. The technique I'm outlining below is documented by lbass and ken hamady and its quite ingenious.

STEPS
Create a formula called PlaceHolder (or something) and type a 0.
Add this as a summary field (SUM is fine)
Choose to display your summaries horizontally not vertically so it goes side by side
Next we need to capture each Count of Orders into a variable
Format the CrossTab Orders summary field and choose the Display option. Click the formula button (blue button)
Numbervar X:= Currentfieldvalue;
Totext(currentfieldvalue,0)
Next we take this catpured value and use it for our message
Format the CrossTab PlacehOlder Summary and choose Display option. Add the following formula
Numbervar X;
If x>14 then "More than 14 orders received" else ""

There may be a quicker way if you are using version 2008 as they have improved Crosstabs

Gordon
Crystalize
 
I think you could just add your summary a second time. Then in the customize style tab, check "horizontal" for the summaries. Then change the summary label to "Message". Next select the Message summary->right click->format field->display string->x+2 and enter:

if currentfieldvalue > 14 then
"More than 14 Orders Received" else
""

-LB
 
lbass's suggestion makes more sense
use the same field twice for summaries it simplifies the process considerably

Gordon BOCP
Crystalize
 
Thanks to both for the quick responce I ended up using lbass solution. Nice piece of knowledge to go into my arsenal for later use.

Thanks
RJL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top