Jump to content

create a printout of a month of reservations


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

Recommended Posts

  • Newbies

I have a reservation system that has reservations for particular days out of the year. But i would like to have a print out of who is staying in what month. Each reservation has a particular start day and finish day, and i would like to have a combo box for the months of the year that once selected you will be able to click a button that runs a script that collects all the reservations for that particular month and put it into a table format for printing.

Link to comment
Share on other sites

You could make a month or week field. Those will represent the month or the week number of the start/end date. Something like this in a calculation field:

Month(startdate) or week(startdate). Set the calc output to number!

Put this field in the database and make the field you select the month from a global number field. The user selects the month number and clicks on the button. Your script should go to searchmode and a setfield commando sets the user selecter number in the calculated month field. Perform find and make the go to layout and print scripts and you're finished:)

greetz...jeff

Link to comment
Share on other sites

Try these script steps:

-enter find mode (restore and pause options off)

-set field (calc month field), (user selected date field)

-perform find (restore option off)

-go to layout (your table)

-print (choose with or without window)

-go to layout (where the user selected the month)

This script will take the user inputted month number and set it in the calculated month field of start date. After that it will perform the find and go's to the table layout. It will give a print commando and returns to the original layout. After that it will show all records like nothing has happend:)

I hope this one works for u

jeff

Link to comment
Share on other sites

I could have sworn I responded to this yesterday but I guess my post didn't go through...

Here's another way that might be more clear, (not sure if it is better or worse)...

To keep it simple, I'll show you how to do it if you did a separate script for each month... you may be able to figure out how to get them all in one script.

For January,

Perform a find for:

ArrivalDate >= Jan1

New request

ArrivalDate <= Jan31

New request

LeavingDate >= Jan1

New request

LeavingDate <= Jan31

This would find all reservations were at least one day lies in the month of January.

Then simply sort by arrival date, go to list view, print.

You asked about finding in scriptmaker. Yes you can do it...

Enter find mode

then use "Set Field" commands and the "new request" command to set the above criteria

Perform Find

You can also use the "restore find requests" option if you set up the find criteria manually in the database before you edit the script.

Good luck.

--

Jason Wood

HeyWoody.com

Link to comment
Share on other sites

This topic is 7821 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.