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

Q3 data binding

12 Answers 160 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Naphtali
Top achievements
Rank 1
Naphtali asked on 09 Nov 2009, 01:05 PM
Hi,
i just upgraded to the Q3 that was out a few days ago.
I can't get my code that binds the reports to the data source to work.
The following works fine:


 

public PatientReport()

 

{

 

/// <summary>

 

 

/// Required for telerik Reporting designer support

 

 

/// </summary>

 

InitializeComponent();

 

//

 

 

// TODO: Add any constructor code after InitializeComponent call

 

 

//

 

 

// TODO: This line of code loads data into the 'pCGProduction211009DataSet.PCGProduction211009DataSetTable' table. You can move, or remove it, as needed.

 

 

try

 

{

 

this.pcgProduction211009DataSetTableAdapter1.Fill(this.pCGProduction211009DataSet.patient);

 

}

 

catch (System.Exception ex)

 

{

 

// An error has occurred while filling the data set. Please check the exception for more information.

 

System.Diagnostics.

Debug.WriteLine(ex.Message);

 

}

}


but when i try to bind through the NeedDataSource event with the following code:


 

public

 

PatientReport()

 

{

 

/// <summary>

 

 

 

 

 

 

/// Required for telerik Reporting designer support

 

 

 

 

 

 

/// </summary>

 

 

 

 

 

InitializeComponent();

DataSource =

null;

 

 

}

 

private PCGProduction211009DataSet.patientDataTable GetData()

 

{

 

using (patientTableAdapter adapter = new patientTableAdapter())

 

{

 

var data = adapter.GetData();

 

 

return data;

 

}

}



i get an error when the report runs as you can see in the file attached. This code does work with Q2.

What has gone wrong?

Naphtali

12 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 09 Nov 2009, 04:27 PM
Hello naphtali,

We deeply apologize for introducing this problem in the new release. We managed to locate the issue and fix it. In order to help you continue your work, we have uploaded a new build (NOTE: with the same version numer), which fixes the problem. Please, download it from your Client.net account and let us know how it goes.

All the best,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Naphtali
Top achievements
Rank 1
answered on 10 Nov 2009, 08:39 AM
Yes. This has solved the problem. Thanks for the quick reply.
I have found some other problem, but I'll post that under a new post with a different subject. 
0
fruzicka
Top achievements
Rank 1
answered on 10 Nov 2009, 08:59 AM
Is the solution available to everyone? I had to rollback to Q2 due this issue.
0
Naphtali
Top achievements
Rank 1
answered on 10 Nov 2009, 09:03 AM
Yes, from the download page.
The previous file I downloaded was 2009_3_1103. The new is 2009_3_1104
0
Morten Louw
Top achievements
Rank 1
answered on 24 Nov 2009, 01:08 PM

Hi all,

I have a similar problem.

I have a report, getting an object of type Quotation (my own class). It's set to the reports datasource as below:

public OrderConfirmationFrame(Quotation qt)  
{  
   /// <summary> 
   /// Required for telerik Reporting designer support  
   /// </summary> 
   InitializeComponent();  
 
   this.DataSource = qt;  

On my report I set a textboxs value to =Fields.Salesman.Fullname
Salesman is an object on Quotation, and Fullname is a string property on Salesman.
When I debug, my object contains data, but the report breaks. It worked perfectly on Q2.

Is this the same bug? I'm running on 1104!

Looking forward to hear from somebody.

Kind regards,
Morten, Denmark
0
Steve
Telerik team
answered on 24 Nov 2009, 01:11 PM
Hello Morten,

Last week we released a new internal build for Telerik Reporting which addresses several important issues, including the "The expression contains object 'Item' that is not defined in the current context." error when binding to an list/array of objects. Check the Release Notes and get the latest internal build from the Latest Internal Builds area (log in required).

Sincerely yours,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Morten Louw
Top achievements
Rank 1
answered on 24 Nov 2009, 01:27 PM
Ok, I will try that!
I just don't understand why you haven't updated the default installer.
I believe many people will have this problem.

Kind Regards,
Morten :)
0
Jaq Bower
Top achievements
Rank 1
answered on 08 Dec 2009, 09:07 PM
I am having the same error in my report. "The expression contains object 'State_Count' that is not defined in the current context". I downloaded and installed the latest version,  2009_3_1104 and I still get the same error. Do I have to revert back to Q2?
0
Morten Louw
Top achievements
Rank 1
answered on 08 Dec 2009, 09:11 PM
No, you don't need to! You can go to the secret subpage (Latest internal builds). It worked for me!!

Morten :)
0
Jaq Bower
Top achievements
Rank 1
answered on 09 Dec 2009, 01:24 PM
That worked for me! Thanks for your quick response.

Bower:)
0
Stephen McDaniel
Top achievements
Rank 1
answered on 22 Feb 2010, 05:50 PM
Was this fix included in Q3 SP1?  I see it listed in the release notes, but I'm still having the same problem with SP1.

-Stephen
0
Steve
Telerik team
answered on 23 Feb 2010, 05:37 PM
Hi Stephen,

The issue has been addressed in the Q3 SP1 release and you should look for the reason in your code/expressions if you're still having problems. You can review our ListBound demo report for example on how to bind to business object. The following forum thread should point you in the right direction as well.

Best wishes,
Steve
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Naphtali
Top achievements
Rank 1
Answers by
Steve
Telerik team
Naphtali
Top achievements
Rank 1
fruzicka
Top achievements
Rank 1
Morten Louw
Top achievements
Rank 1
Jaq Bower
Top achievements
Rank 1
Stephen McDaniel
Top achievements
Rank 1
Share this question
or