Solved

Select Cross-tab total

Posted on 2016-08-08
2
41 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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

743 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

15 Experts available now in Live!

Get 1:1 Help Now