?
Solved

Select Cross-tab total

Posted on 2016-08-08
2
Medium Priority
?
89 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

765 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