Jump to content

PDF Report


karenjoy

This topic is 3452 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello Everyone,

 

Here I am again, my second post:

 

Here is the scenario

 

I have drop down field Report with the following Values (Bottles, Cans and Plastics), If the value of my Report = Bottles or Cans or plastics and my records.

 

Kindly help me building my scripts because its not working of what I need and expecting

 

I want that in my script that if the user click the PDF button it will show the report layout on top of my original layout. and if the user decides not to continue making the PDF it will close the report layout.

 

Please find my attached file for your reference.

 

Thank you so much.

 

Karenjoy

 

Report.zip

Link to comment
Share on other sites

I want that in my script that if the user click the PDF button it will show the report layout on top of my original layout. and if the user decides not to continue making the PDF it will close the report layout.

 

Will this be used on FMGo?  If not, you can open a new window to show the report layout on top of your original layout.  If FMGo, you will need to use one of these three options 1) switch to different layout, 2) use popover or 3) use slider.  I will assume this is for desktop so I'll rewrite your script using new window in my example (see attached file at the bottom of this post).  There are other ways your script can be improved, Karenjoy, so I will include those notes below (and I incorporated them in the new ReportMOD file):

 

Finding: Currently you have three separate find scripts for the three types of containers: Cans, Plastics, Bottles but all you need is one script called Find Containers and pass your selection to the script. Your selection (field called report) should be changed to a global (File > Manage > Database) and select report field then go to Options > Storage. Check 'global storage'. Now that your Report field is global, it can be accessed and used anywhere in your solution even without relationships.

 

Your Cans script finds and omits Bottles then finds and omit Plastics. Is there any reason you are not simply finding Cans? I created a 'Find Containers' script which combines the three scripts into one AND allows you to find more than one item checked and looping if so, creating multiple find requests.

 

If you are not on a layout based upon the table occurrence you are searching, evoke Enter Find Mode[] before switching to that layout. Otherwise, if you switch to a layout first, records will be pre-fetched needlessly when you are going to simply dismiss them to find a new set a records. By entering find before you switch, those records aren't loaded and it is much faster.

 

Developer table: I suggest that you keep your globals in a 'developer' table of one record (maybe called Preferences or Reports). I moved your globals to a Reports table.

 

Preview Mode: Preview mode is only needed if User is viewing the record so I removed that line.

 

Save as PDF: You had it set to save current record but your report is list view. I have changed it to 'Records being browsed' and I have change the layout body size down to a single record so more records can be viewed. If the User does not enter a file name, you might wish for a default name so I've provided one (see Set Variable $fileName line).

 

Please let us know if you have any questions and we'll be more than happy to help you through it.  :-)

ReportMOD.fmp12.zip

Link to comment
Share on other sites

  • 2 weeks later...

This topic is 3452 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.