If you run into an issue while using ActiveReports, you will probably find the solution within this section. Click any short description below to drop down the symptoms, cause, and solution. Or click a link to another section of the troubleshooting guide.
References missing from Visual Studio Add Reference dialog
Symptoms: When you try to add references to your project, only a few of the ActiveReports references are available.
Cause: The project's target framework is set to an old version of the .NET framework that does not support the new assemblies.
Solution:
Errors after installing a new build
Symptoms: When you open a project created with a previous build of ActiveReports after installing a new build, there are errors related to being unable to find the previous build.
Cause: Visual Studio has a property on references called Specific Version. If this property is set to True, the project looks for the specific version that you had installed when you created the report, and throws errors when it cannot find it.
Solution: For each of the ActiveReports references in the Solution Explorer, select the reference and change the Specific Version property to False in the Properties Window.
The project does not work if Integrated Managed Pipeline Mode is enabled
Symptoms: The web project does not work in the application pool if Integrated Managed Pipeline Mode is enabled.
Cause: The application configuration is incorrect for being used in Integrated mode.
Solution: Migrate the application configuration. Here is a sample command.
Paste the following on the command line. |
Copy Code
|
---|---|
"%SystemRoot%\system32\inetsrv\appcmd migrate config YourWebSite/" |
GrapeCity.ActiveReports.Interop64.v12.dll is not available in the default "Add Reference" dialog
Symptoms: The GrapeCity.ActiveReports.Interop64.v12.dll is not available in the default "Add Reference" dialog.
Cause: The GrapeCity.ActiveReports.Interop64.v12.dll is located in the distribution folder.
Solution: The GrapeCity.ActiveReports.Interop64.v12.dll is located in C:\Program Files (x86)\Common Files\GrapeCity\ActiveReports 12\redist.
GrapeCity.ActiveReports.Extensiblity.v12.dll is added to the list of unused dlls in Visual Studio
Symptoms: GrapeCity.ActiveReports.Extensiblity.v12.dll is added to the references folder when the viewer is dragged and dropped on the form, however it is present in the list of unused dll in Visual Studio.
Cause: GrapeCity.ActiveReports.Extensiblity.v12.dll is used internally for certain features in ActiveReports and is present in the Global Assembly Cache. Therefore, Visual Studio can resolve the dependency and cannot find the direct references due to which it gets listed as a unused dll in Visual Studio.
Reports are not associated with the designer in Visual Studio when adding ActiveReports to a TFS-bound project
Symptoms: When adding ActiveReports to a Web site project that is bound to TFS (where reports are added to the App_Code folder), the report does not open in the designer in Visual Studio.
Cause: The FileAttributes.xml file that contains attribute information to associate ActiveReports files with the Designer is usually loaded and maintained in memory when a new ActiveReports file is added. However, if a Web site is bound to TFS, the FileAttributes.xml file is not maintained in memory. As a result, Visual Studio treats all the newly added files as normal code files.
Solution: Add the newly added reports to FileAttributes.xml manually.
Note: The FileAttributes.xml is located at C:\Documents and Settings\[username]\Local Settings\Application Data\Microsoft\WebsiteCache\[WebSite1]\ (Windows XP), or at C:\Users\[username]\AppData\Local\Microsoft\WebsiteCache\[WebSite1]\ (Windows 7).
XML code. Paste inside FileAttributes.xml |
Copy Code
|
---|---|
<?xml version="1.0" encoding="utf-16" ?> <DesignTimeData> <File RelativeUrl="App_Code/NewActiveReport1.cs" subtype="Component" /> <File RelativeUrl="Default.aspx.cs" subtype="ASPXCodeBehind" codebehindowner="Default.aspx" /> <File RelativeUrl="Default.aspx" subtype="ASPXCodeBehind" /> </DesignTimeData> |
The SystemNotSupportedException occurs when running ActiveReports with scripts on .NET Framework 4.0
Symptoms: The SystemNotSupportedException occurs when running ActiveReports with scripts on .NET Framework 4.0.
Cause: This exception occurs because of the CAS policy, which is obsolete in the .NET Framework 4.0.
Solution: To resolve this issue, the configuration file needs to be updated. To do this, in the Solution Explorer, open the app.config file (for Windows Forms applications) or the Web.config file (for ASP.NET Web applications) and add the following code.
(Windows Forms Applications) XML code. Paste inside the app.config file |
Copy Code
|
---|---|
<configuration> <runtime> <NetFx40_LegacySecurityPolicy enabled="true"/> </runtime> </configuration> |
(ASP.NET Web Applications) XML code. Paste inside the Web.config file |
Copy Code
|
---|---|
<system.web> <trust legacyCasModel="true"/> </system.web> |
Microsoft Access OLE DB provider in a 64-bit system
Symptoms: Microsoft Access OLE DB provider, Microsoft.Jet.OLEDB.4.0 does not work on a 64-bit system.
Cause: In Visual Studio 2010, by default, projects are set to use 32 bit or 64 bit, depending on the environment on which they are run. The Microsoft Access OLE DB provider, Microsoft.Jet.OLEDB.4.0, is not compatible with 64 bit, so it fails with Visual Studio 2010 on a 64-bit system.
Solution: To avoid this situation, change the project settings to use only 32 bit.
The printing thread dies before the report finishes printing
Symptoms: The printing thread dies before the report is printed.
Cause: If printing is done in a separate thread and the application is shut down right after the print call, the separate thread dies before the report is printed.
Solution: Set the usePrintingThread parameter of the Print() method to False to keep the printing on the same thread. This applies to all Page reports, RDL reports and Section reports.
C# code. |
Copy Code
|
---|---|
document.Print(false, false, false); |
Visual Basic code. |
Copy Code
|
---|---|
document.Print(False, False, False) |
Exception thrown when using Viewer.Print to print a report
Symptoms: An exception is thrown when the Viewer.Print method is used to print a report.
Cause: Print method was called before the page was loaded completely.
Solution: Use the Viewer.Print method in the LoadCompleted event.
ActiveReports controls do not appear in the toolbox
Symptoms: ActiveReport controls do not appear in the toolbox even when they are added manually using the steps in Adding ActiveReports Controls.
Cause: The project is using .NET 2.0 or lower.
Solution: Confirm if the project is using .NET 3.5 or later. .NET 2.0 is not supported in ActiveReports.
Error occurs while working with Open reports from server
Symptoms: An error occurs while working with Open reports from server dialog.
Cause: The GrapeCity.ActiveReports.ArsClient.v12.dll and Newtonsoft.Json.dll is not accessible from your system.
Solution: While working with Open reports from server dialog, make sure you have access to GrapeCity.ActiveReports.ArsClient.v12.dll and Newtonsoft.Json.dll on your system. By default, in ActiveReports, the GrapeCity.ActiveReports.ArsClient.v12.dll
is located at C:\Program Files (x86)\Common Files\GrapeCity\ActiveReports 12. For Newtonsoft.Json.dll,
see http://www.newtonsoft.com/json for obtaining the assembly.
Error occurs while previewing remote reports through code
Symptoms: An error occurs while previewing remote reports through code.
Cause: The Newtonsoft.Json.dll is not accessible from your system.
Solution: While previewing remote report from ActiveReports Server through code, make sure you add a reference to Newtonsoft.Json.dll
in your project. For more information, see http://www.newtonsoft.com/json for obtaining the assembly.
Toolbox issues in Visual Studio 2008, 2010, 2012, 2013, and 2015
Symptoms: It is observed that the ActiveReports tab with the Designer control may appear in the Visual Studio Toolbox even after ActiveReports is uninstalled. However, if you perform Reset Toolbox, the ActiveReports tab gets removed from the Visual Studio Toolbox.
Cause: This issue occurs because Visual Studio cache files get corrupted.
Solution: You need to delete toolbox cache files. Removing all .tbd files cleans up the corrupted cache, so the toolbox gets reset when you restart Visual Studio.
Blank pages printed between pages, or a red line appears in the viewer
Symptoms: Blank pages are printed between pages of the report.
Cause: This problem occurs when the PrintWidth plus the left and right margins exceeds the paper width. For example, if the paper size were set to A4, the PrintWidth plus the left and right margins cannot exceed 8.27"; otherwise blank pages will be printed. At run time, ActiveReports marks a page overflow by displaying a red line in the viewer at the position in which the breach has occurred.
Solution: Adjust the PrintWidth in the report designer using either the property grid or by dragging the right edge of the report. Adjust page margins, height, and width either through the print properties dialog box (in the Report menu under Settings), or programmatically in the Report_Start event.
Copying reports results in stacked controls
Symptoms: A report file copied into a new project has all of its controls piled up at location 0, 0.
Cause: The report has become disconnected from its resource file. When you set a report"s Localizable property to True, the Size and Location properties of the report"s controls are moved to the associated *.resx file, so if you copy or move the report, you must move the *.resx file along with it.
Solution: When you copy a report"s *.vb or *.cs file from one project's App_Code folder into the App_Code folder of a new project, you need to also copy its *.resx file from the original project"s App_GlobalResources folder into the new project's App_GlobalResources folder.
No data appears in a report containing the OleObject control
Symptoms: No data appears in a report containing the OleObject control.
Cause: This issue occurs when the Microsoft .NET Framework 4.5.2 or above is used and the useLegacyV2RuntimeActivationPolicy attribute is not set to True.
Solution: Open the app.config file and set the useLegacyV2RuntimeActivationPolicy attribute to true.
XML code. Paste INSIDE the app.config file. |
Copy Code
|
---|---|
<configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="MyRunTimeVersion"/> </startup> </configuration> |
An error message appears in the Fields list
Symptoms: An error message is displayed in the Fields list in the Report Explorer instead of the fields.
Cause: This is an expected error if no default value is given for a parameter. If the field is a data type other than text, memo, or date/time in Access, the report still runs normally.
Solution: To display the fields in the Fields list in the Report Explorer, supply a default value for the parameter in the Properties Window, or in the SQL query as below:
SQL Query |
Copy Code
|
---|---|
<%Name | PromptString | DefaultValue | DataType | PromptUser%> |
Only the Name parameter is required. To use some, but not all, of the optional parameters, use all of the separator characters but with no text between one and the next for unused parameters. For example:
SQL Query |
Copy Code
|
---|---|
<%Name | | DefaultValue | |%> |
An unhandled exception of type "System.Data..." occurs when the report is run
Symptoms: When the report is run, an exception like the following occurs: "An unhandled exception of type "System.Data.OleDb.OleDbException" occurred in system.data.dll"
Cause: If the field is a text, memo, or date/time data type in Access, the parameter syntax requires single quotes for text or memo fields, or pound signs for date/time fields. Please note that for different data sources, these requirements may differ.
Solution: To avoid the exception when the report is run against an Access database, use pound signs for date/time values, or single quotes for string values in your SQL query, for example:
SQL Query |
Copy Code
|
---|---|
#<%InvoiceDate | Choose invoice date: | 11/2/04 | D | True%># |
or
SQL Query |
Copy Code
|
---|---|
"<%Country | Country: | Germany | S | True%>" |
User is prompted for parameters for subreports even though they are supplied by the main report
Symptoms: The parameter user interface pops up at run time asking for a value even though the main report is supplying the parameter values for the subreports.
Cause: The default value of the ShowParameterUI property of the report is True.
Solution: Set the ShowParameterUI property of the report to False. This can be done in the property grid or in code in the ReportStart event.
The viewer shows the report on the wrong paper size
Symptoms: In the viewer, the report renders to a different paper size than the one specified.
Cause: ActiveReports polls the printer driver assigned to the report to check for clipping, margins, and paper sizes supported by the printer. If the paper size specified for the report is not supported by the printer, ActiveReports uses the printer's default paper size to render the report.
Solution: If the report is to be printed, the printer assigned to the report must support the paper size and margins. Please note that any changes to the print settings in code must be made in or before the ReportStart event. To use custom paper sizes not supported by the driver, set the PrinterName to an empty string to use the ActiveReports virtual print driver. This does not allow printing, but is recommended for reports that are only exported or viewed. This prevents ActiveReports from making a call to the default printer driver. Use the following code in the ReportStart event, or just before .Run is called.
C# code. Paste INSIDE the ReportStart event. |
Copy Code
|
---|---|
this.Document.Printer.PrinterName = ''; |
Visual Basic.NET code. Paste INSIDE the ReportStart event. |
Copy Code
|
---|---|
Me.Document.Printer.PrinterName = '' |
The PaperHeight and PaperWidth properties, which take a float value defined in inches, have no effect unless you set the PaperKind property to Custom. Here is some sample code which can be placed in the ReportStart event, or just before .Run.
C# code. Paste INSIDE the ReportStart event. |
Copy Code
|
---|---|
this.PageSettings.PaperKind = Drawing.Printing.PaperKind.Custom; this.PageSettings.PaperHeight = 2; //sets the height to two inches this.PageSettings.PaperWidth = 4; //sets the width to four inches |
Visual Basic.NET code. Paste INSIDE the ReportStart event. |
Copy Code
|
---|---|
Me.PageSettings.PaperKind = Drawing.Printing.PaperKind.Custom Me.PageSettings.PaperHeight = 2 'sets the height to two inches Me.PageSettings.PaperWidth = 4 'sets the width to four inches |
Custom paper sizes do not work
Symptoms: Custom paper sizes do not work.
Cause: You can create more than one custom paper size, so setting only the PaperKind property is not enough to create a custom paper size.
Solution: In addition to setting the PaperKind property to Custom, you must also set the PaperName property to a unique string.
An expression containing a numeric field name does not display any data at run time.
Symptoms: An expression containing a numeric field name does not display any data at runtime.
Cause: Visual Basic syntax does not allow an identifier that begins with a number.
i.e. =Fields!2004.Value
Solution: Make the numeric field name a string.
i.e. =Fields("2004").Value
or, =Fields.Item("2004").Value
DataSet field in PageHeader of an RDL report
Symptoms: Cannot set a dataset field (bound field) in the PageHeader of an RDL report.
Cause: ActiveReports is based on the RDL 2005 specifications, therefore, referencing datasets in the PageHeader of an RDL report is not supported.
Solution: There is no direct way to add a DataField in a PageHeader, however, as a workaround you can create a hidden report parameter that is bound to your dataset and has the default value set to your expression. For example, ="*" & First(Fields!name.Value)
. You can then use this parameter in the page header.
Alternatively, you can use a Page report, which lets you place data fields anywhere on a page.
Exception thrown when using Viewer.Document property
Symptoms: An exception is raised when Viewer.Document is used with a page report or RDL report.
Cause: Document property is available for section reports only.
Cannot add assembly reference created in .NET Framework 4.0 or above in PageReports/RDLReports
Symptoms: Cannot add assembly reference created in .NET Framework 4.0 or above in PageReports/RDLReports of the stand-alone designer application.
Cause: The Stand-alone Designer application was created using the .NET 3.5 framework, therefore it cannot load .NET 4.0 assemblies.
Swfobject undefined error
Symptoms: With the Flash viewer, my page throws a swfobject is undefined error.
Cause: The ActiveReports Handler Mappings are not set up correctly in IIS 7.0.
Solution: Configure HTTPHandlers in IIS 7.x.
IOError while loading document. Error #2032
Symptoms: When running the Flash viewer in IIS, an error occurs with the following message: "IOError while loading document. Reason: Error #2032."
Cause: The ActiveReports Handler Mappings are not set up correctly in IIS or in the web.config file.
Solution: Update Configure HTTPHandlers in IIS 7.x or if that is already done, ensure that the handlers are enabled in your web.config file.
FireFox displays white pages
Symptoms: When running the Flash viewer in FireFox, reports display white pages, but Internet Explorer renders reports correctly.
Cause: The height and width of the Flash viewer control is set to 100%. FireFox does not support this setting, so it does not resize the Flash Viewer at all.
Solution: Use cascading style sheets (CSS) to set the properties.
To use CSS in your Flash viewer ASPX
ASPX CSS code |
Copy Code
|
---|---|
<style type="text/css"> html, body, #WebViewer1, #WebViewer1_controlDiv { width: 100%; height: 100%; margin: 0; } </style> |
To use an external CSS file
ASPX CSS code. Paste in the external CSS file |
Copy Code
|
---|---|
.report-viewer, .report-viewer div, .report-viewer object {height: 100%; width: 100%;} |
Cannot load an rdf file in Flash Viewer using client scripting
Symptoms: An rdf file is not loaded in Flash Viewer when using client scripting.
Cause: You have to modify the setting of IIS Express to allow an rdf file to load correctly when using client scripting.
Solution: There are two ways to resolve this issue.
Open a Command Prompt window. Navigate to the IIS Express installation folder (the default location of this folder is C:\Program Files\IIS Express) and run the following command.
Paste the following on the command line |
Copy Code
|
---|---|
appcmd set config /section:staticContent /+[fileExtension='.rdf',mimeType='application/octet-stream'] |
The other one is to modify the IIS Express configuration file.
Paste inside the IIS Express configuration file to the staticContent node |
Copy Code
|
---|---|
<mimeMap fileExtension=".rdf" mimeType="application/octet-stream" /> |
JScript error while using the Silverlight Viewer in Silverlight 5
Symptoms: When using the Silverlight Viewer in Silverlight 5, the JScript error may occur with the following message: "Unhandled Error in Silverlight Application The invocation of the constructor on type 'DataDynamics.ActiveReports.Viewer' that matches the specified binding constraints threw an exception."
Cause: The Silverlight Viewer is based on Silverlight 4, and it adds reference to System.Windows.Controls.dll (2.0.5.0). In Silverlight 5, adding the Silverlight Viewer control does not automatically add reference to System.Windows.Controls.dll to the project because the Silverlight Viewer adds reference to the Silverlight 4 version.
Solution: Add a reference to System.Windows.Controls.dll (in Silverlight 4 SDK or Silverlight 5 SDK) to the project.
Pan Mode does not work if the Silverlight viewer is placed in layout panels
Symptoms: Pan Mode does not work in horizontal/vertical directions, if the Silverlight viewer is placed in layout panels such as StackPanel, Canvas etc.
Cause: The default size of the Silverlight viewer is set to infinite according to the layout panel properties.
Solution: Go to the properties window and set a custom value in the Height and Width property of the layout panel.
Cannot load an rdf file in Silverlight Viewer
Symptoms: An rdf file is not loaded in Silverlight Viewer.
Cause: You have to modify the setting of IIS Express to allow an rdf file to load correctly.
Solution: There are two ways to resolve this issue.
Open a Command Prompt window. Navigate to the IIS Express installation folder (the default location of this folder is C:\Program Files\IIS Express) and run the following command.
Paste the following on the command line |
Copy Code
|
---|---|
appcmd set config /section:staticContent /+[fileExtension='.rdf',mimeType='application/octet-stream'] |
The other one is to modify the IIS Express configuration file.
Paste inside the IIS Express configuration file to the staticContent node |
Copy Code
|
---|---|
<mimeMap fileExtension=".rdf" mimeType="application/octet-stream" /> |
TargetInvocationException occurs when running the WPF browser application
Symptoms: When running the WPF browser application, the TargetInvocationException occurs.
Cause: The WPF browser application does not support Partial Trust.
Solution: Make sure that the WPF browser application uses Full Trust. To do that, in the Visual Studio Project menu, go to YourProject Properties and on the Security tab, under EnableClickOnce security settings, select the option This is a full trust application.
Symptoms: ActiveReports is consuming too much memory; CPU usage always goes to 100% when using ActiveReports.
Cause: There are several reasons why too much memory may be consumed:
The report is not being disposed of properly
Cause: The report is not being disposed of properly. The incorrect syntax is as follows.
C# code. |
Copy Code
|
---|---|
//Incorrect! rpt.Dispose(); rpt=null; |
Visual Basic code. |
Copy Code
|
---|---|
'Incorrect! rpt.Dispose() rpt=Nothing |
Solution: The correct syntax for disposing of a section report is as follows.
C# code. |
Copy Code
|
---|---|
//Correct! rpt.Document.Dispose(); rpt.Dispose(); rpt=null; |
Visual Basic code. |
Copy Code
|
---|---|
'Correct! rpt.Document.Dispose() rpt.Dispose() rpt=Nothing |
Machine.Config MemoryLimit setting is insufficient
Cause: Large reports in an ASP.NET application can easily use up the 60% of memory allocated to the ASP.NET worker process by default, which produces an error. In Machine.Config, MemoryLimit specifies the maximum allowed memory size, as a percentage of total system memory, that the worker process can consume before ASP.NET launches a new process and reassigns existing requests.
Solution: Set the CacheToDisk property of the document to True.
This caches the report to disk instead of holding it in memory. This setting is also detected by the PDF Export, which follows suit, but any other exports still consume memory. Although it is not advised, the ASP.NET worker process memory allocation can also be changed in your Machine.Config file, which is located in a path like: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Config\. Search the Machine.Config file for memoryLimit, which is located in the processModel.
Report never finishes processing
Cause: In some cases, very large reports can consume so much memory that the report never finishes processing. Some of the things that can cause this include:
Solution: In cases where the report is too large to run any other way, the CacheToDisk property may be set to True. This property should only be used when there is no other way to run the report to completion. Before resorting to this method, please see the Optimizing Section Reports topic.
Task manager indicates the current "working set" of the process
Cause: If inflated memory usage is seen in the Task Manager it is not necessarily in use by the code. Task manager indicates the current "working set" of the process and, upon request, other processes can gain access to that memory. It is managed by the Operating System.
Solution: For an example of some working set behavior anomalies (which are considered normal), create a WinForms application and run it. Look in Task Manager at the working set for that process (it should be several megabytes), then minimize and maximize the form and notice that the working set reclaims to <1MB. Obviously, the code was not using all that memory even though Task Manager showed that it was allocated to that process. Similarly, you'll see ASP.NET and other managed service processes continue to gradually grow their working set even though the managed code in that process is not using all of it. To see whether this is the case, try using the two lines of code below in a button Click event after running the project.
System.Diagnostics.Process pc = System.Diagnostics.Process.GetCurrentProcess();
pc.MaxWorkingSet = pc.MinWorkingSet;
If that reclaims the memory then the Operating System trimmed the working set down to the minimum amount necessary and this indicates that the extra memory was not actually in use.
The WebViewer will not print without displaying the report
Symptoms: The WebViewer will not automatically print a report without displaying it.
Cause: Only the new FlashViewer ViewerType of the WebViewer offers this functionality.
Solution:
PDF opens in a new window when an application contains the WebViewer
Symptoms: When using Internet Explorer and Acrobat Reader to view a page containing a WebViewer in PDF mode, the resulting PDF always opens in a new window.
Cause: Acrobat Reader is only available in a 32-bit version. When the 64-bit version of Internet Explorer is used, it opens up an instance of the 32-bit version of Internet Explorer so that the plug-in and the PDF can load, rendering the resulting PDF in a new window.
Solution:
The report in the HTML viewer type does not look exactly like the other viewer types
Symptoms: The report in the HTML viewer type does not look exactly like the other viewer types.
Cause: The HTML format is not WYSIWYG. It does not support the following items:
Solution: Try to avoid using the above items in reports which are shown in HTML format.
Blank reports with the AcrobatReader viewer type on the production web server
Symptoms: In the WebViewer, reports render correctly with the HTML ViewerType but they show up blank with the AcrobatReader ViewerType on the production web server.
Cause: .ArCacheItem is not set up in your IIS extension mappings.
Solution:
Issue while previewing reports in HTML5 using redirection
Symptoms: When a url, such as an image path, a drill-through path, or a toggle path in a report points to an intranet location, the element specified in the url is not displayed properly.
Cause: One server can not access the paths specified from another server. For example, when HTML5 Viewer gets the report in HTML, the images use the img element and the src attribute of the image is built on the server side which uses default intranet url instead of the internet url.
Solution: Use HTML5 viewer together with reverse proxy or other redirection environment by specifying the following settings:
Paste inside the index.html file |
Copy Code
|
---|---|
reportService: { url: 'http://reverse-proxy.com'; };
|
See Using Javascript for more information.
XML code. Paste inside the Web.config file |
Copy Code
|
---|---|
<ActiveReports12>
<WebService publicURI="https://reverse-proxy.com"/>
</ActiveReports12>
|
See ReportService Settings for more information.