why is the crystal report viewer not working at execution time [closed]
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this questionServer Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The base class includes the field 'CrystalReportViewer1', but its type (CrystalDecisions.Web.CrystalReportViewer) is not compatible with the type of control (CrystalDecisions.Web.CrystalReportViewer).
Source Error:
Line开发者_如何学编程 14: To learn more about ASP.NET visit <a href="http://www.asp.net" title="ASP.NET Website">www.asp.net</a>.
Line 15: </p>
Line 16: <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
Line 17: AutoDataBind="True" GroupTreeImagesFolderUrl="" Height="1202px"
Line 18: ReportSourceID="aaaaa" ToolbarImagesFolderUrl="" ToolPanelWidth="200px"
Source File: /Default.aspx Line: 16
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
I solved the problem. It occurs for version problem.
See at top of the page:
Have version-10.5.3700.0, change it Version=13.0.2000.0. then it works
After that it doesn't work, then close the application & restart, you get a promt message-change for new old version to new version, click yes.
if you are install the CRforVS_13_0_2.exe then you may try to follow the below coding.
<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ OutputCache Location="None" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
hope it can help you.
My problem got resolved by changing the version from 10.5.3700.0
to 13.0.2000.0
.
thanks a lot :)
精彩评论