Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppressing Problem and Formula

Status
Not open for further replies.

sqw

Technical User
Mar 28, 2002
61
GB
I have a report and I have spilt the details into two so I have DetailsA and DetailsB. I want to suppress DetailsB and show DetailsA if a date in DA is within the period of the last full month. If it is not in that period then I want to show DetailsB and supress DetailsA. I have tried the selection expert but cannot get it to work.

Please can anyone help with some suggestions?
Thanks
 
Your selection formula doesn't dictate this. I'll presume for the sake of speed that you don't know some things so forgive me if I'm going over ground you already know.

You first write a formula to determine whether the date in question is in the last full month. It will return a true or false, so you might as well leave it that way.

Let's call it "IsInPrevMonth". It will probably look like this or close.
Code:
{table.datefield} in LastFullMonth

Then you go to your section expert. You can find it in the report menu right above group expert.

Go to section Details A. Look to the right of the dialog box for a checkbox marked 'Suppress (No Drill-Down)". To the right of that is a blue button marked "X-2" with a pencil. Click on that.

Put the following into the canvas.
Code:
Not({@IsInPrevMonth})
You can double click on the IsInPrevMonth formula to help you populate this. Click "Save And Close" which is in the upper left of your canvas screen.

Then you need to go to section Details B and do the exact same thing except in there it will look like this:
Code:
({@IsInPrevMonth})
Maybe I've got my two formulas switched but I don't think so. If I have then you can cut the 'Not' from one formula and paste it into the other.

That's about all there is to it.

Hopefully that's enough information to get you there.

 
Thanks for this response I will try this and let you know how I get on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top