PDA

View Full Version : [CLOSED] Crystal Report



FpNetWorth
Dec 18, 2012, 2:08 PM
Hi all,

I have a problem when using crystal report and ext.net components in the same page.
When running the application, I have an error in the page:"allInOne.js".
The error message is the following: "Microsoft JScript runtime error: Object doesn't support property or method 'getHTML'"
Please find attached an image that show the error message.

Is there a solution for this error? I use both ext.net v1.6 and v2.1.

Thanks a lot.

geoffrey.mcgill
Dec 18, 2012, 2:17 PM
More information required. Please see forum guidelines.

FpNetWorth
Dec 18, 2012, 3:09 PM
Ok,
Please find below the code:


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PaySlipReportForm.aspx.cs"
Inherits="FPInternal.PL.EmployeePL.PaySlipReportForm" %>

<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<ext:ResourceManager runat="server">
</ext:ResourceManager>
<form id="form1" runat="server">
<div>
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" Height="1202px"
ReportSourceID="CrystalReportSource1" ToolPanelWidth="200px" Width="1104px" ToolPanelView="None"
EnableDatabaseLogonPrompt="False" EnableParameterPrompt="False" HasCrystalLogo="False"
HasToggleParameterPanelButton="False" EnableDrillDown="False" EnableTheming="False"
HasToggleGroupTreeButton="False" DisplayToolbar="False" HasExportButton="False"
HasPrintButton="False" HasSearchButton="False" />
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="PaySlipReport.rpt">
</Report>
</CR:CrystalReportSource>
<asp:Button runat="server" ID="btnSave" Text="Save" OnClick="savePaySlip" />
<asp:Button runat="server" ID="btnPrint" Text="Print" OnClick="printPaySlip" />
<ext:Button runat="server" ID="btnSaveExt" Text="Save">
</ext:Button>
</div>
</form>
</body>
</html>



Please note that the problem occurs once I add the ext resource manager ( even if the ext button is not added).

Thanks.

Daniil
Dec 19, 2012, 4:07 AM
Hello everybody,

Ext.NET v2

Ext.NET v2 removes ViewState by default. As far as I can understand it is required for Crystal Reports.

Please set up DisableViewState="false" for the ResourceManager.

Ext.NET v1

I am unable to reproduce the problem.

P.S. I had to remove everything from the Page directive leaving just:

<%@ Page Language="C#"

Also I had to remove OnClick="savePaySlip" and OnClick="printPaySlip", because I do not have definitions of these handlers.

Well, it seems to be not a big deal. But everyday we test a huge amount of examples. It would be great help for us if you provided us with samples which we could just copy, paste and run without any changes. Thank you.

FpNetWorth
Dec 19, 2012, 7:39 AM
Ext.NET v1

Well, it seems to be not a big deal. But everyday we test a huge amount of examples. It would be great help for us if you provided us with samples which we could just copy, paste and run without any changes. Thank you.

Hi Daniil, I created a sample project and try to send it to you. However I can not upload it . The .rar extension is not supported when uploading file.

What is your suggestion?

Thanks.

Daniil
Dec 19, 2012, 10:52 AM
Yes, the forums restricts such file extensions.

Well, this is our policy. We rejects any project which we didn't request. In our experience a test project is not required in 99% cases.

Some more details are in our forums guidelines.
Forum Guidelines For Posting New Topics (http://forums.ext.net/showthread.php?3440)
More Information Required (http://forums.ext.net/showthread.php?10205)

You posted an ASPX page which allows to reproduce the problem with Ext.NET v2.

But it doesn't reproduce the issue with Ext.NET v1.

So, my suggestion is the following. Please post a simplified ASPX to reproduce the problem in Ext.NET v1.

FpNetWorth
Dec 19, 2012, 12:32 PM
You posted an ASPX page which allows to reproduce the problem with Ext.NET v2.

But it doesn't reproduce the issue with Ext.NET v1.

Hi Daniil,

In fact the previous code that I posted is extracted form a project where I use the v1.6 Ext.net.

Regards.

Daniil
Dec 19, 2012, 1:53 PM
Good, but somehow it doesn't reproduce the problem on my side.

Please demonstrate your Web.config.

FpNetWorth
Dec 19, 2012, 2:43 PM
Please demonstrate your Web.config.

Hi,
Please find below my Web.config:


<?xml version="1.0"?>

<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->

<configuration>


<configSections>
<section name="extnet" type="Ext.Net.GlobalConfig" requirePermission="false" />
</configSections>

<extnet theme="Default" />
<system.web>

<httpHandlers>
<add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false" />
</httpHandlers>
<httpModules>
<add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />
</httpModules>

<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</assemblies>
</compilation>

</system.web>

<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="DirectRequestModule" preCondition="managedHandler" type="Ext.Net.DirectRequestModule, Ext.Net" />
</modules>
<validation validateIntegratedModeConfiguration="false" />



<handlers>
<add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.Net.ResourceHandler" />
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.0.8.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>


Thanks.

Daniil
Dec 19, 2012, 4:03 PM
Thank you, but I am still unable to reproduce the problem.

Maybe this technique can help to prepare a sample.
How to prepare a sample (http://forums.ext.net/showthread.php?13672&p=56687&viewfull=1#post56687)