Solved

Select Cross-tab total

Posted on 2016-08-08
2
61 Views
Last Modified: 2016-08-08
Hi Experts

I have a cross-tab table that has the weekending dates as rows and the day of the week as columns.  The 7 days of the week are then totaled.  What I need to do is to be able to select ONLY those that have a summary total of 0.  I can't get this to work at all.  It seems like it should be very simple.  When I go to select the summary column and have it show only those equal to zero, it turns everything to zero's and I get a page of nothing but zero's.  

Any help would be greatly appreciated.

Attached is an image of my cross-tab as well as my Crystal Report.  You can see it is very simple.  Below is the SQL query.  

**I was asked my the moderator to restate the question and re-post.  

Andy  

 SELECT "TIME_DIM"."WEEK_END_DT", "TIME_DIM"."DD_NAME", "NYP_ROUTE_DIM"."ROUTE_CD", "NYP_DRAW_FACT"."TOT_RET", "NYP_HIERARCHY_DIM"."REGION_NAME"
 FROM   (("NYP_RPT"."NYP_DRAW_FACT" "NYP_DRAW_FACT" INNER JOIN "NYP_RPT"."NYP_ROUTE_DIM" "NYP_ROUTE_DIM" ON "NYP_DRAW_FACT"."ROUTE_ID"="NYP_ROUTE_DIM"."ROUTE_ID") INNER JOIN "REPORT"."TIME_DIM" "TIME_DIM" ON "NYP_DRAW_FACT"."DRAW_DT_ID"="TIME_DIM"."TIME_ID") INNER JOIN "NYP_RPT"."NYP_HIERARCHY_DIM" "NYP_HIERARCHY_DIM" ON "NYP_ROUTE_DIM"."HIER_ID"="NYP_HIERARCHY_DIM"."HIER_ID"
 WHERE   NOT ("NYP_ROUTE_DIM"."ROUTE_CD" LIKE '2%' OR "NYP_ROUTE_DIM"."ROUTE_CD" LIKE 'BL1135%' OR "NYP_ROUTE_DIM"."ROUTE_CD" LIKE 'BL1137%' OR "NYP_ROUTE_DIM"."ROUTE_CD" LIKE 'BS1145%' OR "NYP_ROUTE_DIM"."ROUTE_CD" LIKE 'BS1146%' OR "NYP_ROUTE_DIM"."ROUTE_CD" LIKE 'ca1373%' OR "NYP_ROUTE_DIM"."ROUTE_CD" LIKE 'CA1374%' OR "NYP_ROUTE_DIM"."ROUTE_CD" LIKE 'DT%' OR "NYP_ROUTE_DIM"."ROUTE_CD" LIKE 'fl1149%' OR "NYP_ROUTE_DIM"."ROUTE_CD" LIKE 'PI1104%' OR "NYP_ROUTE_DIM"."ROUTE_CD" LIKE 'PI1122%' OR "NYP_ROUTE_DIM"."ROUTE_CD" LIKE 'RC1109%' OR "NYP_ROUTE_DIM"."ROUTE_CD" LIKE 'SU1259%' OR "NYP_ROUTE_DIM"."ROUTE_CD" LIKE 'su1267%') AND ("TIME_DIM"."WEEK_END_DT">={d '2016-06-05'} AND "TIME_DIM"."WEEK_END_DT"<={d '2016-07-31'}) AND ("NYP_HIERARCHY_DIM"."REGION_NAME"='CALIFORNIA SC' OR "NYP_HIERARCHY_DIM"."REGION_NAME"='CHICOPEE SC' OR "NYP_HIERARCHY_DIM"."REGION_NAME"='FLORIDA EAST SC' OR "NYP_HIERARCHY_DIM"."REGION_NAME"='FLORIDA WEST SC' OR "NYP_HIERARCHY_DIM"."REGION_NAME"='PHILADELPHIA SC' OR "NYP_HIERARCHY_DIM"."REGION_NAME"='PORT MORRIS SUBURBAN SC' OR "NYP_HIERARCHY_DIM"."REGION_NAME"='ROCHESTER SC' OR "NYP_HIERARCHY_DIM"."REGION_NAME"='WHITE OAK SC')
MISSING_RETURNS_CROSSTAB.rpt
crosstab.jpg
0
Comment
Question by:spudmcc
2 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 41747202
As I stated in your other version I don't believe this can be done in a cross tab.

I have modified your report slightly and believe I produced what you want using groups and group selection.

mlmcc
MISSING_RETURNS_CROSSTAB-rev1.rpt
0
 

Author Closing Comment

by:spudmcc
ID: 41747538
Thanks so much.  I knew you were correct but I was re-posting the question per a request from the moderator.  I appreciate your time and knowledge as always.  This will be very helpful.  

Andy
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now