Solved

Using a dynamically created object data source with SSRS

Posted on 2013-01-31
4
412 Views
Last Modified: 2013-03-02
I am new to SSRS and am using a client-side report with a Winforms ReportViewer control.

I wish to allow the end user to define the report outside of my desktop application (not a problem) but also define how the values are calculated outside of the application. So what this means is I want to bind against an object whose properties are created at run time not at compile time.

I have tried using an object that derives from DynamicObject and using the TryGetMember method. This works fine when referencing properties from code, but does not work when trying to reference the properties using reflection. It fails with SSRS (presumably because it uses reflection?).

Is there a way to have my report reference properties that do not exist at compile time? Alternatively, is there a way to specify that the report should call a parameterised method on the object? Or is there some other approach?

Thanks in advance...
0
Comment
Question by:Seiker
  • 3
4 Comments
 
LVL 39

Expert Comment

by:lcohan
ID: 38840448
"I want to bind against an object whose properties are created at run time not at compile time." - you can't use SSRS (shared or not) dynamically created Data source as far as I'm aware.
0
 

Author Comment

by:Seiker
ID: 38850291
So if I want to fully define the report outside of my application code and have it bind to object properties (or methods?) that are not defined at compile time (i.e. defined dynamically or outside of my application code), what are my options?

What I am trying to avoid is building a custom application for each of our customers or needing to modify our application each time they want to add a new value or change they way they want to calculate an existing value.
0
 

Accepted Solution

by:
Seiker earned 0 total points
ID: 38925103
I have gone for a solution that automatically generates code which is then imported at runtime using MEF. This is more effort than originally planned but gives me the desired ability to create the properties outside of the built application.

Thanks for your help.
0
 

Author Closing Comment

by:Seiker
ID: 38944795
No other solution was provided.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Written by Valentino Vranken. A while ago I wrote an article called Chart Optimization Tips (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Chart-Optimization-Tips.html).  This article explained how …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question