×
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!

*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

Supress Report Footer Issue

Supress Report Footer Issue

Supress Report Footer Issue

(OP)
Hi

I have added a sub report into our PO document with T&C's.

I only want the report footer to show if a certain PO type is active for that PO type.

We have Type 1 , 2 and 4.

I don't want the Report footer to show if it is 4.

In the report footer section expert I have the Supress (Nor drill down) ticked and this formula in there

IF {PurchaseOrderHeader.OrderType} = 4 THEN False ELSE TRUE

I also have ticked under the tab Paging tab New Page Before, so it is on its own page at the end of the report.

For some reason it is not working and does not show anything no matter what PO number I put in.

Any ideas how I can fix the issue please.

Thanks

RE: Supress Report Footer Issue

You have the formula backwards. I would just add this:

{table.type}=4

You can check what’s happening by placing the order type field in the report footer and observe it’s value. Another issue might be that the order type is sometimes null.

-LB

RE: Supress Report Footer Issue

(OP)
Thanks for the reply

I adjusted the code

IF {PurchaseOrderHeader.OrderType} = 2 THEN TRUE ELSE FALSE

But I am still not getting the last page with the T&C's

RE: Supress Report Footer Issue

I don’t know why you did that. I thought you wanted it to show unless is was 4. So now you are telling it to suppress if it is 2. First step is to place the field in the report footer and then report back on the value that appears there.

Also, please explain whether the type can be null.

-LB

RE: Supress Report Footer Issue

(OP)
Hi

Sorry about that, we have 4 types of PO 1 to 4 and until tomorrow I cannot define which one shood not be used. So I was trying to get it working with just one type at least.

There may be nulls in the equation but there would be very few nowadays as it is a required field now. I am using just one PO number currently to get the last page working, and the PO is orderytpe 2.
I put the filed in the header and it is 2. Just no sub report with the text on the last page.

Thanks

RE: Supress Report Footer Issue

Put it in the report footer where the subreport is. If the field can be null what do you want to happen when it is null? You would need to adjust the formula so that it operates correctly in the cases of nulls.

Again, your current formula will suppress the footer if the type = 2. If you want it to show, then change it to <>2.

-LB

RE: Supress Report Footer Issue

(OP)
HI

Moved it to the report footer and it is not showing the type number. I unticked the suppressed in section expert but still nothing showing.

If NULL then to show the last page.

Thanks

RE: Supress Report Footer Issue

Write the formula like this—this assumes you want to SHOW the footer when the type is null or the type = 2. Since you appear to want to write this as an if/then, that’s what I’m doing:

If isnull({table.type}) or
{table.type}=2 then
False else true

Also, do NOT check the suppress box. The suppression formula will work without it, and when you Check it, it automatically suppresses when it encounters a null—that’s why you want to build it into your formula.

-LB

RE: Supress Report Footer Issue

(OP)
Hi

Brilliant, it is now showing the terms and conditions. However, and sorry about this, it is also showing the Page Header and Page Footers of the main report , this may be ok, but would there be away to exclude them if possible.

Thanks for the help

RE: Supress Report Footer Issue

Since you have new page before set on the report footer, you can use a suppression formula for the page header and footer of:

Onlastrecord

Of course the page footer will still have some reserved space, but the content for the page footer will not appear.

-LB

RE: Supress Report Footer Issue

(OP)
Perfect all working , thanks for the help

RE: Supress Report Footer Issue

(OP)
Not quite working after all.

I now need to include two types of ordertpes 2 and 4.

Firstly is this code correct to supress the header on the last page? I am getting all sorts or results so just checking if the code is right.

IF PageNumber=TotalPageCount AND {PurchaseOrderHeader.OrderType} = 2 OR {PurchaseOrderHeader.OrderType} = 4 THEN True ELSE False


Secondly I then have this new issue but same report

In the Page Footer there is a @totalamount which is supressed using this formula. I think it as been created like this so any pages with more than one the @totalamount is left blank and the total amount is shown on the last page. My ordertypes to ignore and now numbers 4 and 2. The formula below works ok with a PO below with type 1

(PageNumber < (TotalPageCount - 1)) AND ({PurchaseOrderHeader.OrderType} = 4)
OR
(PageNumber < TotalPageCount) AND ({PurchaseOrderHeader.OrderType} <> 4)

RE: Supress Report Footer Issue

You either need to add parens around the clause after “And”, as in:

(
{table.type}=2 or
{table.type}=4
)

Or change the clause to read:

And {table.type} in [2,4] then true else false

The last formula you mention will suppress the page footer if:

1) the type=4 and the page is any except the last two pages
2) the type<>4 and it is NOT the last page

I don’t understand what you mean by “ignore”. You need to say what you want to happen when the type = 2 and 4.

-LB

RE: Supress Report Footer Issue

(OP)
Thanks for the reply. I think I have it all working now except the following which I will try and explain better.

I believe the @totalamount is supressed unless it is the last page then show the @totalamount. The exception in this was ordetype = 4 which hten as the subreport t&C's as the last page. But now it also needs to include ordertpye 2, as both 4 and 2 now use sub report T&C's as the last page.

So if the ordertpye is 1 then @totalamount needs to show on the last page only and supressed on the other pages,
If the ordertype is 2 or 4 @totalamount needs to show on the page before the last page (which is the sub report with T&C).

ANy ideas would be welcome, many thanks

(PageNumber < (TotalPageCount - 1)) AND ({PurchaseOrderHeader.OrderType} = 4)
OR
(PageNumber < TotalPageCount) AND ({PurchaseOrderHeader.OrderType} <> 4)

RE: Supress Report Footer Issue

(
Pagenumber < totalpagecount-1 and
{table.ordertype} in [2,4]
) or
(
Pagenumber < totalpagecount and
Not({table.ordertype}in[2,4])
)

-LB

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! Already a Member? Login

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