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

formula for cross tab

Status
Not open for further replies.

vj135

Technical User
Sep 17, 2007
36
US
hi,

Scenario;

I have a database full of warranty info for furniture in a company.

How do i create a formula where it shows all(COUNT)for the furniture that the warranty info does NOT exist.
Secondly, all the warranty info for the furniture that has expired and that will expire within the next 30 days.

Using crystal 10, I was able to do {furniture.warranty_end} in AllDatesToToday. but then it gives a true/flase headers.
Is there a better way to do the forumula.

I want to be able to use this formula for:
I want to create 2 things in Report header.

Report Header A:

Cross tab with 2 columns , column one for already expired warranty, warranty that expires within 30 days, 60 days etc. and on column two , total count

Ditto for pie chart -- what is the best way to do this. Usually pie chart expert would say on change of field "some field" show count "some value" -- but in my case what field should i use for 'change of field'?

Thanks
jack
PS: is it possible to hire someone as a mentor?
 
I don't think you want to use alldatestotoday, since you want to look at warranties coming up in the future. You might want to remove the selection criteria altogether. Try a formula like this for your column field:

if isnull({furniture.warrentyend}) then
"No Warranty" else
if {furniture.warrentyend} <= currentdate then
"Expired" else
if {furniture.warrentyend} < currentdate+30 then
"Expires in 30 Days" else
if {furniture.warrentyend} < currentdate+60 then
"Expires in 60 Days" else
"Expires Later" //or something

Then add a furniture ID as your summary field, and use a count or distinctcount, depending upon your data setup.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top