Skip to Content
N B

Programmatically change Crystal's working folder (C:\Windows\Temp) to another in order to prevent having to set permissions on C:\Windows\Temp

We are using the CrystalDecisions.CrystalReports.Engine.ReportDocument in Crystal Reports 2008 SP2 to run reports.

Is there a way to change the Crystal scratch pad folder from C:\Windows\Temp so I do not have to grant users rights to C:\Windows\Temp?

I looked at this discussion: http://scn.sap.com/thread/1723838

but the solution for that person was to modify permissions to have access to the C:\Windows\Temp folder.

We do not want to modify permissions on this system folder. We would like our program to create the temporary work file in a non-system folder (that we specify) vs. the C:\Windows\Temp folder when building a report, and then we can grant the proper permissions to this non-system folder.

Is there anyway to do this?

Thank you.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Nov 09, 2012 at 01:56 PM

    Hi,

    The location of the temp folder (for CR temp file generation) is set in windows environment variable %TEMP%.

    Whatever location is set for %TEMP% variable in windows environment variables, CR temp files get generated there.

    Changing the Windows Environment variable path is out of the scope of the CR SDKs.

    So, No. there are no APIs to change the location for CR temp file generation.

    However, see if you could develop your custom logic in .NET to change the path of the %TEMP variable.

    See this post http://scn.sap.com/thread/3196294

    - Bhushan

    Follow us on Twitter

    Got Enhancement ideas? Try the SAP Idea Place

    Getting started and moving ahead with Crystal Reports .NET applications.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 13, 2012 at 02:24 PM

    Thank you.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.