Solved

supress data based on next record value

Posted on 2009-07-16
9
504 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
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})
0
 
LVL 5

Expert Comment

by:dhobale
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.
0
 
LVL 100

Assisted Solution

by:mlmcc
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})

mlmcc
0
 
LVL 1

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!
Sample-data.xls
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 5

Expert Comment

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

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.
Sample-print.doc
0
 
LVL 34

Accepted Solution

by:
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.

 James
0
 
LVL 1

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.
0
 
LVL 34

Expert Comment

by:James0628
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.

 James
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

895 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

18 Experts available now in Live!

Get 1:1 Help Now