IBM Support

"Standard Error 1004 ... Excel cannot access the file" when click "Send to Application" inside "Reports - Run" when TMP variable is redirected to a non-C drive, caused by limitation APAR PI09114

Troubleshooting


Problem

User launches Controller, and clicks "Reports - Run". Inside "Run Reports" user chooses tab "Reports and Forms". Underneath "Forms" user chooses a form (for example "ABCD"). User clicks "Send to application".

After sending it to the application, the report shows for 1 second, then disappears.

  • An error message appears (similar to error #1).
  • In some circumstances, if the user clicks OK a second error #2 appears.

Symptom

Error #1

Example (Controller 10.4.2):

image 5142

Example (Controller 10.1.x):

Standard Error
Number: 1004
Source: Microsoft Excel
Description: Microsoft Excel cannot access the file H:\Temp\Cognos\XX_500-AC-1209-010-L2-010C2-LC-0-CONS’ There are several possible reasons:
• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name

  
Error #2:

H:\Temp\Cognos\CCR\XX_500-AC-1209-010-L2-010C2-LC-0-CONS’ cannot be found. Check your spelling, or try a different path.
------------------------------------------------------------------

NOTE:

  • If the end user launches Windows Explorer, and then navigates to the path shown in the first error message (for example H:\Temp\Cognos\CCR) then the relevant file is seen there.
  • In other words, if they open up the Excel file "XX_500-AC-1209-010-L2-010C2-LC-0-CONS.xls" (inside this folder) then the desired Excel report can be seen
    • For example, see printscreen below which corresponds to the same environment as the other printscreens in this Technote:

Cause

Limitation (reference APAR PI09114) of Controller.

Environment

The problem only affects users where *both* of the following are true:

(1) Client device using a modern version of Excel (2007 or later)

  • The problem does not affect Excel 2003

(2) The environment has been modified so that the user's %TMP% variable has been changed/redirected (from the default value) to a new drive letter (for example H:\).

  • In one real-life example, the customer was deploying Controller via Citrix, and had redirected the end user's TMP variable from the default (C:\Users\<username>\AppData\Local\Temp) to H:\TEMP

Diagnosing The Problem

On the client device, open Windows "System Properties". Click on the 'Advanced' tab and click "Environment Variables"
  • Check the value of the User variable 'TMP' for example:
image 5146

Resolving The Problem

This is a known (permanent) limitation of Controller, that will not be fixed in later versions.

  • TIP: For more information, see APAR PI09114.

Workarounds:

There are several possible methods to workaround the problem:

Method #1 - Modify the location of the user variable "TMP" to a location on the C: drive of the client device.


For example, modify %TMP% to be the default setting, which is:   %USERPROFILE%\AppData\Local\Temp

image 5147

Alternatively modify it to somewhere on the C: drive, for example similar to one the following:

  • C:\TEMP
  • C:\TMP_FILES
Method #2 - Downgrade client device to Excel 2003

If using an old (uinsupported) version of Controller, then a workaround is to downgrade from Excel 2010/2007 to Excel 2003.

Method #3 - Change the cache directory location

NOTE: This method only works in some environments.

For example, modify the Controller system so that it read/writes its temporary files to a sensible location (for example on the C: drive) where the user has no restrictions applied.

To achieve this, modify the "ccr.config" file and use the parameter "CacheDir". For details, see separate Technote 1409414.

Method #4 - Manually open the file inside the relevant folder.

For example, launch Windows Explorer and browse to: H:\Temp\Cognos\CCR\

  • Afterwards, open the relevant Excel (XLS) file from inside here.

Method #5 - (not recommended) Modify the location of the user variable "TMP" to a UNC network location


For example, modify %TMP% to be something similar to one the following:

  • \\servername\sharename\username\temp
  • \\<IP_Address>\sharename\username\temp

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS9S6B","label":"IBM Cognos Controller"},"ARM Category":[{"code":"a8m0z000000Gmx2AAC","label":"Error"}],"ARM Case Number":"TS003948611","Platform":[{"code":"PF033","label":"Windows"}],"Version":"All Version(s)","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
17 July 2020

UID

swg21632792