on 11-27-2015 1:26 PM
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..
Hello,
Search for bobj, you'll find all sorts of posts on how to resolve the error.
And don't call .Refresh(), that ignores anything you may have already set in code.
For the blank report make sure the Suppress blank report is not checked on in Report Options.
If you add a text box with "Hello World" in it does that show?
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Don,
No, I'm not using sessions neither postback.
No.. I'm using aspx pages with embebed code blocks. Is where the code I put in the first post is.
The first thing I do is:
Dim reportDoc As ReportDocument = New ReportDocument
reportDoc.Load(Server.MapPath("rrr.rpt")) 'rrr.rpt document is a empty report
CrystalReportViewer1.ReportSource = reportDoc
in a embebed code block.. and then I have declared de Crystal report viewer:
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" />
Thanks for the help.
Anyone to help me out?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.