Solved

Using a dynamically created object data source with SSRS

Posted on 2013-01-31
4
408 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
Comment Utility
"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
Comment Utility
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
Comment Utility
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
Comment Utility
No other solution was provided.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
This code started out as a fix for a customer that had incoming data that was hunderds of numbers and words long that was to fit in one column. The problem was that the customer did not want to split words or numbers when wrapping in the column. …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now