A customer asked if there was a way to change the default sort choice in their Violations Report Screen so that it always started on "Inspect Date." Looking at the sort choices in that screen I could see that that option was the fourth one in the list. To create the script in the User Defined Script Screen I chose "Zoning" as the Module, "ViiolateRep" as the Screen, and left "Screen" as the action. The actual script I entered was:
viorep.cmbsortby.listitemid = 4
viorep.sort_order = viorep.taglist(4,2)
Now when they enter that screen the default sort is the one they want. This script can be easily modified for other choices in the sorting list by changing the 4's in the script to the desired number. You can also use it for other report screens by substituting the proper screen name for "viorep".
Showing posts with label reports. Show all posts
Showing posts with label reports. Show all posts
1/14/2016
Referencing Rental Status in Property Screen (ZP32)
If you need to run reports on permits or violations issued to rental properties it can be useful to have the Property database itself indicate that the property is used for rental. The following script is a one-time run script that would be executed from the Database Browser screen script option. It will put the value "RENTAL" in the Property User7 field if said property has any kind of Rental record store.
update property set user7 = "RENTAL" from rental where rental.prop_id = property.prop_id
Now you run reports from any screen and used the Advanced Filter option to check the Property User7 field for "RENTAL" to get only application records issued to rental properties.
update property set user7 = "RENTAL" from rental where rental.prop_id = property.prop_id
Now you run reports from any screen and used the Advanced Filter option to check the Property User7 field for "RENTAL" to get only application records issued to rental properties.
10/03/2014
Changing the Default Date Range in a Report Screen (ZPSQL & ZP32)
A customer asked if it possible to change the default 30 day date range in a report screen. Using a script you can set the From date to any value you wish. Using the Rental Report Screen as an example the script would be:
rentrep.txtStartdate.value = DATE() - 60
Where the 60 value determines how many days back the range goes. This value is 30 by default but you can reset it using this script to any value you want. This approach should work for any report screen.
rentrep.txtStartdate.value = DATE() - 60
Where the 60 value determines how many days back the range goes. This value is 30 by default but you can reset it using this script to any value you want. This approach should work for any report screen.
10/01/2014
Set A Default Date Type in Rental Reports Screen (ZPSQL & ZP32)
By default no date field is set when you enter the Rental Report Screen. You can use a script to change this. A customer just requested a way to make the Enter Date the default date field. To do this you start a new script in the User Defined Scripts Screen using "Housing" as the Module, "RentRep" as the Screen and "Screen" as the Action. The script itself would be:
rentrep.date_type="ent_date"
rentrep.cmbUsedate.value = "Enter Date"
Now when you first enter the Rental Report Screen the Enter Date will be shown as the default date type.
rentrep.date_type="ent_date"
rentrep.cmbUsedate.value = "Enter Date"
Now when you first enter the Rental Report Screen the Enter Date will be shown as the default date type.
Subscribe to:
Comments (Atom)