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

Formula Madness - listing destinations in order - in group footer

Status
Not open for further replies.

agray123

Technical User
Mar 4, 2002
110
US
I am working on a devil of a report - and now I need some more help. I am looking to list individual destinations /locations on a travel form. I am hoping to do these in order - ie. 1st day's location, second day's, fifth days (accounting for multiple day stays on one location.)

I am doing this in a OLE image copied into the group footer for other computations. THere are four spots onm the form - and I have to somehow "trick" crystal into breaking the data down like this:

Harrisburg/Philadelphia 10/04/2004

Philadelphia/Erie 10/06/2004

Erie/Harrisburg 10/08/2004

Where harrisburg is not anywhere "real" i.e. it does not exist on the database as a location - but it is where al travel starts and ends.

Any assistance would be hugely appreciated -as it is late in the day and this report is getting irritating.

 
If you were doing this in a subreport linked to the group by the group field, I would suggest using the following formula, but I don't have a clue how the OLE image fits in:

if onfirstrecord then "Harrisburg/"+{table.destination} else
if onlastrecord then previous({table.destination})+"/Harrisburg" else
previous({table.destination})+"/"+{table.destination}

-LB
 
thanks - the OLE part was included to state that I only have certain area to operate in -
 
this portion worked like a charm - I am linking the subreport via TRAVEL.ID - then I have the main report with a second group of ARRIVEDATE. The subreport is grouped in a similar fashion, but how would I get each individual table.destination/table.destination to appear in group footer 1?

I cannot change the location due to a million other formulas - one of which is causing problems to be posted in a few more minutes here.

I have DATE/TIME fields that need to correspond with each start/stop in travel - ie - travel begin date "harrisburg"/table.location
Arrivedate prev.location/table.location
Arrivedate prev.location/table.location
End date Prev.location/"harrisburg"

can i even get this to happen in a subreport - or even in the main report?

 
You have not explained the structure of your report in enough depth for anyone to understand what you are trying to do. What is the structure of your main report? Why does this information (destinations and dates) need to be in a group footer?--Maybe there is a better approach. Why can't you place the date field in the subreport next to the formula I gave you?

-LB
 
I am passing a lot of poorly formatted data - this is a bolt on travel application that I have been trying to bail out with this report. We have travel begin date and end date, and arrive date - but no "check out date" so we have used the group footer for arrays and running totals to work.

I have to build arrays and datediff formulas looking at this arrive date mess to arrive at costs. I am currently looking for a solution to pass a rate field formula (combining with "days" from datediff) that is grouped by arrive date into a "grand total" to apss into the group footer.

I will build a subreport to pass the travel dates/locations per your instruction - even if it does not exactly mirror the format of the embedded object I am confined to work in.

THanks for the help, as always - you are pulling me out of the fire!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top