Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Save Records as PDF error

Featured Replies

In a client database hosted by FMS 11 in a Windows environment, I have a script that aggregates records and then uses the Save Records as PDF step.

 

Recently the client has reported the error:

 

 "[FileName].fmp7 could not be created on this disk.  Use a different name, make room on the disk, unlock it or use a different disk"

 

I'm familiar with this error from past development.  I have seen it come up when there are filenaming issues, mostly.  However, it began happening in this client database on records that had been saved as PDFs before (with no error) and with the same filename.

 

The PDF script uses these script steps to generate the path and filename for the PDF:

 

Set Variable [$path ; If ( Get ( SystemPlatform ) = -2 ; "filewin:" ; "filemac:" ) &  Get ( TemporaryPath )]

Set Variable [$filename ; EVO__Evolution::EvoPrefix_calc & "_" & EVO__Evolution::LaserHeadSN_auto & "_Quality_Report.pdf" ] - (calc fields concatenated with text)

Set Variable [$savepath ; $path & $filename]

 

NOTE: this same script does not return errors when the database is run locally on my Mac.

 

I did some testing by changing the filename calculation.  Various records still returned errors, although there were now additional records that returned errors that did not before.

 

Eventually, I set the filename to "Report.pdf" so that every record would have the same filename, and at this point every record would return the "could not be created on disk" error each time the script was run.

 

I thought there must be some corruption in the database, so I ran an initial recovery which returned errors, then did a compressed copy followed by another recovery which returned no errors.

 

I then re-hosted the database and tried the revised script again, and still got errors on every record when the Save Records as PDF step was run.

 

At this point I removed the top portion of the script (Set Variables) and re-wrote them so that they were identical to the original script.  Now, some records still return the error, but only after the PDF is displayed in the PDF viewer, so the client can live with that.

 

But I'm completely confused by this inconsistency.  Any ideas?

"[FileName].fmp7 could not be created on this disk."

 

Well, it looks like you are not actually using a save as PDF script step.

  • Author

"[FileName].fmp7 could not be created on this disk."

 

Well, it looks like you are not actually using a save as PDF script step.

 

Sorry, in my haste to post this topic, I copied the text from a web search I did on the error.  The error would read, of course, "[FileName].pdf could not be created on this disk..."

You need to have a look at $savepath, so display a custom dialog.

 

You also did not post the whole script, so we can't be clear about what happens after the $var assignments.

  • 7 months later...

I’ve seen this when the path to the pdf generation folder I made on the FMServer got moved or deleted by another 'helpful' member.

 

I would agree with IdealData, is your clients $savepath identical to yours? If not, that would be the problem.

Also, does your clients FMServer have write access to the folder?

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.