Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to set up binding for a web report using a collection of custom objects as a data source at design time

$
0
0

This example illustrates how to bind a report to lists for web projects at design time. To do this you need to extract your reports together with the corresponding classes representing your business objects into a separate assembly. Then, you can easily perform all necessary design-time binding using the BindingSource component (by specifying the required object type as its DataSource).

This approach differs from how this is done under the Windows Forms platforms in that you cannot assign your object to the BindingSource.DataSource property at design time. Instead, you should perform the binding right within the InitializeComponent method.

Question Comments

Added By: CodeGal at: 1/21/2014 7:21:17 PM    

So what are the design time bindings for controls set to in the report?

Added By: Olena at: 3/5/2014 5:03:22 PM    

Hi Support Team,
I've just downloaded Example and I see error in the XtraReport1.cs tab saying

"Could not find type 'Reports.Data'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU. "

Unfortunately there is no ability to attach print screen.
What can I do to fix it?

Thanks!

Added By: ghsPt at: 4/7/2014 10:21:33 AM    

Hello!

I have a dataset with several objects.
If I want a list of several different objects with only one datasource, how can I do that?

Added By: Matt_Olson at: 7/20/2014 3:57:26 PM    

Missing design time objects in xtrareport1.cs

Added By: Andrew L (DevExpress Support) at: 7/21/2014 7:21:26 AM    Hello Matt,

To process your recent post more efficiently, I created a separate ticket on your behalf: T131788: E1936 - Missing design time objects . This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: Matt_Olson at: 7/21/2014 8:03:37 AM    

Sorry, I see that the missing source code is in the Example Runner download.  It is only missing from the web viewable portion (such as definition for InitializeComponent()) which is in XtraReport1.designer.cs I'm guessing which isn't in the web viewable version.

Added By: Andrew L (DevExpress Support) at: 7/21/2014 10:02:49 PM    Hi Matt,

I am happy to hear that the problem has been resolved. Thank you for letting us know of your progress. Please feel free to contact us if you have any further difficulties. We will be happy to assist youAdded By: Lisa Bencic at: 8/27/2014 1:52:19 PM    

I run this example in my 14.1 environment and it works fine.  If I swap out the Report Viewer for the ASPxDocumentViewer, I get the old "Object reference not set...."
Is there an example that uses ASPxDocumentViewer?  
I saw in this link: http://www.devexpress.com/Support/Center/Question/Details/T119505
That it's 'NOT' good to store the Xtrareport in a session variable, that it is too complex.  Is it more complex with the Doc Viewer instead of Report Viewer?

Added By: Dmitry Tok (DevExpress Support) at: 8/27/2014 10:33:45 PM    

Hello Lisa,

To process your recent post more efficiently, I created a separate ticket on your behalf: T144862: How to set up binding for a web report using a collection of custom objects as a data source at design time. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
Thanks

Added By: Aakash Bashyal Bashyal at: 8/14/2015 8:54:02 PM    

Please provide the Example in MVC for the same purpose.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>