December 2, 201114 yr I would like to run a report and of course view in preview mode. I would like the FMP reporting script to save a .PDF of this report into the parent record generating this report. Relationship would be something like this; ParentProjectTable > ChildReportsTable. If I can avoid it, I would like to NOT save/export a file to desktop and then import. I would just want to save file straight into FMP, this may not be possible? I want to avoid saving to desktop because database will be used by multiple users and they have there own prefs on where they want to save files. Also, I want to avoid the (Can not find file path) notice. I think GOOD scripting can solve these issues, but I am not hip. How can I do this, any help? THANK YOU as always.
December 2, 201114 yr I figure my questions kinda relates to this one. I fail to see the connection myself. I would just want to save file straight into FMP, this may not be possible? No, it's not possible. I want to avoid saving to desktop because database will be used by multiple users and they have there own prefs on where they want to save files. You could use the path to temporary folder. If your script inserts the exported file into a container field, then users do not need to be aware of the file's interim location.
December 2, 201114 yr Author Sorry on the topic relation. Should I start a new post? I will build a demo file and try to make this work and share shortly. Thank you for your tips!
December 7, 201114 yr Author I have built script and I'm using Set Variable $Path = Get (TemporaryPath) But I'm getting an error on the Export Records as PDF. Error says "Can not save "" file on this disk... etc." then of course on the import of file I get error of File <Unknown> can not be found. I am missing a step or three I'm sure, like setting the name of the file, where do I set the name at? demo_historic_pdf.fp7.zip
December 7, 201114 yr Yes, you are missing a file name. Try setting the $path variable to = Get (TemporaryPath) & GetAsNumber ( Get ( CurrentTimeStamp ) ) & Int ( Random * 10^6 ) & ".pdf"
December 9, 201114 yr Author Thanks comment! That fixed everything. The suggestion you gave on the file name seems to be the best bet to create a truly unique id in time! Tho I would display this file in a portal list and a string of numbers means nothing to the user. My question is should I keep the file name as you suggested (stamp,random) and create a separate field that display a "readable" name e.g. 4536_QUOTE_Company_2011-12-09.pdf Or could I get away with naming file like my example? Also I would need to build a "safeguard" sorta speak, so when report script is ran it ask User "Are you sure you want to create a NEW report? Or would you like to view existing QUOTE? Script would check if there is an existing QUOTE, if not, then generate new quote. Goal is to prevent excess stored duplicate QUOTEs. Multiple quotes are allowed if quote-report is unique. Thanks for your help!
December 9, 201114 yr The file name can be anything (I am guessing you'd want something that can be calculated, otherwise you will need user input). You don't need a field for this, you can do calculation in the Set Variable[] step. Edited December 9, 201114 yr by comment
December 9, 201114 yr Author Correct. I do want a calculated naming convention. I understand I can name file what ever desired in the Set Variable step, I was just wondering if I could get into trouble if I veered from the unique file name like you suggested.
December 9, 201114 yr I don't think so, because the file is saved locally and any previous file with the same name will be overwritten.
December 12, 201114 yr Author 4-8 pdfs per record, 1,000's of records. Would referencing to the pdf be a better idea?
December 12, 201114 yr Hard to say without any background. Why is it necessary to keep the reports at all?
December 13, 201114 yr Author The documents are the legal and official business side of the company. Bid Request, Agreements, Purchase Orders, Etc... are important to have on file showing the project has been properly documented. Multiple Agreements may be printed or "filed" as project details evolve. The company needs this history documented. Agreements, etc are generated from ParentProject and ChildAssignments. Unless the Assignment has been marked as invoiced, Assignments can be modified. So the first agreement may differ from the second Agreement depending if assignment(s) have been modified.
December 13, 201114 yr Well, from a database perspective, the existence of a file is not the best way to keep track of facts. If an item is finalized, it should have a date in a DateFinalized field - and that determines the item's status regardless of any file being produced (or not) at the same time (not to mention existing or not at a later time). From a legal point-of-view, I am not sure I would be happy to deposit all my documents into a .fp7 file.
December 14, 201114 yr Author Thanks!.. Well of course, as always, you are right! I need to revisit the flow of assignment state and force User to follow protocol. Basically once Assignment Agreement has been published, not allow further edits. Question is, how can I handle a Change Order? Because Change Orders are inevitable. If Agreement has been published and Assignments are no longer editable then a NEW Assignment would have to be created to cancel out and show modification to the original Assignment record. Maybe this is a good method sense the old Assignment would still exist, but is in a canceled state, and show history of previous publishings??? I like the Assignments editable even if an Agreement has been published; to keep the Project from getting too bloated with updated "Change Order" Assignments over minor edits. But I "think" this is a business operations issue, not the database.
Create an account or sign in to comment