Solved

Fetch first row from two files in crystal reports

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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 …
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 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

19 Experts available now in Live!

Get 1:1 Help Now