November 13, 200223 yr 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.
November 14, 200223 yr 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
November 14, 200223 yr Author Newbies one problem. there is no search mode in the scriptmaker. There is only enter into find mode. which does not allow you to search for any of the fields that i desire. not a very good with filemaker yet! sorry.
November 14, 200223 yr 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
November 14, 200223 yr 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
Create an account or sign in to comment