Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Specific items within an array

Status
Not open for further replies.

Halliarse

IS-IT--Management
Jan 8, 2007
213
GB
I am currently using Crystal Reports 10 and my data is from an Access table.

My data table consists of 2 columns only, Linked_Key and Master_Number. Linked_Keys are not unique and there maybe 10 different Master_Numbers within one Linked_Key. i.e.

Linked_Key, Master_Number
ABABABAB,100001
ABABABAB,100002
ABABABAB,100003
ABABABAB,100004
ABABABAB,100005
ABABABAB,100006
ABABABAB,100007
ABABABAB,100008
ABABABAB,100009
ABABABAB,100010
BCBCBCBC,200001
BCBCBCBC,200002
BCBCBCBC,200003
BCBCBCBC,200004

I want to be able to create an output file that will create one line of data per line within the input data but which will contain data from the 2nd line of data within each Linked_Key group (I'm sure that doesn't make sense!!) i.e the output for the above examples should read:-

100001,100002
100002,100002
100003,100002
100004,100002
100005,100002
100006,100002
100007,100002
100008,100002
100009,100002
100010,100002
200001,200002
200002,200002
200003,200002
200004,200002

Any assistance would be greatly appreciated! Any questions please ask!

Kind regards

Steve

 
Hi Cathy

I'm not sure how this is going to give me the solution I require!

Cheers

Steve
 
create a running total - RTotal0
field to summarize linked key
type of summary count

evaluate each record

Reset on change of field Linked.Key

then create this formula
//
whileprintingrecords;
numbervar output;
if {#RTotal0} = 1 then output := next({Master_Number})
else output := output;
output

place that field in your details next to {linked_key}

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top