cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with VS2010 and CR13.0.2000.0 only header appears

Former Member
0 Kudos

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..

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

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

Former Member
0 Kudos

Hello Don,

I did everything that I found about the bobj error.

The report have a text yes.. but still with the same problem...

Thanks for help me.

Pedro

Former Member
0 Kudos

one more info...

I'm using windows XP with IIS V5.1

And I have this problem in my localhost.

0 Kudos

Are you using Sessions and Postback to keep the reprot in session?

Did you move you Crystal code into the Page_Init section?

Former Member
0 Kudos

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.

Answers (1)

Answers (1)

Former Member
0 Kudos

Anyone to help me out?