Page 1 of 3
Silverlight Databinding at runtime
Posted: Mon Apr 18, 2011 3:46 pm
by nitinkumarv
I am trying to databind a custom class to report as a table at runtime.
I have followed your online samples - but I am unable to create this.
I have attached a simple sample program where I am trying to bind schema as well as data for the report at runtime.
Could you please modify the application further to get it working?
Silverlight Databinding at runtime
Posted: Tue Apr 19, 2011 1:45 am
by Andrew
Hello,
You can see our sample which demonstrates how to work with WCF. You may download this at
http://stimulsoft.com/ShowNews.aspx?id=1770
In your project, the only thing remained to do is to connect to the WCFRenderReport event and render a report on the server.
Thank you.
Silverlight Databinding at runtime
Posted: Tue Apr 19, 2011 2:21 pm
by nitinkumarv
Thanks for the reply.
I have modified the code as per your post. However, I am still not able to get it running. Not sure how or when the above mentioned event would trigger.
Could you please suggest further?
P.S: I have attached updated code for your reference.
Silverlight Databinding at runtime
Posted: Wed Apr 20, 2011 12:26 am
by Andrew
Hello,
You forgot to set the property:
Stimulsoft.Report.StiOptions.Silverlight.WCFService.UseWCFService = true;
Then all described events in the sample will trigger.
Please see carefully our "WCF_Samples" which show how to implement possible methods.
Thank you.
Silverlight Databinding at runtime
Posted: Wed Apr 20, 2011 4:54 pm
by nitinkumarv
Hi Andrew,
That was my mistake - I have the my sample app running now.
I have gone through your sample application - Here are a few doubts. Please correct/guide me if I am wrong in any place.
Steps to generate designer and report:
1. Load DataSource
2. Render Report
3. Test datasource connection
4. Build data objects
5. Build data object columns
6. Load Data and preview report.
Doubts:
1. I notice that datasource is loaded from .mrt file? How do I load datasource as a sql database?
2. Suppose I have added a table in the report and have linked columns to datasorce table columns, in which event would data get displayed - is it render or load?
3. Are steps 3,4 and 5 needed to databind?
Please excuse my basic questions - We are very much interested in purchasing your product, it fits our need perfectly. I am trying to make sure that we know the basics before going full scale with it.
Thanks for your time and support.
Silverlight Databinding at runtime
Posted: Thu Apr 21, 2011 1:06 am
by Andrew
Hello,
Sorry but it seems we did not exactly understand what do you mean. Could you, please explain your issue in more detail.
To use your SQL database, you can create a connection directly from the designer, if your application uses a server (see our example).
Thank you.
Silverlight Databinding at runtime
Posted: Thu Apr 21, 2011 6:48 am
by nitinkumarv
In your sample, data was getting bound using .mrt file (Picked up as assembly resource).
Wouldn't this mean that I need to generate a .mrt file before hand to add data sources?
Is there any other way of linking up database other than .mrt files?
Silverlight Databinding at runtime
Posted: Thu Apr 21, 2011 7:42 am
by Andrew
Hello,
You can connect the data sources directly in the designer, selecting the "New Connection" menu item in the Dictionary.
Thank you.
Silverlight Databinding at runtime
Posted: Thu Apr 21, 2011 3:11 pm
by nitinkumarv
I tried "New Connection" option in the designer as suggested. Below are the results:
Case 1 (My Sample App):
This option is disabled or does not appear at all.
Could you please let me know why this hsppens?
Case 2 (Your Sample App):
I was able to add New SQL Connection and Data Source. I further added "Data Band" and set datasource as table in my database.
However, there are no records displayed when I preview - Could you please let me know if your sample needs any modifications?
Thanks,
Silverlight Databinding at runtime
Posted: Fri Apr 22, 2011 12:46 am
by Andrew
Hello,
Case 1 (My Sample App):
This option is disabled or does not appear at all.
Could you please let me know why this hsppens?
This will be available if:
1. You use our web control StiWebDesignerSL
2. You use a WCF server and set the Stimulsoft.Report.StiOptions.Silverlight.WCFService.UseWCFService property to true;
Case 2 (Your Sample App):
I was able to add New SQL Connection and Data Source. I further added "Data Band" and set datasource as table in my database.
However, there are no records displayed when I preview - Could you please let me know if your sample needs any modifications?
Please send to
support@stimulsoft.com a sample project on which the problem is resproduced.
Thank you.