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

Problem in using cross tabs

Status
Not open for further replies.

XtraOrdinary

Programmer
Nov 20, 2006
3
PK
I have a big problem while using crstal report , First I want to explaion my problem
City
Branch
Product
Complaint Type Complaint Statuses

For every city their are some branches , which have some products .Each product have differnet comlaint types and Each comlaint have 8 statuses.I HAVE TO SHOW COUNT OF THESE STATUSES.

Now i have place a records selection criteria , but the thing which is going wrong is it shows correct records when I enter one city one branch and so on... but if I add more than one cities It give me the same counts for each city
Second ,, I want to show a count of ZERO even if some record misses that condition..Pls reply
 
Are you using more than one table? If so, how are they joined? You won't be able to get zeros if there are no records unless the row/column you are summarizing comes from a table that contains all values regardless of whether it has a corresponding record used for the summary that comes from a table which is left joined to it.

To understand the issue, we need to know what you are using for your row, column, and summary fields in the crosstab. I'm wondering whether you might be using a formula for the summary field and using count as the summary. A count on a formula will only tell you how many times the formula executes, so if this is what you are doing, you should show us the content of your formula, so we can help you adapt it.

-LB
 
Tables
**********************************
Complaints
Complaints Type
Complaint Statuses
Branches
Cities
Product
Product_Complaint_Types

Selection Criteria
**********************************

{City.City_Id} = {?City} AND

{ODS_Branch.Branch_id}={?Branches} AND
{ODS_Branch.Branch_City_Id}= {City.City_Id} AND



//Product
{Product.Product_Code}= {?Product} AND
{Complaint.Complaint_Product_Code}={Product.Product_Code} AND
{Product_Complaint_Types.Product_Complaint_Types_Product_Code}={Complaint.Complaint_Product_Code} AND

//Complanit Status
{Complaint.Complaint_Status_Id}={?Status} AND
{Complaint_Status.Complaint_Status_Id}={Complaint.Complaint_Status_Id} AND


// Complanit Type
{Complaint.Complaint_Type_Id}={?Complaint_Types} AND
{Complaint_Type.Complaint_Type_Id}={Complaint.Complaint_Type_Id} AND
{Product_Complaint_Types.Product_Complaint_Types_Complaint_Type_Id}={Complaint_Type.Complaint_Type_Id} AND

//Date
{Complaint.Complaint_Date} >= DateValue ({?Date1}) AND
{Complaint.Complaint_Date} <= DateValue ({?Date2}) AND

{Complaint.Complaint_Call_Officer_Code}={?UserList}


UserList
**********************************
Select from Tables Users WHERE City Id=x AND Branch Id=y


Rows Colums Summary

City Complaint Statuses Complaints Count
Branches
Products
Complaints Types

I want to show zeores rather than making cross tabs emitting it from the output ,, Moreover I am getting redundant records for the same City Branches

Like

City1
Branch1 Records A (<--This is right)
Branch2 Records A (<--This should be zero)

Thanks in ADVANCE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top