Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4160 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi

 

I wonder if someone can help me with a script I'm struggling with. I have got the script below to summarise the total amount of clients we transport between any given dates and to count the number of vehicles used to transport them using two Summary Fields in a table called Journeys. 

 

The first summary field counts the vehicles used i.e minibus, DAR or a car and the second one just totals the amount of clients transported which is extracted from an input field on the journeys layout which is then displayed on another layout called 'clients transported' via a button on the journeys layout. 

 

This works fine but what I'd like to do is summarise the amount of clients transported by vehicle type i.e 6 by DAR, 20 by minibus and 12 by car on the clients transported layout but I just can't work out how to do this so any help would be greatly appreciated.

 

Show Custom Dialog [ Title: "Clients Transported"; Message:

"Enter the Start and End Date for the month required in the search fields below."; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No”; Input #1: Journey::gStart Date, "Start Date"; Input #2: Journey::gEnd Date, "End Date"; Input #3: Journey::Vehicle, "Specify Vehicle" ]

If [ Get (LastMessageChoice) = 1 ]

Enter Find Mode [ ]

Set Field [ Journey::Start Date; Journey::gStart Date &"..."& Journey::gEnd Date ]

Set Field [ Journey::Number Travelling ]

Set Error Capture [ On ]

Perform Find [ ]

Sort Records [ ] [ No dialog ]

Go to Layout [ “Clients Transported” (Journey) ] 

End If

If [ Get (LastMessageChoice) = 2 ]

Go to Layout [ “Journey” (Journey) ]

End If

Thanks in advance.
Posted

I am not exactly sure of your structure here but to do what you want, you would create a subsummary report based on your Ride table ( this may be your journey table ), and group on vehicle. You dont need the body portion of the layout. Your summary count field and the vehicle field put on the subsummary part should be enough.

This topic is 4160 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.