Solved

Need to pull only last entry in a multi entry field

Posted on 2012-04-11
5
335 Views
Last Modified: 2012-04-25
I have a crystal report that groups records by invoice number, and a subreport to pull notes from the customer table.  The problem is the note field has multiple entries.  The subreports pulls all the customer notes.  I need to only pull the last entry. I can't seem to get it to do so.
is this possible?
0
Comment
Question by:Henrymarc
[X]
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
5 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 167 total points
ID: 37832823
I don't really understand what you mean by " the note field has multiple entries".
How are the notes entered so that you end up with multiple entries in one field- what distinguishes one note from another within this field?
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 37833014
Do the notes records have an indication of the last one?
Date, sequence number?

If so one way to do this is to group on the invoice number in the subreport
Sort descending on the date field or sequence number
Show the notes field in the group header
Suppress the details

mlmcc
0
 

Author Comment

by:Henrymarc
ID: 37833148
Note Id and date for each note in the field distinguishes one note from the next.  The last entry is at the top.
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 167 total points
ID: 37833420
If you are grouped by invoice number and put the note field int he group header you will get the desired result.

If you need details for other things just don't add the notes field

mlmcc
0
 
LVL 35

Assisted Solution

by:James0628
James0628 earned 166 total points
ID: 37836132
Is each note in a separate record?  You said that you have "a subreport to pull notes from the customer table".  If that's some kind of customer master table, I would normally expect there to be one record for each customer, with "notes" stored in another table.  Or is that a "customer notes" table?

 IAC, I'm assuming that you have the subreport linked by the customer, so it displays the notes for the current customer in the main report.  If each note is in a separate record and you only want to see the first record, you could add a group on the customer to the subreport, sort by date or whatever to get the notes in the desired order, put the note field in the group header, and suppress the other sections in the subreport.  Assuming that the subreport is just using the table as the datasource, I don't think there's any easy way to have it only read the latest note, but if you set it up as described above, you will only see the latest note.

 James
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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 …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

756 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