Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 510
  • Last Modified:

supress data based on next record value

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?
0
Jeff Geiselman
Asked:
Jeff Geiselman
  • 3
  • 2
  • 2
  • +2
3 Solutions
 
peter57rCommented:
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})
0
 
dhobaleCommented:
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.
0
 
mlmccCommented:
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})

mlmcc
0
[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

 
Jeff GeiselmanAuthor Commented:
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!
Sample-data.xls
0
 
dhobaleCommented:
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
0
 
Jeff GeiselmanAuthor Commented:
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.
Sample-print.doc
0
 
James0628Commented:
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.

 James
0
 
Jeff GeiselmanAuthor Commented:
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.
0
 
James0628Commented:
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.

 James
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now