Category Archives: Reporting Services

Error installing OfficeWriter for Reporting Services 2012 in SharePoint integrated mode

Problem

When installing OfficeWriter for SQL Server Reporting Services 2012 in SharePoint mode (SharePoint 2010), the OfficeWriter installer aborts with message:

SoftArtisans OfficeWriter Setup Wizard ended prematurely because of an error. Your system has not been modified. To install this program at a later time, run Setup Wizard again. Click the Finish button to exit the Setup Wizard.

Solution

Starting in SQL Server 2012, the SharePoint integration for Reporting Services was re-architectured: SSRS 2012 is configured as a shared service against SharePoint 2010. Configuration information is stored in a database and can be managed through SharePoint Central Administration or with Powershell.

Due to this change in architecture, the OfficeWriter installer is not currently equipped to run against SSRS 2012 in SharePoint integration mode. We will be adding support for this configuration to the OfficeWriter installer in a future release.

Update 4/11/2013: Instructions for manually installing OfficeWriter in this configuration are now available in our documentation: Manual Installation for SSRS 2012 with SharePoint 2010. The fix to the installer will be available in a soon to be released version of OfficeWriter.

Note:

This does not happen outside of SSRS 2012 with SharePoint 2010. OfficeWriter has full compatibility with SQL Server Reporting Services 2012 in native mode starting in v8.2. OfficeWriter also works with other combinations of SSRS and SharePoint.

Designer Install Error: No Office 2007 or 2010 found

Problem

Installing the OfficeWriter Designer 8.1.0 and higher throws the error:

No Office 2007 or 2010 found. Office 2007 or later must be installed to use this product. If you are using an earlier version of Office please download the installer version 8.0 or earlier.

Solution

Office 2010 is installed

This error may occur if you have the 64-bit version of Office 2010 installed.

The OfficeWriter Designer does not currently support the 64-bit version of Office 2010. There are no immediate plans to support the 64-bit version of Office 2010 because we have not seen much demand from customers and Microsoft recommends using the 32-bit version in most cases:

IMPORTANT The 32-bit version of Office 2010 is the recommended option for most people because it prevents potential compatibility issues with other 32-bit applications, specifically third-party add-ins that are available only for 32-bit operating systems. — Choose the 32-bit or 64-bit version of Microsoft Office.

The OfficeWriter Designer is supported on 64-bit operating systems, but requires a 32-bit version of Office. If no 32-bit version of Office 2007 or 2010 is detected on the machine, the installer will throw the error above.

Office 2003 is installed

Starting in OfficeWriter 8.1, the OfficeWriter Designer is only supported in Office 2007 and 2010. If you need to use the Designer in an earlier version of Office, please download OfficeWriter Designer 8.0 or earlier.

No Office is installed

The OfficeWriter Designer is an Office add-in and requires a 32-bit version of Office to be installed.

Designer Error: Could not load an object because it is not available on this machine

Problem

After installing the OfficeWriter Designer for Office 2007 or 2010, Excel or Word throws the following error three times when opened:

Could not load an object because it is not available on this machine.

Following the instructions in Designer throws compile error after installing Microsoft August 2012 updates to re-register MSCOMCTL.OCX do not resolve the issue.

Solution

In August 2012, Microsoft released Security Bulletin MS12-060 which targeted a security vulnerability in the Microsoft Common Controls SP6 (MSCOMCTL.OCX). As part of the security update, a new version of the library was distributed to all Office 2010 SP1, Office 2007 SP2 and Office 2007 SP3 installations.

The OfficeWriter Designer requires the new version of MSCOMCTL.OCX. If the older version is present, the above error will occur.

To resolve this issue:

This will require admin privileges and we recommend that you consult your IT staff before applying these updates.

1. Install the appropriate service pack to Office 2007 or 2010:

If the latest service pack is not applied, the new version of MSCOMCTL.OCX will not be installed on the machine, even if the security update is run.

To verify that the installation completed successfully, follow the instructions in this How to tell which Office service pack is installed blog post.

2. Download and install the version of the update for your version of Office:

3. If you experience a compilation error when you open Office, try following the instructions in Designer throws compile error after installing Microsoft August 2012 updates to re-register MSCOMCTL.OCX.

Additional Help – Installing Service Packs

Before you can install the service pack, you may need to clear some disk space. Microsoft has an article on Strategies for freeing disk space, which suggests that you Delete files using the Disk Cleanup tool. If you are working on a server OS, such as Windows Server 2008, the Disk Cleanup tool may not be installed. Instructions for how to install the Disk Cleanup tool are outlined in this MSDN forum post.

Designer Compile Error: Cannot run the macro ‘OnLoad’

Problem

After installing Microsoft’s August 2012 security updates on a machine with the OfficeWriter Designer installed, you may encounter the following:

Office 2003, 2007, or 2010 throws an error when opening: Compile error: Automation error Unspecified Error followed by Cannot run the macro ‘OnLoad.’ The macro may not be available in this workbook or all macros may be disabled.

Details

One of the Microsoft August 2012 security updates targeted a vulnerability in Windows Common Controls: MS12-060 – Vulnerability in Windows Common Controls.

On the detail page (2720573), it mentions that there is a known issue with all versions of Office when installing this update:

“Windows Common Control-based embedded Active-X controls may fail to load within pre-existing office documents, within third-party applications, and when you insert new controls in developer mode.”

This affects the OfficeWriter Designer as well.

Update

Alternate error message:

Compile error: Automation error Unspecified error

This may also affect customers who switch between Word 2007 and Word 2010. When you switch back to Word 2007, this error may be re-introduced and you will need to follow the solution steps again.

Solution

To resolve this issue, MSCOMCTL.OCX must be re-registered on the machine:

1. Run the command prompt as Administrator

2. Register MSCOMCTL.OCX:

  • For 64-bit operating systems, type the following: Regsvr32 “C:\Windows\SysWOW64\MSCOMCTL.OCX”
  • For 32-bit operating systems, type the following: Regsvr32 “C:\Windows\System32\MSCOMCTL.OCX”

3. A computer restart may be necessary

For more information about resolving this issue, please refer to the following Microsoft KB articles for Office 2010Office 2007, or Office 2003.

Reporting Services Error: The following bookmark cannnot be found in the template

Problem

When rendering an OfficeWriter for Word Reporting Services report, after removing all bookmarks from the template for a specific data source, the following error occurs:

Reporting Services Error ---------------------------------------------------------- An error occurred during rendering of the report. (rrRenderingError) Get Online Help An error occurred during rendering of the report. WordWriter Error: The following bookmark can't be found in the template: DataSourceName The following bookmark can't be found in the template: DataSourceName -------------------------------------------------------------------------------- SQL Server Reporting Services 

For example, someone may decide to remove a table of data from their report which they no longer want to display. To do this, they would delete the table, thereby removing the merge fields in it and the bookmark around the table row that defined the Selection Query Range for that data source.

Solution

As mentioned above, this error occurs when a Selection Query Range is defined for a data source and then removed from the template. Once a Selection Query Range for a data source is added to the template using the OfficeWriter Designer toolbar, a bookmark is added to the template to define what portion of the document should repeat and that data source is linked to the template in the report’s RDL file. If all the bookmarks for this data source are then removed from the template, the references to that data source in the RDL file that the Designer added are not automatically removed.

This behavior is planned to change in a future version, so that it will be possible to define a Selection Query Range for a data source in a template, and then later decide to remove it. In the meantime, there are two workarounds to this issue:

Remove the relevant block from the RDL for the data source that is no longer used

Important: Back up your RDL file before making manual changes to it in case you make a mistake.

For each data source used in the template, the OfficeWriter Designer adds a DataSourceName">... block in the RDL file.

If a data source is no longer used in the template, simply open the RDL file in a text editor and remove the correspoding Table block.

For example, if you want to remove this block for a data source called Contacts, look for the ... block and delete it.

Design your report from scratch

Build a new report from scratch (both RDL and Word template). When designing the template, be careful to only add Selection Query Ranges for data sources that will definitely be used in the report. (Don’t plan on removing all the bookmarks for any data source.)

Designer Error: Type Mismatch

Problem

Selecting Open Report in the OfficeWriter Designer toolbar in Excel displays a type mismatch error.

The type mismatch error occurs when a client machine is configured with regional settings that cause Excel to return it’s version number in a format the designer does not expect. For example, French regional settings by default use the space (” “) digit grouping symbol.

Solution

Option 1: Upgrade (recommended)

This issue has been fixed in the OfficeWriter Designer version 4.6.1 and later without the need to adjust regional settings.

Option 2: Adjust the current regional settings for the OS

Navigate to the systems control panel > regional settings. Depending on your operating system this may appear as:

  • Region and Language
  • Date, Time, Language, and Regional Options
  • Select either Customize or Advanced settings

Change the Digit grouping symbol to “.” excluding quotes, or other symbol that does not cause an error. Then apply changes.

OfficeWriter Designer toolbar is not visible in Excel or Word

Problem

After installing the OfficeWriter Designer, the Designer Add-In is not available in Excel/Word. This may occur if:

  • The OfficeWriter Designer installer was not run
  • The Designer was not installed properly
  • The Designer is currently disabled.

Solution

To run the OfficeWriter Designer installer

The OfficeWriter Designer is a component that is redistributible and does not require a license key. There is a separate installer for the OfficeWriter Designer.

The Designer installer is available for separate download from http://www.officewriter.com/product-updates or upon request.

To check if the OfficeWriter Designer was installed correctly:

Make sure that hidden folders are visible:

  • Open a folder and go to Folder options
  • Under ‘Files and Folders’ locate ‘Hidden Files and Folders’
  • Select ‘Show hidden files and holders’

Check the ApplicationData\Microsoft start directories for the Add-In files:

  • For Excel: look for SAExcelTemplateAddIn.xlam in Application Data\Microsoft\Excel\XLSTART
  • For Word: look for SAWordTemplateAddIn.dotm in Application Data\Microsoft\Word\STARTUP

If the files are there, the OfficeWriter Designer was installed correctly, but might be disabled. See below for how to re-enable the Designer if it’s been disabled.

If the files are not there, then the OfficeWriter Designer was not installed properly. Try uninstalling the OfficeWriter Designer through Add/Remove programs and try to re-install.

How to re-enable the Designer if it has been disabled:

Office 2007/2010:

  • Go to the Office menu button (2007) or File tab (2010) in the upper left hand corner.
  • Click Excel/Word Options
  • Select Add-Ins from the left menu
  • At the bottom, select ‘Disabled Items’ from the ‘Manage’ drop-down menu.
  • Click Go
  • If the OfficeWriter Designer is there, select and click Enable.

Office 2003:

  • Go to the Help menu and select About Microsoft Office Excel/Word
  • Click Disabled items*
  • If the OfficeWriter Designer is listed, select and click Enable.

Reporting Services Error: Could not load file or assembly ‘x’ or one of its dependencies

Problem

You want to use a newer version of ExcelWriter or WordWriter with OfficeWriter’s Reporting Services integration. A common scenario is upgrading to an intermediate build of ExcelWriter or WordWriter which fixes a bug or adds a new feature.

To provide context, OfficeWriter’s Reporting Services integration consists of the following components:

  • ExcelWriter (SoftArtisans.OfficeWriter.ExcelWriter.dll)
  • WordWriter (SoftArtisans.OfficeWriter.WordWriter.dll)
  • A custom rendering extension (SoftArtisans.OfficeWriter.RS2008.dll for SQL Server Reporting Services 2008)

When upgrading to a different version of ExcelWriter or WordWriter, normally you also have to upgrade to the matching version of the custom rendering extension. This is because the custom rendering extension is built against a specific version of ExcelWriter and WordWriter and only works with that version. If the version of ExcelWriter or WordWriter does not match the version of the custom rendering extension, you will get this error when exporting the report using ExcelWriter or WordWriter:

Could not load file or assembly ‘x’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference.

If you are performing a regular upgrade in which you replace the custom rendering extension DLL as well as the ExcelWriter or WordWriter DLL, use the manual installation instructions as a guideline.

However, if there are no changes to the custom rendering extension, it is convenient to use the same custom rendering extension DLL and replace just the ExcelWriter or WordWriter DLL. This approach also allows you to easy test any version of the ExcelWriter or WordWriter DLL. In this case, follow the below instructions.

Solution

To upgrade the ExceWriter or WordWriter DLL without having to replace the custom rendering extension, you can create an assembly binding redirect so that request for the old DLL are redirected to the new DLL.

The solution is also applicable to any ASP.NET application for which you want to replace a dependent assembly with another version. Use the instructions below as guidelines for making modifications to the application’s web.config.

The process for creating an assembly binding redirect is slightly different for ExcelWriter and WordWriter, because by default WordWriter is installed into the Global Assembly Cache (GAC).

Upgrading ExcelWriter

1. Navigate to the Reporting Services directory, typically `DRIVE:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services’

2. Copy SoftArtisans.OfficeWriter.ExcelWriter.dll to ReportServer\bin, replacing the existing DLL

3. Determine the version of the new DLL; for example, 7.5.1.2770

4. Edit ReportServer\web.config and add the following section under the section:

XML Config Script

 <configuration>     <runtime>         <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">             <dependentAssembly>                 <assemblyIdentity name="SoftArtisans.OfficeWriter.ExcelWriter" publicKeyToken="f593502af6ee46ae" culture="neutral" />                 <bindingRedirect oldVersion="7.5.0.1-7.5.1.9999" newVersion="7.5.1.2770"/>             </dependentAssembly>         </assemblyBinding>     </runtime> </configuration> 

Note: If there is an existing section, add only the  section inside it, so that there is only one assembly binding definition.

In the example above, set the newVersion attribute to the version of the new DLL. Set the oldVersion attribute to a single version or a range of versions which are to be mapped to the new version.

5. Perform the same steps for ReportServer\bin\ReportingServicesService.exe.config

6. Restart the Report Server

Upgrading WordWriter

If WordWriter is installed in the GAC, as done by the installer, you must also install the new DLL into the GAC. Because the GAC supports multiple versions of a DLL, you do not have to uninstall the old DLL. However, by using assembly binding redirect, you can force Reporting Services to use the new DLL. Follow the procedure below to upgrade WordWriter:

1. Install the new DLL into the GAC using, for example, the gacutil tool.

2. Navigate to the Reporting Services directory, typically ‘DRIVE:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services’ Copy SoftArtisans.OfficeWriter.WordWriter.dll to ReportServer\bin

3. Determine the version of the new DLL; for example, 4.5.1.1648

4. Edit ReportServer\web.config and add the following section under the section:

XML Config Script

 <configuration>     <runtime>         <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">             <dependentAssembly>                 <assemblyIdentity name="SoftArtisans.OfficeWriter.WordWriter" publicKeyToken="f593502af6ee46ae" culture="neutral" />                 <bindingRedirect oldVersion="4.5.0.1-4.5.1.9999" newVersion="4.5.0.1567"/>             </dependentAssembly>         </assemblyBinding>     </runtime> </configuration> 

Note: If there is an existing section, add only the section inside it, so that there is only one assembly binding definition.

In the example above, set the newVersion attribute to the version of the new DLL. Set the oldVersion attribute to a single version or a range of versions which are to be mapped to the new version.

5. Perform the same steps for ReportServer\bin\ReportingServicesService.exe.config

6. Restart the Report Server

If WordWriter is not installed in the GAC, skip step 1 and follow steps 2-7 in the above procedure.

Designer Compile Error: Object library invalid or contains references that cannot be found

Problem

When the OfficeWriter Designer is installed, Excel or Word throws a VBA compilation error:

Object library invalid or contains references that cannot be found.

This error can occur if you installed a version of Office on a system in which the Office Designer had already been installed for a different version of Office. For example, you were using OfficeWriter Designer with Office 2007, then later installed any component of Office 2010, including SharePoint Designer 2010 (which is a part of the Office Suite). The error does not go away even if you uninstall one Office version.

This problem will not occur if you install OfficeWriter Designer for the first time on a system which is already running two versions of Office side-by-side.

The error is thrown at startup when Excel or Word attempts to load the add-in template which contains the VBA code for the OfficeWriter Designer. Excel or Word is attempting to use a cached, incompatible version of certain Microsoft control type libraries.

Solution

Resolve the error by removing all cached control type libraries as follows:

  1. Close all running instances of Excel or Word
  2. Navigate to \users\USERNAME\appdata\roaming\microsoft\forms
  3. Remove all *.exd files
  4. Start Excel or Word. Upon starting, the compatible version of the required .exd files will be automatically restored.

Update 4/10/2012: This issue might also occur if you installed the Microsoft April 2012 security update on a machine that had the OfficeWriter Designer installed. For more details about the April 2012 security update specifically, please refer to Microsoft’s kb article.

Update 8/12/2012: Similar issues may be the result of the August 2012 security update. If following the steps listed above do not resolve the issue, please try following the steps listed in this OfficeWriter kb article.