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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combining data from multiple records

Status
Not open for further replies.
Nov 14, 2002
15
US
Hello!

I tried a search, but no luck with the keywords...

I am using Crystal 8.5, pulling data from a relational database.

What I want to do is combine some of the data from two records into one line for my report. I am tracking movement of an item between multiple locations. For this particular report, I want to be able to show the missing days from the primary location. What I have is:

Item Location DateIn Date Out

I have a formula to convert the dates to number of days so right now June looks like:

Wheel Sacramento 6/1/04 6/10/04 9
Wheel Oakland 6/10/04 6/12/04 2
Wheel Sacramento 6/12/04 6/30/04 19

What I want the report to show is that the wheel was missing from Sacramento for 2 days. So basically, I need it to show the first two items from the first line, and the dates from the second line...all on one line.

Any ideas?

 
Try something like:

if {table.location} <> next{table.location} then
{table.item} + " "+{table.location}+" " +
totext(next({table.datein},"M/d/yy") + " " +
totext(next({table.dateout},"M/d/yy") + " " +
totext({@diff},0,"")

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top