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
Solved

Using a dynamically created object data source with SSRS

Posted on 2013-01-31
4
413 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Introduction: This article is aimed at report developers who are used to developing reports using relational databases and have gotten a first-time assignment to develop reports on OLAP cubes. It demonstrates how to build a report using SQL Ser…
Introduction As you'll probably know, a data region in a SQL Server Reporting Services report can be linked to only one dataset.  This makes it troublesome when you need to display data from more than one dataset in the same data region.  SQL Serve…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 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