Solved

Fetch first row from two files in crystal reports

Posted on 2009-04-13
4
220 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 35

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 35

Expert Comment

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

 James
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

679 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