Hello,
I have a problem with CR in VS2010.
I have a ASPX Web page where I have a CR viewer to display some dataset data. I have created a empty CR report to make a few tests but I I can't see it.
I can only see the CR header... and if I select a any header textbox I get an error. I also can't print or do other CR header options, don't have any error but I also don't do anything. As you can see in the images below:
I already add the crystalreportviewers13 folder in the solution and in the C:\Inetpub\wwwroot\aspnet_client\system_web\4_0_30319 folder.
I also put in the web config:
<sectionGroup name="businessObjects">
<sectionGroup name="crystalReports">
<section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null"/>
<section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler"></section>
</sectionGroup>
</sectionGroup>
and:
<businessObjects>
<crystalReports>
<rptBuildProvider>
<add embedRptInResource="true"/>
</rptBuildProvider>
<crystalReportViewer>
<add key="ResourceUri" value="/crystalreportviewers13"/>
</crystalReportViewer>
</crystalReports>
</businessObjects>
My code is:
in the aspx file:
<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<%@ Import Namespace="CrystalDecisions.CrystalReports.Engine" %>
<%@ Import Namespace="CrystalDecisions.Shared" %>
<%@ Import Namespace="System.Data" %>
I have to insert this js file.. if not I had the "Uncaught ReferenceError: bobj is not defined" error
<script src="../crystalreportviewers13/js/crviewer/crv.js" type="text/javascript"></script>
Dim reportDoc As ReportDocument = New ReportDocument
reportDoc.Load(Server.MapPath("rrr.rpt")) 'rrr.rpt document is a empty report
reportDoc.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Landscape
reportDoc.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA4
CrystalReportViewer1.RefreshReport()
CrystalReportViewer1.ReportSource = reportDoc
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" />
Can someone help me? I already tried everything..