on 2024 Jun 19 12:19 PM
Hello, I have a Windows Server 2022 running IIS, Crystal Reports 2020, VS2019.
I am publishing some Crystal Reports and I getting the a blank screen with
TypeError: bobj.isObject is not a function error
I have DotNet 4.8 and CR Runtime 34 64bit installed
My Web.Config
<configuration>
<system.webServer>
<handlers>
<add name="CrystalImageHandler.aspx_GET"
verb="GET" path="CrystalImageHandler.aspx"
type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
preCondition="integratedMode"/>
</handlers>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
<system.web>
<compilation debug="false" strict="false" explicit="true">
<assemblies>
<add assembly="CrystalDecisions.Web, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Shared, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
Any help will be very much appreciated.
Thanks
Request clarification before answering.
Hello,
In supporting CR SDK's for the past 26 years I don't recall anyone trying to use a .NET and our JS files...
I don't believe it's supported, those JS files under the Viewer folder are for internal use by our Viewer and not supported by direct use.
The error is likely due the Report Engine has not be initialized in your project.
Here's a simplified use of the Engine in a WEB app:
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Web;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Page_Init(object sender, EventArgs e)
{
CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
rpt.Load("C:\\Reports\\Reports\\General Business\\World Sales Report.rpt", OpenReportMethod.OpenReportByTempCopy);
CrystalReportViewer1.ReportSource = rpt;
Response.Write("hello");
}
}
If you want to use Java CR has a CR for Eclipse package here:
https://help.sap.com/docs/SUPPORT_CONTENT/crystalreports/3354088796.html
If you want a sample, Desktop go to the Info page here:
https://help.sap.com/docs/SUPPORT_CONTENT/crystalreports/3354091173.html
How to use the new CR 2020 export to Microsoft Excel(XLXS) in Visual Studio .NET code (new)
how-to-parameters-in-crystal-reports-for-visual-studio-net
Printing Crystal Reports in .NET
Also note you must install CR for VS using the EXE, in your case the one for VS 2019 to properly integrate into Visual Studio. The one for 64 bit is for VS 2022 since it's a 64 bit application. Also to get all of the registry keys created etc.. You cannot manually distribute the runtime, to many COM dll's to register etc.
MSI's are for redistribution only.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using visual basic aspx files to open the reports
Partial Class myMainAllDevices
Inherits System.Web.UI.Page
Dim myMainAllDevices As New CrystalDecisions.CrystalReports.Engine.ReportDocument
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
If Session("Report") Is Nothing Then
Report.Load(Server.MapPath("Report.rpt"))
Session("Report") = Report
Else
myMainAllDevices = CType(Session("myMainAllDevices"), CrystalDecisions.CrystalReports.Engine.ReportDocument)
End If
Report.Refresh()
Report.SetDatabaseLogon()
With CrystalReportViewer
.DisplayGroupTree = False
.DisplayToolbar = True
.EnableDatabaseLogonPrompt = False
.EnableDrillDown = True
.EnableParameterPrompt = False
.HasCrystalLogo = False
.HasDrillUpButton = False
.HasExportButton = True
.HasGotoPageButton = True
.HasPageNavigationButtons = True
.HasPrintButton = True
.HasRefreshButton = True
.HasSearchButton = True
.HasToggleGroupTreeButton =False
.HasToggleParameterPanelButton = True
.HasZoomFactorList = True
.HyperlinkTarget = "_blank"
.PageZoomFactor = 100
.ReportSource = myMainAllDevices
.ReuseParameterValuesOnRefresh = True
End With
End Sub
End Class
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.