Solved

Fetch first row from two files in crystal reports

Posted on 2009-04-13
4
218 Views
Last Modified: 2012-05-06
hi, i'm using crystal reports to show a purchasing data like this:

PO =1 Item =A Line =10 RORC = 0 RORN = ' '
PO =1 Item =A Line =20 RORC = 0 RORN = ' '
PO =1 Item =A Line =30 RORC = 0 RORN = ' '
PO= 1 Item =B Line =40 RORC = 1 RORN = '1001'
PO =1 Item =B Line =50 RORC = 1 RORN = '1001'
PO =1 Item =B Line= 60 RORC = 1 RORN = '1001'

how can I get just the first row for the item B in the result ?? like this

PO= 1 Item =A Line =10 RORC = 0 RORN = ' '
PO =1 Item =A Line =20 RORC = 0 RORN = ' '
PO =1 Item =A Line =30 RORC = 0 RORN = ' '
PO =1 Item =B Line =40 RORC = 1 RORN = '1001'

0
Comment
Question by:lngc
  • 2
4 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 24128983
You need to explain what rule is being applied here.
(Why are you showing all the As and only one of the Bs?)
0
 
LVL 34

Expert Comment

by:James0628
ID: 24134455
Are these detail records?

 Do you have any groups on the report?

 The first thing that comes to mind is to use suppression.  That will be simpler if you have a group on PO (or whatever defines a set of "A" and "B" records).  Keep in mind that with suppression, CR is still reading the records.  It's just not showing them.  If a PO could have hundreds of "B" records, CR could be reading a lot of unnecessary records.  In a case like that, it would probably be better to change the data, if possible, so that CR only gets the first "B" record (eg. create a query that only sends the desired records).  Also, if you're using any of the CR summary functions, they will include the suppressed records.

 James
0
 

Accepted Solution

by:
lngc earned 0 total points
ID: 24135355
thanks for your help, I found a solution by myself, I've created a sql expression on the same file ( it is possible ) and fetches just the first row.. and added a formula that activate the sql expression with a condition ..finally I've added the formula to the selection record ..

thanks,
Louis
0
 
LVL 34

Expert Comment

by:James0628
ID: 24147265
Glad you worked it out.

 James
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

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. …
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
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…

770 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