?
Solved

Using a dynamically created object data source with SSRS

Posted on 2013-01-31
4
Medium Priority
?
421 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 40

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

After much searching across the internet I have found that you could not set the name of the file you were attaching to dynamic report subscriptons in Microsoft Reporting Services. I did manage to find one article showing you how your could make a s…
A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

771 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