Telerik
Home / Community / Forums / Telerik Reporting: Telerik Reporting / Object is not defined in current context

Not answered Object is not defined in current context

Feed from this thread
  • Hasan ARSLAN Hasan ARSLAN's avatar

    Posted on May 27, 2008 (permalink)

    Hi all,

    I installed Reporting SP1, PageCount problem is solved. But after the installation other problems occured. When I run ReportViewer every textbox gives error message "#ERROR# The expression contains object '####' that is not defined in the current context. ". But the preview of report doesn't give any error. I'm usinf Business objects for datasource. I have a business object and a List class that is filled by that business objects. I try to rebind datasource to report but the result is same. It doesn't make sense that this error is occured after installation of SP1.
    Do you have any advice?

    Thanks..

    Reply

  • Telerik Admin admin's avatar

    Posted on May 28, 2008 (permalink)

    Hello Hasan ARSLAN,

    There is a report in our examples called List Bound Report, that demonstrates how to use object datasource and it is working properly with the latest version of our product.

    If your report works fine in Preview, I suppose that this behavior is caused by the code in your application that creates and provides data to the report.

    In order to help you we need a sample project that reproduces the described issue. So please open a support ticket and send us a simple project with a report and viewer that we can examine and provide you assistance.

    Thank you for your cooperation.

    All the best,
    Milen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

    Reply

  • ERic avatar

    Posted on May 29, 2008 (permalink)

    Hi Hasan

    Did you have any luck in solving this issue? As i'm currently having the exact problem as well.

    Thanks
    Eric

    Reply

  • Hasan ARSLAN Hasan ARSLAN's avatar

    Posted on Jun 5, 2008 (permalink)

    Nope, not yet :(

    Reply

  • Telerik Admin admin's avatar

    Posted on Jun 5, 2008 (permalink)

    Hi guys,

    Unfortunately Hasan has not send a sample report and we have not been able to reproduce it locally. Eric would you be so kind, to open a support ticket and attach a zipped report that shows the issue you've encountered at hand? We would run it locally and advice you accordingly.

    Thank you for the cooperation.

    All the best,
    Steve
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

    Reply

  • Hasan ARSLAN Hasan ARSLAN's avatar

    Posted on Jun 6, 2008 (permalink)

    I've opened a support ticket. I was trying some alternative. I've created a new project with different report and different business objects but unfortunately the result is same.

    Reply

  • Posted on Jun 15, 2008 (permalink)

    I am also having this problem. Has a solution been identified yet?

    Reply

  • Hasan ARSLAN Hasan ARSLAN's avatar

    Posted on Jun 16, 2008 (permalink)

    I resolved this problem by re-installing Q1 2008 (not SP1). But still it doesnt work with SP1.

    Reply

  • Telerik Admin admin's avatar

    Posted on Jun 16, 2008 (permalink)

    Hi guys,

    Most likely this problem is somewhat related to the specific culture settings of the computer running Telerik Reporting and/or the collation of the SQL Server database.

    Anyway, up until now we cannot reproduce the same problem on our side, so we have no clue what is the actual reason. We will highly appreciate any additional information or even better - a sample project that illustrates the issue or steps to reproduce.

    Thank you for the cooperation.

    Kind regards,
    Svetoslav
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

    Reply

  • Ernst Sognnes avatar

    Posted on Nov 21, 2008 (permalink)

    Hi,

    i don't know whether this issue has been resolved, but I thought I'd share my experience with this eluding problem. My project is a ASP.NET 2.0 website, and I'm using the most recent version of Telerik.Reporting: 2008.31105 (which is 2008 Q3).

    The report is retrieveing data via NeedDataSource event. It works in design-view / preview mode, but in production shows error messages "The expression contains object 'textbox' that is not defined in the current context." for all textboxes.

    I am using MySql Connector.Net (most current version; 5.2.3), and thus also using MySqlDataAdapter to fill the dataset.

    The problem, for me, was not related to culture or collation in the database / web application. It was simply because I had implemented my own custom session handler - for MySQL - which has been running without incident or other errors for my web project in all other regards. As soon as i disabled it and returned to default session handler in web.config - everything works fine!

    Does ayone have thoughts on why this problem occurs in Reporting because of a custom session handler?


    regards,
    Ernst

    Reply

  • Telerik Admin admin's avatar

    Posted on Nov 24, 2008 (permalink)

    Hi Ernst,

    We are aware of the problem and it caused when using StateServer/SqlServer session mode in the Q3 release. Our developers are investigating the problem and we should come up with a fix for one of the upcoming service packs.

    Please excuse us for the inconvenience.

    Sincerely yours,
    Steve
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

    Reply

  • ilkruzn avatar

    Posted on Nov 24, 2008 (permalink)

    Hi all,

    I faced the same problem with my custom session state provider with the backing store Memcached or even with the StateServer provided by ASP.Net. I can reproduce the problem using Telerik.Reporting v2.9.8.1105(Q3 - 2008). The error given is: 

    An error has occured while processing TextBox 'textBox1':
    The expressioncontains object 'ItemName' that is not defined in the current context.


    I read some entries in Telerik report forums, saying that it has some problems with report parameters when using "out of process session modes"  and they have fixed this in Q2 - SP2. In my situation, NeedDatasource event for Report is not being called when the app. session is not working InProc mode.

    I can open a support ticket and upload a sample project to you, but it is very easy to reproduce for you and i don't want to waste my business hours trying to reproduce others problems. It is unacceptable for us to use the report tool until this issue is fixed.

    --ilker

    Reply

  • ilkruzn avatar

    Posted on Nov 24, 2008 (permalink)

    Hi again,

    The answer I needed has arrived while I am typing the post. We are expecting to have a SP very soon :(

    Reply

  • Robert avatar

    Posted on Feb 17 (permalink)

    In case it helps anyone in our situation using a out-of-proc session state in a database will cause the reports to fail with an unhandled global exception of "A list corresponding to the selected DataMember was not found" error.

    This is directly related to using <sessionState> configuration when in SQLServer mode. At the time of writing this i'm using Q32008 RadReporting.

    Reply

  • Posted on Feb 26 (permalink)

    Hi,

    I am using reporting in a Sharepoint custom application and unfortunately can't change the session state to be InProc. 

    I would like to know if this bug will be fixed with the upcoming 2009 Q1 release. It doesn't say so in the roadmap.

    If it's not, will 2008 Q2 work? Are there any known workarounds for this?

    Could you please let us know as soon as possible as this is crucial to the development of out current project.

    Thank you very much.

    -Antonio

    Reply

  • Telerik Admin admin's avatar

    Posted on Feb 27 (permalink)

    Hello raindogmx,

    Existing bugs are not added to our RoadMap - only new features are. Generally if you have a default contructor and make modifications to the report only in the report constructor, you should not experience any problems with out-proc session modes.
    In Q1, there would be no such limitations, as we've changed the way this is handled.

    All the best,
    Steve
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

    Reply

  • Posted on Mar 25 (permalink)

    Hi,

    I upgraded to Q1 2009 and using this for state management:

    <sessionState mode="SQLServer" timeout="60" allowCustomSqlDatabase="true" partitionResolverType="Microsoft.Office.Server.Administration.SqlSessionStateResolver, Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 

    Unfortunately receiving the "No parameterless constructor error"

    Any advice?

    Thank you

    -Antonio


    Reply

  • Posted on Mar 25 (permalink)

    I got it working.

    I used to load all the report parameters and data source from the report constructor.

    Now I changed the constructor to a parameterless one and load the report parameters and data source from the report viewer page I made. I wanted to use the NeedDataSource event of the report but it doesn't seem to trigger it.

    Now my only issue is how to get that NeedDataSource event fired but it is not a big deal now.

    Regards,

    Antonio

    Reply

  • Telerik Admin admin's avatar

    Posted on Mar 25 (permalink)

    Hi Antonio,

    The Report.NeedDataSource event is raised only if there is no data source set for the Report. For more information on the Report events please see Using Report Events help topic.

    Sometimes one may need to use different data sources at design time and run time. If you have set the data source at design time you have to reset it at runtime to have the NeedDataSource event fired. Since the designer places all the initialization code inside the InitializeComponent() method the best place to reset the Report.DataSource property is at the end of the report's constructor like this:

    public class MyReport1 : Telerik.Reporting.Report 
        public MyReport1() 
        { 
            InitializeComponent(); 
             
            // Reset the data source enable the NeedDataSource event: 
            this.DataSource = null
            // this.DataMember = string.Empty; 
        } 


    Regards,
    Svetoslav
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.

    Reply

Powered by Sitefinity ASP.NET CMS

Contact Us | Site Feedback | Terms of Use | Privacy Policy
Copyright © 2002-2009 Telerik. All rights reserved.