Solved

Select Cross-tab total

Posted on 2016-08-08
2
75 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 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