supress data based on next record value

Posted on 2009-07-16
Last Modified: 2012-05-07
I am developing a report to print our packing list and I have an issue that I am not sure how to handle.  I have all the data consolidated into one data source.  The problem I have is with the order notes.  We have multiple orders on one packing list and they each could have different order notes on them.  So I have my report grouped by order number and then line number to filter out all the duplicate data.  Since the order notes are on each line they need to print on the detail section in order to get them all printed.  When I place them in this section then I get them printed after each order line item since it is grouped by line.  Is there a way that I can suppress them based on what the next record value is.  My though is to suppress when order number is not equal to next order number.  I have not been able to figure out how to do this though.  Has anyone done this or know if it is possible?
Question by:Jeff Geiselman
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
  • 2
  • 2
  • +2
LVL 77

Assisted Solution

peter57r earned 150 total points
ID: 24869590
I've read this several times now but I still can't understand it all, I'm afraid.

You can test a field value in the next record using the Next() function

SO to suppress something based on a change of value you set the suppression rule to :
{table.field} <>Next({table.field})

Expert Comment

ID: 24870517
Hi There,
I'm confused about the criteria you want to use to supress order notes.

You can create a formula for running total based on order #. If noteid / message doesn't match next record then you can add it to running total otherwise ignore. You should be able to display it at the order footer.
LVL 101

Assisted Solution

mlmcc earned 50 total points
ID: 24870862
The first comment should work.

To avoid the issue of testing the NEXT record on the last record change the condition to

OnLastRecord OR {table.field} <> Next({table.field})

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button


Author Comment

by:Jeff Geiselman
ID: 24871655
This first comment does work except I have multiple lines that are the same.  Also misstated that I need them to be not equal.  I actually need them to supress when the order number is equal to the next order so I don't have the notes printing after every line.  The issue I need to work through now is to be able to not supress when I have multiple order notes on an order.  I have attached a file with sample data and you can see more what i am talking about.  The report groups the data by Order Number and then by LineNbr.  You can see the last column is my order notes. on the first order there are 6 notes for each line in the order.  I need these to print at the end of the order.  Then the next order has 5 notes for each line in the order and again these need to be printed out at the end of the order.  I am looking for a way to supress these until the end and the print out each note once.  Please help!

Expert Comment

ID: 24871713
can you post a screenshot of your report? I think manually creating running total formuls will help you solve the issue. I can tell you once I see the screenshot

Author Comment

by:Jeff Geiselman
ID: 24871839
Here is a print screen of what I am getting.  You can see the notes are getting repeated after each line and I only want them at the end.
LVL 35

Accepted Solution

James0628 earned 300 total points
ID: 24875489
Printing all of the notes at the end of the order is a very different problem from what you seemed to be describing in your first message.

 You have two basic choices.

 1) Save the notes in variables as you're reading the items for the order, then output those variables at the end of the order.

 2) Use a subreport to output the notes.

 A subreport would probably be the easiest solution.  The subreport would output just the notes.  You'd put it in the order group footer and pass it the order number (and anything else needed to find the right order), and it would read the items for that order and output all of the notes.


Author Closing Comment

by:Jeff Geiselman
ID: 31604237
A subreport is what I was trying to get away from as they are difficult to maintain in themselves.  I might look at the variables and see what it takes to make that happen.  Thanks fo the input and advice.
LVL 35

Expert Comment

ID: 24884075
Subreports aren't generally my first choice, but this actually sounded like a relatively good place to use one.  I don't really see why maintenance would be a problem, unless your tables were changing frequently or something.  Having said that, if you'd rather use variables and need help, just come back and start another question.


Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : All lightning effects with instructions : http://www.mediaf…

628 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