lngc
asked on
Fetch first row from two files in crystal reports
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'
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'
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad you worked it out.
James
James
(Why are you showing all the As and only one of the Bs?)