Hallo,
have you a ObjectDataSource sample with more then one table?
Sample: Order => OrderLine => Item
Regards
Thomas
Hi Thomas,
Let me know if you have any further questions on this matter.
Hi Thomas
Even if Hierarchical Data will be a feature of 12.2, in your scenario you could achieve it by making the a report of 'items' that is grouped by item.OrderLine and item.OrderLine.Order
You'll need to write a method that returns an IEnumerable<Item>, and each class should have a property to navigate to its parent (e.g. item.OrderLine, orderLine.Order).
I created a sample you can get from here.
We know it's not the best solution, and that's why we are adding first-class support for this scenario.
I hope it helps
Andres
In order for the Infragistics report to display data, that data needs to be stored within an IEnumerable of a known type. For example in the sample code you posted, Product is the known type and GetProducts is returning an IEnumerable collection of Product objects. The report will use GetProducts to fill it's data source and then you can use the report designer to layout how you want to display that data.
You've probably already seen this document but I'll post it just in case:http://help.infragistics.com/NetAdvantage/reporting/2012.1/CLR4.0?page=How_to_Bind_a_Report_to_an_Object_Data_Source.html
So in your case since you don't need to display hierarchical data you would need three objects, Order, OrderLine and Item. You would then write a method to return an IEnumerable of each of these types. Then in your report you can add each of these as an object data source and organize the data on the report as desired.
Hi Rob,
sorry, if you don't understand me. My english ist not so good.
Next try:
I wish create a order confirmation and the data comes from a ObjectDataSource.
Today I works with crystal reports:
- User starts a report "order confirmation no 12345" from my application- The application select data, create a DataSet for each report and save as XML file- start crystal report viewer with RPT file and the saved data (XML)- Now I can create the same report with the same data and I can export the data for other analysis each time
Now I will create the same solution with your reporting tool. Your tool can't work with DataSet and I require a alternate.
I find this sample code in the online help:
namespace ReportingObjectDataSourceSample{ public class ObjectsSource { public IEnumerable<Product> GetProducts() { List<Product> products = new List<Product>(); for (int i = 0; i < 10; i++) { products.Add(new Product() { Code = i, Price = i * 1.5, }); } return products; } } public class Product { public int Code { get; set; } public double Price { get; set; } }}
public
class
new
for
int
return
double
I don't display hierarchical data in the report.
I'm not sure I understand what you mean by having an ObjectDataSource with more than one table. In your example do you mean there would be seperate tables for Order, OrderLine and Item? Or is that data setup in a hierarchy and you want to display it in a table. Currently our Reporting product does not support displaying hierarchical data. We have plans to release support for this in the next volume release of NetAdvantage 2012 (12.2).