sharingsunshine Posted November 20, 2006 Posted November 20, 2006 Hello, I am new to FM and I need to develop an application that produces multiple reports from the same data. I have developed two layouts that will give me the results I need. When I run the script it stops on the first layout and won't proceed to the second layout. Ultimately, after both layouts have been run I need the combined results to be faxed together that is why I need them to be automated in the same script. If I am going about this wrong please set me straight. Attached is the script I have so far: The FaxIt Report merely takes the first and last names, orderid and date and places them in a list format and the FaxIt report lists the details of those orders and other fields additionally. Both reports use the same data that is imported daily. By the way, in my script I delete all records initially because each time I run the script it is a whole new set of data. Any help will be greatly appreciated. Randal FMScript.pdf
Ender Posted November 20, 2006 Posted November 20, 2006 Looks like you need to add Print[] script steps for each layout you want printed.
sharingsunshine Posted November 20, 2006 Author Posted November 20, 2006 Thanks for the reply. However, I believe I must be doing something wrong concerning your suggestion. I added a print step for both layouts and then finally for the one that wasn't showing in the print preview. Either way I only get the last layout available to be faxed. Attached is my latest script. Thanks, Randal FMFaxIt.pdf
Ender Posted November 20, 2006 Posted November 20, 2006 It looks like it should give you a print dialog and allow you to print whatever layout you have up when the script is run, then it switches to the "FaxIt" layout and prompts to print that (the "Faxit Report" layout is essentially ignored).
sharingsunshine Posted November 21, 2006 Author Posted November 21, 2006 It does do what you are saying. However, is there anyway to get it to produce both reports in the same batch so that when I choose print fax the reports are all grouped together? Having them all together permits me to script the entire operation in the same script. Once this script is developed I need to develop a runtime module to send to a windows user. My attachments show I tried calling the FaxIt script from the other script located on Fax112006.pdf My latest change doesn't seem to produce both reports either. Please tell me how to get both reports to print out in the same operation. Thanks, Randal Fax112006.pdf FaxIt.pdf
Ender Posted November 21, 2006 Posted November 21, 2006 What you have should print both layouts one after the other. There will necessarily be two print jobs (one for each Print[] step). I don't think there's a way around that. BTW: Your current scripts could be shortened and get the same result using: Delete All Records Import Records [ No Dialog ] Sort Records [ Restore: by orders Converted::OrderID; orders Converted::Stock No.; No Dialog ] Go to Layout [ Faxit Report ] Print [ Restore ] Go to Layout [ Faxit ] Sort Records [ Restore: by orders Converted::OrderID; No Dialog ] Print [ Restore ]
sharingsunshine Posted January 19, 2007 Author Posted January 19, 2007 Hello, I was taken away from this project until now. So, please forgive me for not thanking you for all you have done. I tried your script you suggested but when I use the Print command as a fax PDF it won't keep the settings for the fax. I have tried saving it as a preset but it still just wants to print to the printer and not to a fax. Do you have any ideas? Also, I had to add in the "Enter Browse Mode" statement because it wasn't showing all the transactions/record without adding that statement. Is there some other way to control the fax portion in the script? Thanks, Randal
sharingsunshine Posted January 19, 2007 Author Posted January 19, 2007 I meant to say "Enter Preview Mode" instead of "Enter Browse Mode." Changing it to the Preview mode it shows the reports on my screen without the Print steps.
Recommended Posts
This topic is 6519 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 accountSign in
Already have an account? Sign in here.
Sign In Now