This is a migrated thread and some comments may be shown as answers.

Giving error when SessionState Mode on SQLServer

2 Answers 89 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Veysel
Top achievements
Rank 1
Veysel asked on 09 Dec 2012, 09:43 PM
Here is the exact error that is reported when telerik and the session state are configured(it's attached as image file).  When using telerik reporting tool..I'm using sql datasouces to get values and here is the all code that I used..I used designer part to create the report  page..
namespace TelerikReporting
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;
    using Telerik.Reporting;
    using Telerik.Reporting.Drawing;
    using System.Configuration;
    using System.Data.SqlClient;
    using DataService.ConnectionFactory;
 
    public partial class PropRep : Telerik.Reporting.Report
    {
        public PropRep(int ID)
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();
            this.ReportParameters["ID"].Value = ID;
            PropTest.Parameters["@ID"].Value = ID;
            PropTest.ConnectionString = ConnectionFactory.GetConnectionString(ConnectionType.SQLConnection);
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
    }
}

This is code for aspx page which has Report Viewer
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:ReportViewer ID="ReportViewer1" Width="100%" Height="800px" runat="server"></telerik:ReportViewer>
    </div>
    </form>
</body>
</html>

and this is the aspx.cs codebehind part of the page
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
public partial class Reporting_Report : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["PID"] != null)
            {
                int ID = Convert.ToInt32(Request.QueryString["PID"].ToString());
                Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource();
                instanceReportSource.ReportDocument = new TelerikReporting.PropRep(ID);
                this.ReportViewer1.ReportSource = instanceReportSource;
            }
  
        }
    }
}

2 Answers, 1 is accepted

Sort by
0
Veysel
Top achievements
Rank 1
answered on 09 Dec 2012, 09:54 PM
any idea?
0
Peter
Telerik team
answered on 10 Dec 2012, 03:56 PM
Hi Veysel,

When out-proc session state is used the report should have a default constructor (constructor without parameters). For more information on the topic check out the Design Considerations for Out-proc Session State help article.

Greetings,
Peter
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Tags
General Discussions
Asked by
Veysel
Top achievements
Rank 1
Answers by
Veysel
Top achievements
Rank 1
Peter
Telerik team
Share this question
or