Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How do I remove week no from table

Posted on 2011-02-15
6
Medium Priority
?
411 Views
Last Modified: 2012-05-11
Hi everybody

I have made a cross-tab with the numbers incident per week (EU standard - week from Monday to Sunday). I got my week numbers by using this formula:

IIF( DatePart("ww",{incidentsm1.open.time},crMonday,crFirstFourDays) > 53, 53,   DatePart("ww",{incidentsm1.open.time},crMonday,crFirstFourDays))

But when I run the report in week 7 I only want the report to show week 1, 2, 3, 4, 5 and 6 (and not week 7 - bacause it's not a full week yet)
I only want the report to show full weeks - the report should only show week through a full week (in this example only to week 6).

When I run the report next time and current week is 9 it should only show the week from 1-8.
See attached screen dump of my reports as It is for now - showing current week.

 report with weeks
0
Comment
Question by:lkudsk
[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
  • 3
  • 3
6 Comments
 
LVL 35

Expert Comment

by:James0628
ID: 34894860
When you say that you want to see full weeks, are you saying that if you run the report on Sunday, you want to see everything up to that day (because the week ends on Sunday), but if you run it on any other day, you only want to everything up to the previous Sunday?

 If so, do you want to exclude the partial week from the report completely, or do you need it in the report for some other purpose and only want to exclude it from the cross-tab?

 Assuming that you want to include everything after the prior Sunday from the report, or include everything if today is Sunday, you could add something like the following to your record selection formula.  I did some tests here and it seems to return today if it's Sunday, or the previous Sunday if today is not Sunday.

{incidentsm1.open.time} <= DateAdd ("d", -(DayOfWeek (CurrentDateTime, crSunday) - 1), CurrentDateTime)


 If incidentsm1.open.time includes the time, then you may need to adjust the formula for that.  For example:

{incidentsm1.open.time} <=
 DateTime (Date (DateAdd ("d", -(DayOfWeek (CurrentDateTime, crSunday) - 1), CurrentDateTime)),
 Time ("11:59:59 PM"))


 James
0
 

Author Comment

by:lkudsk
ID: 34894862
Now I have found out how to remove week 7 (for this exsampel) in this report but only in Details not in the "cross-tab".

I use Section Expert. In section expoert I have chosen "Suppress (No-Drill Down)" and used this formula: {@Uge nr.} = {@Uge test}

Where {@Uge test} is: DatePart("ww",CurrentDate,crMonday,crFirstFourDays)
That is working for my Detail sections but I don't know how I'm doing the same exercise with the "Cross-Tab"
0
 

Author Comment

by:lkudsk
ID: 34894875
Sorry I only want to see previous fullweek.

If I am in week 7 (as for now) I only want to see uptil week 6
If I am in week 14 I only want to see uptil week 13
etc.
0
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

 

Author Comment

by:lkudsk
ID: 34894882
I just want to exclude it from the cross-tab
0
 
LVL 35

Accepted Solution

by:
James0628 earned 2000 total points
ID: 34894914
What is in the {@Uge nr.} formula?  If you want to exclude the week from the report completely, you could try using this in your record selection formula:

{@Uge nr.} <> {@Uge test}


 Or maybe:

{@Uge nr.} < {@Uge test}


 One of those may work, depending on what is in the {@Uge nr.} formula.  If you can do that test in the record selection formula, the report won't include those records at all, so they won't be in the details or in the cross-tab.

 James
0
 
LVL 35

Expert Comment

by:James0628
ID: 34895248
You said that you had used that formula to suppress the details, so I assumed that you didn't want to include those records in the report at all.  But then you said "I just want to exclude it from the cross-tab".

 So, do you want to see those records in the details or not?  Maybe suppressing the details was just an exercise, to see if you could, but you really want to see those records in the details?

 James
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

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. …
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 course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

636 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