Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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?

Posted

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

 

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

Posted

"[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..."

Posted

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...
Posted

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?

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