ActiveReports for .NET 3 Online Help Request technical support
Troubleshooting the WebViewer
See Also
User Guide > Troubleshooting > Troubleshooting the WebViewer

Glossary Item Box

Symptoms: In the WebViewer, reports render correctly with the HTML viewer type but they show up blank with the AcrobatReader viewer type on the production web server.

Cause: .ArCacheItem is not set up in your IIS extension mappings.

Solution:

  1. From the Start menu, choose Control Panel> Administrative Tools> Internet Information Services.
  2. Right-click your Default Web Site and choose Properties.
  3. On the Home Directory tab, click the Configuration button.
  4. On the Mapping tab, check the Extension column to see whether .ArCacheItem appears.
  5. If .ArCacheItem does not appear click the Add button.
  6. Browse to <Windows>\Microsoft.NET\Framework\v1.1.4322 or v2.0.50727.
  7. Change Files of type: to Dynamic Link libraries (*.dll).
  8. Choose the aspnet_isapi.dll and click Open.
  9. In the Extension textbox type ".ArCacheItem".
  10. Click the Limit to: radio button and type "GET,HEAD,POST,DEBUG".
  11. Make sure that the "Script engine" check box is selected and the "Check that file exists" check box is not.
  12. Click OK.

Symptoms: "Error Creating Control - Webviewer" appears on the WebForm in place of the WebViewer control.

Cause: There is a version conflict within the project.

Solution:

  1. Open the WebForm and look in the HTML view for a line that looks similar to the following and remove it.

    <%@ Register TagPrefix="activereportsweb" Namespace="DataDynamics.ActiveReports.Web" Assembly="ActiveReports.Web, Version=5.0.0.84, Culture=neutral, PublicKeyToken=cc4967777c49a3ff"%>

  2. Go to the code behind the WebForm and remove the following line from the Web Form Designer Generated Code.

    Protected WithEvents WebViewer1 As DataDynamics.ActiveReports.Web.WebViewer

  3. In the Solution Explorer, under References, right click and Remove the ActiveReports.Viewer and ActiveReports.Web references.
  4. Delete the control from the WebForm.
  5. Add back the references for ActiveReports.Viewer and ActiveReports.Web, making certain that the Version number is the same as the currently installed version.
  6. Add the WebViewer back to the WebForm.
  7. Open the Web.config file in the solution, and scroll down to the httpHandlers tag near the bottom. There are three add verb tags on that line which indicate the Version. These need to be updated with the version number of the currently installed version.

Symptoms:

Cause: The httpHandlers in the Web.config file are missing or referencing the wrong version.

Solution: Make sure that the following HTTP Handler code is in the Web.config file and that the version is current.

<httpHandlers><add verb="*" path="*.ArCacheItem" type="DataDynamics.ActiveReports.Web.Handlers.WebCacheAccessHandler, ActiveReports.Web, Version=5.0.0.84, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" /><add verb="*" path="*.Rpx" type="DataDynamics.ActiveReports.Web.Handlers.RpxHandler, ActiveReports.Web, Version=5.0.0.84, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" /><add verb="*" path="*.ActiveReport" type="DataDynamics.ActiveReports.Web.Handlers.CompiledReportHandler, ActiveReports.Web, Version=5.0.0.84, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" /></httpHandlers>


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 will be shown in HTML format.


Symptoms:

Cause: If the control is being loaded in response to a client postback, the Report property will not run the specified report. Instead it uses a previously cached copy of the report's Document in the WebCache service to supply speedy responses to clients. 

Solution: To force the client to use a new instance, call the ClearCachedReport method before setting the Report property.


Symptoms: The WebViewer will not automatically print a report without displaying it.

Cause: The WebViewer provides convenience in automating many of the steps involved in providing a reporting solution, but the cost of this automation is a loss of control of these steps.

Solution: In order to provide no touch printing in ASP.NET, stream the file to the ActiveX viewer control and then print using vbscript in the ASP code (not the ASP code behind).

  1. Place the ActiveX Control on the page as an object. Setting the version to -1,-1,-1,-1 forces Internet Explorer to check for updates each time the page is rendered. Setting the height and width to 0 allows you to print the report without displaying it. Here is the code that goes in the ASPX page.

    <OBJECT id=arv codeBase=bin/arview2.cab#version=-1,-1,-1,-1 height=0 width=0 classid=CLSID:8569d715-ff88-44ba-8d1d-ad3e59543dde>

  2. Load the data into the report. Set the DataPath of the viewer object. This can be anything from a byte array to a hard coded path.

    <script language=vbscript> <!-- sub window_onload() arv.datapath = "Default.aspx?ReturnReport=1" end sub

  3. Print the report. This is done by syncing the LoadCompleted event of the viewer. Inside a call is made to the Viewer's PrintReport method with False indicating that no UI is to be displayed.

    sub arv_loadcompleted() arv.PrintReport False end sub --> </script>

See Also

©2009. All Rights Reserved.