Jump to content
Server Maintenance This Week. ×

printing reports in IWP


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

Recommended Posts

I know that you can not send email or save as .Pdf in IWP, but is there a way to trigger a server script that could export to an excel? I have a database that is used for schedules of events and we have deployed IWP so that users can access the schedule from other locations. They want to ability to not only view the schedule but to get it in excel or .pdf. As IWP can not do either, I was wondering if I could trigger a server script that might be able to send an exported file thru SMTP.... Has anyone ever done this??? If this is not possible, how can I get the report into a new window for them to print without just printing what is in the browsers view??? Any ideas would be helpful!

Link to comment
Share on other sites

  • 6 months later...
  • 4 months later...

I think there is a plugin that can allow you to do that.

However to do it without any plugins is also possible with a bit of a workaround.

If you're using FileMaker Server Advanced be aware that Server Scheduled Scripts cannot export as Excel/PDF.

So you have two options.

Firstly you could run a scheduled task in your OS (on your FileMaker Server or another Server) to open your FileMaker database in FileMaker Pro. Use a special login to run scheduled tasks on startup and then close.

This login would send a report to the user in the format and frequency configured by the user.

The second option is have the server run the same task every ten minutes and check for a 'send report' record to be set. If it is it e-mails a report to the user. Advise users it can take up to ten minutes for them to receive the report.

HTH

Link to comment
Share on other sites

  • 1 year later...

As much as i've search for exporting as Excel from IWP I'm surprised that FileMaker hasn't filled that void. I know from PHP/JSP, etc. if you just send the Excel MIME type and then do simple <table><tr><td></td></tr></table> HTML the browser can open it in Excel and it's workable.

With XSLT, I'm guessing the 'smarter' people at FileMaker would be able to make this work in IWP ... even if it was limited compared to the client export functionality.

The one plugin I found today from 24U expires June23 so I continue to search...

Link to comment
Share on other sites

  • 1 month later...

I've got a (plugin-less) solution that distributes pdfs for IWP users. Basically when a report is to be generated, it goes to a submissions table and creates a record with the necessary primary keys and sets a "ready" field value to 1. A server robot does a loop find every .5 seconds looking for any submission table records with a ready status of 1. When it finds one it goes to the report using the primary keys in the submission record and exports the desired layout to a pdf in the web server folder. Finally it goes back and marks the ready status to 0 and continues the loop. Meanwhile the user (after clicking a "get report" button) is sent to a layout with a web viewer that displays a php redirect page (http-equiv="refresh") passing a URL variable (submission number) resulting in the URL of the actual .pdf file on the server ie www.wahtever.com/1234.pdf and a wait of 1 or 2 seconds. If the pdf is not found on the web server (because it is taking a little longer to export for whatever reason), the IWP user will go to the 404 page on the web server which has been configured to send the user back to the redir.php page to wait another 2 seconds, again, again, until the report is rendered and available and the redir.php page sends them to the pdf which opens within Chrome where they can save or print by mousing over the bottom right of the pdf.

With a few tweaks, you could do the same thing with exporting excel files except maybe instead of opening the excel file inside the web viewer (I don't know if it would try to display it within the browser or download it), opening a php page that generates a link for the user to download the exported excel file from the server (or even another layout with a web link button saying download with the submission record as the variable ie "www.whatever.com/" & submissionid & ".xls")

Link to comment
Share on other sites

This topic is 4243 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.