Errors when file cache is enabled

johnnixjohnnix Serrai, Greece
edited 2:21AM in FastReport 4.0
Hello,

For some time now I noticed that in some Windows 7 systems when a user is trying to create a report he gets a strange error like "The following error(s) have occured: Canot open file "C:\Program Files (x86)\xxxxxxx\#@$%$$#^";. The filename, directory name or volume label syntax is incorrect" where xxxxxxx is the application installation directory. This error does not appear when I set file cache to false so I know it has to do with the temporary files FR tries to create, correct? How can I overcome this automatically I mean is there a way to know that FR will not be able to create the file cache?

Kindest regards

Comments

  • gpigpi
    edited 2:21AM
    Try to set permissions for full access for all users for "C:\Program Files (x86)\xxxxxxx\#@$%$$#^"; folder
  • johnnixjohnnix Serrai, Greece
    edited 2:21AM
    gpi wrote: »
    Try to set permissions for full access for all users for "C:\Program Files (x86)\xxxxxxx\#@$%$$#^"; folder

    Thank you for your reply but lots of my users work under strict users policy which they cannot change. Is there a way for me to internally test that permissions are ok and enable/disable this feature by code?
  • Kim GreveKim Greve Albertslund, Denmark
    edited 2:21AM
    johnnix wrote: »
    Hello,

    For some time now I noticed that in some Windows 7 systems when a user is trying to create a report he gets a strange error like "The following error(s) have occured: Canot open file "C:\Program Files (x86)\xxxxxxx\#@$%$$#^";. The filename, directory name or volume label syntax is incorrect" where xxxxxxx is the application installation directory. This error does not appear when I set file cache to false so I know it has to do with the temporary files FR tries to create, correct? How can I overcome this automatically I mean is there a way to know that FR will not be able to create the file cache?

    Kindest regards

    The program files folder has restricted access. So if you want to save temp files in Program Files folder you have to change NTFS settings, but why don't you use the TEMP folder for these temporary files instead.

    You can get the path to the TEMP folder with the GetTempPath function.

    And then set frxReEport1.EngineOptions.TempDir to the default TEMP folder.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.