all groups > sql server reporting services > august 2004 >
You're in the

sql server reporting services

group:

Do I need a data extension?


Do I need a data extension? Joe Helmick
8/31/2004 1:31:54 PM
sql server reporting services: I'm working on a project for a national restaurant chain. I've built a
complex class that allows them to do various forms of sales estimations for
stores who fail to report their weekly sales. I say "complex" because it
has a detailed class hierarchy under it and performs lot of SQL Server work
inside its "black box." Using this class within a web page is working
great...

Now they want this functionality to also appear in a report, and I'm
wondering what I have to do -- never done a RS data extension and first am
wondering: Is this what I need to add this function to a report?

If the answer is "yes," is there a resource that describes in detail how to
do it, with a non-trivial example?

I'm really under the gun on this one, so I'll be grateful for any help --
thanks!

Joe

Re: Do I need a data extension? Ravi Mumulla (Microsoft)
8/31/2004 2:41:22 PM
I'd start with the sample reports that ship with the product. Check
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSAMPLES/htm/rss_overview_v1_631v.asp?frame=true
for details.

--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services

This posting is provided "AS IS" with no warranties, and confers no rights.
[quoted text, click to view]

Re: Re: Do I need a data extension? Joe Helmick
8/31/2004 5:20:22 PM
Ravi,

Thanks, but I have all the samples and unless I missed something due
to my newbie-ness, I don't see what I need. I don't need drilldown or
drillthrough, and simple functions in a code-behind don't seem like
they'd nearly fill the bill. I'm already doing cascading parameters
from multiple datasets and stuff like that, no problem, but attaching
functionality from a 700-line VB class with deep inheritance? I don't
see anything like that in the samples...

Did I miss something, or do I need another resource besides the
samples?

Joe

"Ravi Mumulla \(Microsoft\)" <ravimu@online.microsoft.com> bellowed
forth with this wisdom for all to hear:

[quoted text, click to view]
Re: Re: Do I need a data extension? Teo Lachev
8/31/2004 7:58:33 PM
Joe,

One option in your scenario may be to dump your object data (state) in a
database before the report is run. Unfortunately, version 1.0 of Reporting
Services doesn't support events, so to implement preprocessing you need to
get somewhat innovative. One option is to attach an expression to a property
of the report body band (it will fire before the regions get loaded). This
expression could gather the report parameters, pass it to your object which
in turn can serialize itself to the database and let the regions pick data
from there. Of course, this is a rather simplified version of what you may
need to do.

Yes, another and more elegant option is to wrap you object in a custom data
extension. This is actually very straightforward. You need to expose your
object data as a forward-only tabular stream which conforms to the
IDataReader interface. You may find my ADO.NET custom data extension
(http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B846
8707-56EF-4864-AC51-D83FC3273FE5) useful to get you started. It comes with
step-by-step help instructions.


--
Hope this helps.

-----------------------------------------------------
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
-----------------------------------------------------

[quoted text, click to view]

AddThis Social Bookmark Button