February 8, 200521 yr Hi, I'm using a simple script to run a report - the user presses a button to bring up a custom dialogue box in order to input the Company Code which limits the report to one company. The attached script does just that. However, one of our companies needs a report which omits one person's details (Contact ID); it also needs a report which will run a report based on just that one person's details. I've tried adding another custom dialogue based on "If this particular company code is entered bring up another dialogue box asking whether the report should be run just for the individual" but this doesn't work. I've either attacked this in an illogical way (quite probably) and/or I'm getting the syntax wrong. I'd really appreciate some ideas of how to get around this. Sara ClientstatusreportScript.pdf
February 8, 200521 yr How about something like: Go to Layout [ "19. Client Status Report" (tbl_job_bag 3) ] Enter Find Mode [ ] Show Custom Dialog [ Title: "Create Client Status Report"; Message: "Please enter the 3 character Company Code:"; Buttons: "OK", "Cancel"; Input #1: tbl_company_location 5::Company Code, "Company Code:" ] If [Get(LastMessageChoice) = 1] If [tbl_company_location 5::Company Code = {a particular company code}] Show Custom Dialog ["Should this report be run for the individual only?"; Buttons: "Yes", "No"] If [Get(LastMessageChoice) = 1] Set Field [Contact ID; {desired id}] Else New Record/Request Set Field [Contact ID; {desired id}] Omit Record End If End If Perform Find [ ] Sort Records [ Specified Sort Order: tbl_job_bag::Job No; ascending tbl_job_bag::Status; ascending tbl_job_bag::Artwork Deadline; ascending ] [ Restore; No dialog ] Enter Preview Mode [ Pause ] Perform Script [ "16a. Print Dialogue Landscape" ] End If Enter Browse Mode Go to Layout [ original layout ]
Create an account or sign in to comment