I tried to add Object DataSource to my report, but in my project the "add a dataset to the project" in the DataSource-Property Editor disabled is disabled. If I do the same in a new test project it works.
Thanks for the update. This behavior is by design.
The 'Add Dataset to Project' will always be disabled because of the web project specifics.
In a web application, you can only select a DataSet from the existing DataSet objects defined in the project.
See a similar issue discussed at: Cannot add Datasource to report. Let me know whether this helps.
Ok, Thank you Alex,
In the meentime I try to use a dataset and this seems to work. The problem is that the data in my app is in a object structure (nested ILists). It would theoretically be possible to build a DataSet facade between, but this would be a lot of unnecessary work. Is there a possibility to directly use my custom objects at design time? Or is the usage of the End-User Designer a solution? Is it possible to reference my assembly there?
Thanks for the response.
To bind report controls using your custom objects schema in a web application, create a corresponding schema separately as an XSD file.
Then, use the DataSourceSchema property or the XtraReport.XmlDataPath property in design mode.
As a result, you'll be able to use the Field List window, or set bindings using smart tags.
Also, you can use the Mail Merge feature. Instead of setting report control's bindings, set its Text property to the Data Field name enclosed in square brackets: [DataFieldName].
At runtime, you can update the report's XtraReport.DataSet property using the actual instance of your business object.
Let me know whether this makes sense.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.