Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Within the first afternoon I found 2 of the 3 needed solutions, and the 3rd came to me over the weekend!..."

Geography

Where in the world do Tek-Tips members come from?
rmcguire80 (IS/IT--Management)
12 Aug 12 18:33
I have a table Shipments with many records and for a shipment record can run my report which includes the field SHIPMENTS.TOTALMILES. There is also a field SHIPMENTS.CARRIERID on each record which represents the carrier who moved the shipment.

What Im trying to create is a formula to put on my report which would sum the field SHIPMENTS.TOTALMILES for the SHIPMENTS.CARRIERID for all records with that CARRIERID up to a certain date which is field, SHIPMENTS.ENTRYDATE on the record which Im running my report.

Any help would be appreciated. Is there a conditional summary which would accomplish this? I didn't think just a flat out summary would suffice


thanks
Madawc (Programmer)
13 Aug 12 5:27
Group by SHIPMENTS.CARRIERID.

Create a formula field that is zero or the miles, depending. Something like

CODE --> @MilesThatCount

if SHIPMENTS.ENTRYDATE <= {your.date}
then SHIPMENTS.TOTALMILES
else 0 

Get a total for @MilesThatCount. (If you're not already familiar with Crystal's automated totals, see FAQ767-6524: Basics of totals.)

If you can't group by SHIPMENTS.CARRIERID, then you should be able to use it in a Crosstab.

PS. It helps to give your Crystal version - 8, 8.5, 9, 10, 11, 2008 or whatever. Methods sometimes change between versions, and higher versions have extra options.

yinyang Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP yinyang

rmcguire80 (IS/IT--Management)
13 Aug 12 7:01
also I should've mentioned this, the report is ran on an individual record, So I'll open for example shipment 501234 and run the report.

How can I use the formula for entrydate <= youredate Which would be the entry date on th record I'm on
rmcguire80 (IS/IT--Management)
13 Aug 12 9:15
Im using Crystal 8.5
Madawc (Programmer)
14 Aug 12 9:41
If it's just one Shipment, you do just as I specified, but total for the whole report.

Entrydate is one of your fields, as far as I know.

yinyang Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP yinyang

rmcguire80 (IS/IT--Management)
14 Aug 12 14:51
ok, I can get the sum of miles for all carriers to come up when I run it as its own individual report, but when I put that in as a subreport of my main report it only prints the miles for the shipment record Im running my main report on


Basically I have a report called Rate Confirmation and there is a carrier record tied to that confirmation, but those reports are sent out per record(shipment)

Im trying to add in the total number of miles for all shipments that the carrier assigned to that rate confirmation has been on.
Madawc (Programmer)
22 Aug 12 6:29
If it is extra data, you'd need to pass shipping details and work from that.

yinyang Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP yinyang

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close