Solved

supress data based on next record value

Posted on 2009-07-16
9
501 Views
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?
0
Comment
Question by:Jeff Geiselman
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 150 total points
Comment Utility
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
 
LVL 5

Expert Comment

by:dhobale
Comment Utility
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
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 50 total points
Comment Utility
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
 
LVL 1

Author Comment

by:Jeff Geiselman
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 5

Expert Comment

by:dhobale
Comment Utility
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
 
LVL 1

Author Comment

by:Jeff Geiselman
Comment Utility
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
 
LVL 34

Accepted Solution

by:
James0628 earned 300 total points
Comment Utility
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
 
LVL 1

Author Closing Comment

by:Jeff Geiselman
Comment Utility
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
 
LVL 34

Expert Comment

by:James0628
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now