×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Suppress on Condition?

Suppress on Condition?

Suppress on Condition?

(OP)
Hello,
There's a report that shows monthly for the current quarter.

So it's currently Quarter 1 with Jan, Feb, Mar showing (next quarter it'll show Apr, May, Jun, etc ...)

Anyway, I have the following code in the conditional format on Suppress so that it'll ONLY show the data in the current month

CODE

ToNumber({PR_DeductionReportWrk.CalendarMonth}) <> Month(CurrentDate) 
However it is still showing data for each month columns.

RE: Suppress on Condition?

Have you checked {PR_DeductionReportWrk.CalendarMonth} to confirm it does contain a number(1 to 12) that corresponds with the months January to December?

Assuming that checks out, there is nothing obvious to indicate it wouldn't work as you expect.

Cheers
Pete

RE: Suppress on Condition?

(OP)
I believe so, the headers are ALL suppressed with the code

RE: Suppress on Condition?

Where are you using this suppress formula?

Can you give an idea of report layout and what you are trying to suppress?
Ian

RE: Suppress on Condition?

(OP)
So it's a Quarterly report

1st Quarter right now but in the 2nd month

Report format:

JANUARY FEBRUARY MARCH QTR YTD


Need to suppress Jan and Mar since it's Feb
Next month Jan and Feb should be suppressed

RE: Suppress on Condition?

Does that mean for February report will look like this

FEBRUARY QTR YTD

And in March
MARCH QTR YTD

In which case you do not want Suppression you need to create two formula for col 1
This will then return data for Column Title and Data

Ian

RE: Suppress on Condition?

(OP)
Those columns already exist and will display according.
I just need to suppress the months that's not in the current quarter.

So only display the Feb. data set.

RE: Suppress on Condition?

Create a formula
@MonthNo
ToNumber({PR_DeductionReportWrk.CalendarMonth})

Place this next to your data and see what is returned.

How is data grouped and where is data displayed, detail or group footers

Ian

RE: Suppress on Condition?

(OP)
It returned 1.00

RE: Suppress on Condition?

(OP)
Here are the images of the design and the results.





Trying to suppress the months that are not in the current month.

RE: Suppress on Condition?

It looks like this is a manual crosstab using running totals. You need to use field suppression, not section suppression, but for help, you need to show the contents of the conditional formula used in the running total evaluation section. So just open each of the three running totals in one of the footer sections and then go into the evaluation section->use a formula-> and copy and paste the formulas into this post so that Ian or I can see how they are handling the date condition to create the three distinct columns.

-LB

RE: Suppress on Condition?

(OP)
1st column

CODE

formula = ToNumber({PR_DeductionReportWrk.CalendarMonth}) = ({@QuarterToPrint} - 1) * 3 + 1 

2nd column

CODE

formula = ToNumber({PR_DeductionReportWrk.CalendarMonth}) = ({@QuarterToPrint} - 1) * 3 + 2 

3rd column

CODE

formula = ToNumber({PR_DeductionReportWrk.CalendarMonth}) = ({@QuarterToPrint} - 1) * 3 + 3 

RE: Suppress on Condition?

What is the content of {@QuartertoPrint} and of any nested formulas within that formula?

Also, I was assuming that the same amount field is being evaluated in each RT. If not, I guess the amount fields might be specific to each month?

-LB

RE: Suppress on Condition?

(OP)
This is all that's in the QuarterToPrint formula

CODE

formula = 0 
Somehow it knows the quarter and the part

CODE

({@QuarterToPrint} - 1) * 3 + 1 
is showing the 1st month in the current quarter, etc ...

Yes on the latter. Amount fields are specific to each month. Since it's the total of the deductions paid in the month showing.

RE: Suppress on Condition?

I couldn't see the end of your formulas on my iPad, so thought the three formulas were the same. Sorry.

In design mode, select all fields/labels in column1 in design mode, and then go to format field->suppress->x+2 formula area and enter:

month(currentdate)<>({@QuartertoPrint}-1)*3+1

Repeat for each of the remaining two columns, changing the last digit to +2 and +3 respectively. Then the suppression will work regardless of the month of the currentdate.

-LB

RE: Suppress on Condition?

(OP)
THANK YOU!
It seems to be working, it's showing only the February column and the data for February now.

RE: Suppress on Condition?

(OP)
Hi Ibass,

So for some reason the March column text is not showing and the entire column for Amount is not showing.
Only the data for Hours in March are showing.

This is the code for the fields for March
only difference is the +3 at the end for handling March

CODE

month(currentdate)<>({@QuartertoPrint}-1)*3+3 

and now it's April, it's not showing it in the 1st two columns

The columns are broken up by Quarter
each quarter it should reset

Q1 should show
Jan hours Jan Amounts in Feb
Feb hours Feb Amounts in Mar
Mar hours Mar Amounts in Apr

So currently, it would show Mar hours and Mar Amounts since it's Apr now
then next month, in May, it should show Apr hours and Apr Amounts in the Jan fields, etc ...

AND the ability to show prior month. is there a way to prompt that?

RE: Suppress on Condition?

Check the suppression on the hours to make sure the formula is consistent with the other fields in that column.

If you want to show the previous month, then the formulas should be changed. Replace month(currentdate) with: month(dateadd(‘m’,-1,currentdate)). Be sure to type in your own quotes around the ‘m’, since my iPad character set doesn’t use the quotes recognized by Crystal.

I don’t understand why the QuartertoPrint formula is set to 0. I think this should be set to the quarter of interest, using a parameter instead.

-LB

RE: Suppress on Condition?

(OP)
Yes, checked on the 2x Suppression and they are consistent with the other fields. Why I don't understand it's not showing. Will triple check.

It is showing Mar Amounts, just not the header or the hours for Mar with the month(current)

And they would like to enter a specific month to view at anytime. So a parameter prompt on the Month?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close