Link to home
Start Free TrialLog in
Avatar of mgmhicks
mgmhicks

asked on

Problem upgrading crystal report for visual studio

I upgraded my program from crystal reports 2008 runtime to CR2013.  I have also installed the crvs2013.  My project now works without error, however in development mode I get the following instead of the crystal reports.  Any Ideas.

thanks

User generated image
Avatar of Mike McCracken
Mike McCracken

What code are you using?

mlmcc
Avatar of mgmhicks

ASKER

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Try
            'Dim myDS As New DataSet
            'myDS = Session("oDataSet")
            myreport = CType(Session("oClientDoc"), ReportDocument)
            '  myreport.SetDataSource(myDS)
            If Session("RptName") = "Insurance" Then
                CrystalReportViewer1.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.ParameterPanel
            Else
                CrystalReportViewer1.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None
            End If
            CrystalReportViewer1.ReportSource = myreport
        Catch engx As CrystalReportsException
            Session.Add("oError", engx.Message & "crViewer1")
            Response.Redirect("errors.aspx")
        Catch ex2 As ParameterFieldException
            Session.Add("oError", ex2.Message & "crViewer1")
            Response.Redirect("errors.aspx")
        Catch ex3 As EngineException
            Session.Add("oError", ex3.Message & "crViewer1")
            Response.Redirect("errors.aspx")
        End Try
    End Sub

Open in new window

I don't use the VS versions but the message seems to imply they changed the method of referring to reports.  They want to use the ReportSourceID  rather than the ReportSource

This line
     CrystalReportViewer1.ReportSource = myreport

Should be
    CrystalReportViewer1.ReportSourceID = myreport

I don't know what value it takes.  Try myreport.  If that is not it then there should be some property of the report that gives the ID.

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of mgmhicks
mgmhicks

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This is how the problem was solved and the only other comment had nothing to do with the solution.