Beginning to documenting RDLs/RDLCs in RS 2008

by Lisa Nicholls Sun, November 08 2009 23:27

I've been trying to work my way up to a full-blown RS 2008 RDL Documenter implementation. (Better do it before RS 2010 is out...)

While C was visiting family a few weeks ago, I made a start on the complete rewrite of the Designer widget that will be necessary. I've also slightly upgraded the TestHarness application so that it comes with a 2008 Compact sample db, if you want to use it. 

The Designer widget is necessary if you want to add custom documentation, to RDLs, and have output documentation files that are similar to XML Comments for your other code files. This concept, which I call XMLRSDocs, was central to my original drive to write the tool. It really bugs me that a declarative module, which is what the RDL format is, can't have XML Comments like other application components.

But our team has been working a lot with RS 2008 semantic models, and we have a significant need to document the attributes and entities being used in multiple reports, before doing an upgrade. (Wow, how unusual: data and the need to document it are driving my work...)

The work I've already done, for that purpose, is good enough to give some results, with really minor changes for RS 2008. 

As a result, you can now pick up an RS-2008-usable version of this tool from our Spacefold downloads page.

  

What is critical, and already done? 

Very little has changed so far. 

There is a 2008-valid extraction XSLT -- not done, but done enough -- that will work with RS 2008 RDLs. RDLs in RS 2008 have a new namespace, and that's all I've changed so far.  I haven't upgraded the code to recognize the tablix data region type, and numerous other enhancements.  For our purposes, we really only care that the data elements get in.  I'll upgrade the XSLT for layout elements later.

To get a picture of the fields in use in reporting datasets, which is what we really need right now for our team, you only need to get the embedded information into a database so you can query it properly.

I've added a new button to TestHarness, to load a full folder of RDL/RDLCs to a server at once, if you're storing your results in the Compact db. But TestHarness is more of a teaching device where all of the elements of RDL Documenter come together in one place.  In this release, I've also added the production-grade SSIS package into the deployment set of files now, and this is what you would normally want to use.  

XMLRSDocs package

I don't consider myself an SSIS expert, so earlier I just described the steps in the package, and didn't include it in the delivered files earlier.  But, for whatever it's worth, you have my idea of this somewhat-unique set of steps now.

  

What's not done?

You'll find that each sub-dir of the zip file has a readme saying, basically, "this isn't done yet".  

The Designer widget was fun and exciting the first time; who wouldn't get a thrill out of integrating something directly into the IDE? But I really can't get up for it now, especially since the Custom Properties for individual report layout items and the "global" report is now much better exposed, even by Report Builder. 

TestHarness really doesn't need much work.  I will provide more exiting RDLCs for it, when I expand the supported db schema -- see below -- but really the "shape" of the standard RDL elements as they are ported into your db schema was never very important to me.  The package supports whatever you want to do here.  My real interest was adding custom doc information, which was woefully hard to do.  How you choose to store and display that information should be up to you -- that's the whole point.  The SSIS package just shows you the key actions I expect to be necessary, and a couple of key output types (XML and documenting reports). But the package should let you move your RDLs right into whatever you're doing with your other XML Comments.  I hope.

I expect that I will be expanding this sample package to load information from SMDLs into a separate table at some point.  Compared to messing around with RDLs, it should really easy to extract attribute and entity GUIDs and Names, to tie them directly to report usage later.  I could get a simple list of all Entity-Attribute combinations, showing both names and GUIDs, with this single XPATH statement:

/*/*/*/*/*:Attribute/concat(../../*:Name,' (',../../@ID,')'' - ',./*:Name,' (',@ID,')')

... which would look something like:

  • Glossary (Gb355f720-11df-43d9-9b6d-f9e863abde4b)' - Term (G4a1f954b-13eb-48cd-b75a-c538c0efd0ba)
  • Glossary (Gb355f720-11df-43d9-9b6d-f9e863abde4b)' - Institution (G58288fcd-1422-47dc-b9d7-c3c4062e8f5c)
  • Glossary (Gb355f720-11df-43d9-9b6d-f9e863abde4b)' - Date Time Created (G7db0f4e0-74e7-4cc1-a91b-c069bb4b24aa)
  • Glossary (Gb355f720-11df-43d9-9b6d-f9e863abde4b)' - Date Time Modified (G04c93e2b-173f-4272-b402-7d2e96746b05)
  • Glossary (Gb355f720-11df-43d9-9b6d-f9e863abde4b)' - Note (G6d8953ff-3ab3-44e6-9e46-86dd151677c4)

This and other ideas, plus a quick-start guide to use, are in the readme for the package.  But, for now, our team will be able to run the package as-is and then list the information relevant to their needs simply by doing this:

SELECT RDLFileName, RDLLayoutParentName, Value
  FROM [Test].[dbo].[RDLDocPrimary]
  WHERE RDLLayoutType = 'Field' ORDER BY 2, 3

... and they can do fancy things by shredding the semantic model query directly out of CommandText if they want to:

-- base query for talking to the XML that forms
-- each semantic model query...
SELECT RDLFileName, RDLLayoutParentName,
   CONVERT(xml,Value) AS XmlQueryable
FROM RDLDocPrimary WHERE RDLLayoutType = 'CommandText'

-- a list of all lead entities and their guids...
SELECT RDLFileName, RDLLayoutParentName,
   CONVERT(xml,Value).value('(//*:Grouping/@Name)[1]','NVARCHAR(300)') AS Entity,
   CONVERT(xml,Value).value('(//*:Grouping/*/*/*:EntityID)[1]','NVARCHAR(300)') AS EntityGUID
FROM RDLDocPrimary WHERE RDLLayoutType = 'CommandText'
   ORDER BY 1,2,3

-- a list of all attribute in use...
SELECT DISTINCT
   ISNULL(Ents.value('(../@Name)[1]','NVARCHAR(300)'),'CalcExpr') AS AttributeName,
   Ents.value('(./*:AttributeID)[1]','NVARCHAR(300)') AS AttributeGuid
FROM (SELECT CONVERT(xml,Value) AS XmlQueryable FROM RDLDocPrimary
   WHERE RDLLayoutType = 'CommandText' ) RDL1
CROSS APPLY
   XmlQueryable.nodes('//*:AttributeRef') AS RDL2(Ents)
ORDER BY 1
-- so far the above includes filters and query fields,
-- I've not worked out that it includes everything possible, but it
-- should be close

  

So Wise for one so young 

Long way to go, but this should help Wisdom and the team figure out the impact of a model change on existing RDLs.

Meanwhile, Wisdom's working on the companion SSIS Doc Generator for the team that I suggested to him.  Maybe he'll let me borrow it to properly document all the XMLRSDocs ETL package options before my next upload.

As he would say, although maybe he's picked it up from me, so far, so good.

Tags:

Reporting | SQL Server | XML/XSLT | xmlRSDocs

Comments (39) -

2/11/2010 9:54:34 PM #

>L<

seems fine to me... what browser are you using, and by "seems to be broken", what exactly do you see/mean?

>L< United States

2/16/2010 4:59:51 AM #

Joey Mccane

Hi just came across your blog and been browsing around some of your entries and just wondering why you chose a Microsoft blog dont you find it impossible to do anything with?

Joey Mccane Australia

2/18/2010 12:01:42 AM #

loop tuning

I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post

loop tuning United States

2/18/2010 1:41:50 AM #

overseas removals

Great post! Thanks for the information

overseas removals United Kingdom

2/27/2010 4:10:20 AM #

gioco del bingo

I  build a Report.rdlc file and show correctly in ReportViewer control. Now , I want to add a column to the result view ,how can I do ?(I didn't want to create a new "rdlc" file)  ,thanks!

gioco del bingo United States

2/27/2010 12:01:03 PM #

&gt;L&lt;

Gioco, is the problem that you don't know how to insert the problem in the design surface? Or that you don't know how to get it to show up in the data that you're working with when designing the report?

>L< United States

2/27/2010 12:01:30 PM #

&gt;L&lt;

(sorry Gioco I meant "insert the column")

>L< United States

3/17/2010 8:15:26 PM #

Batteriladdare

I'm really confused when I see tons of codes like that. I really want to study this languages especially PHP and CSS but I can't find free time.

Batteriladdare United States

6/30/2010 5:21:27 AM #

web designing company

It's really nice and great information you have provided us. Thanks very much for this.

web designing company India

6/30/2010 8:41:16 AM #

Sole Treadmills

Thanks for information on this tool, very useful

Sole Treadmills United States

7/2/2010 2:49:50 AM #

washing machine

thanks for the information. that was a very useful one. i even book marked this page for future reference.

washing machine United Kingdom

7/2/2010 5:35:25 AM #

seo specialist

Thanks for this informative post, I have found so many important points in this post. And I am very interested to know that there is a new button to TestHarness, to load a full folder of RDL/RDLCs to a server at once,and also  there is the production-grade SSIS package into the deployment set of files.

seo specialist United States

7/2/2010 11:42:56 PM #

Global&#160;SEO

Web design is a complex, but essential ongoing activity. Before creating and uploading a website, it is important to take the time to plan exactly what is needed in the website. Thoroughly considering the audience or target market, as well as defining the purpose and deciding what content will be developed, are extremely important.

Global SEO United States

7/7/2010 10:37:26 PM #

Prescott

The designer widget is a great idea, thanks!

Prescott United States

7/7/2010 10:42:50 PM #

AZ

Yes, I agree too. Looking forward to using The Designer Widget...

AZ United States

7/8/2010 7:27:16 AM #

mi  car insurance

I have added a new button to TestHarness to load a full folder of RDL/RDLCs to a server at once. Thanks.

mi car insurance United States

8/1/2010 1:01:33 PM #

zyban

Lisa, how to develop a report? how to contact you?

zyban United Kingdom

8/10/2010 4:10:38 AM #

tv dump

that's very good info
i think i will put some my own blog Laughing
cheers
http://zoodiscounts.net

tv dump United States

8/18/2010 4:13:14 AM #

Minnesota Landscaping

Techspoken provides more idea for documenting of datas and this designer has great idea to develop the report.

Minnesota Landscaping United States

8/18/2010 4:17:47 AM #

Minnesota Landscaping

Techspoken provides more idea for documenting of datas and this designer has great idea to develop the report.

Minnesota Landscaping United States

8/27/2010 10:25:04 AM #

annuaire g&#233;n&#233;raliste

Nice article. Thanks a lot

annuaire généraliste Belgium

8/30/2010 3:23:45 PM #

araba oyunlari

I like it ! nice

araba oyunlari Netherlands

9/5/2010 8:46:50 AM #

Notebooki

Thx very useful!

Notebooki Poland

9/17/2010 12:48:49 AM #

buy dmaa

Thanks for the useful file. I can't wait to start using it. One thing though, will you have an update coming soon?

buy dmaa United States

9/17/2010 6:25:57 AM #

&gt;L&lt;

Buy DMAA: If you are a real person: I'm hoping to get back to XMLRSDocs soon, yes.  The update needed is really not a big deal, it's just XSLT changes.

>L< United States

9/17/2010 6:44:58 AM #

free Flashget download

I like reading your articles. I absolutely enjoyed every little bit of it. I have you bookmark your blog to check out the new stuff in future.

free Flashget download United States

11/3/2010 1:20:58 AM #

nevada car insurance

Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful. Thanks.
  

nevada car insurance United States

11/4/2010 1:04:27 PM #

BMX Helmet

It looks like you really love coding, but not diagrams so much Tong.

BMX Helmet Canada

11/8/2010 1:34:47 AM #

regcure

Sounds like you did a good job of handling something that is very difficult

regcure United States

11/8/2010 1:36:23 AM #

steve

Wow, that sounds like hard work!

steve United States

11/11/2010 4:20:04 AM #

QT project online

Just finished my testing of new tool. It works extremely good. I was able to add custom documentation to all RDLs. Also I've got output documentation files in convinient data format.

QT project online United States

11/12/2010 11:46:45 PM #

car insurance florida

To get a picture of the fields in use in reporting datasets, which is what we really need right now for our team, you only need to get the embedded information into a database so you can query it properly. Thanks for sharing.
  

car insurance florida United States

11/14/2010 10:03:56 PM #

tea gift sets

sorry if this is a stupid question. You say C was visiting you, who is C?

tea gift sets United States

11/26/2010 11:15:22 AM #

&gt;L&lt;

Tootsie234: C is my better half. Check out the rest of the contents on this site...

>L< United States

5/11/2011 8:04:04 AM #

Online Bookstore Australia

Great flowchart. I really like the visualisation.

Online Bookstore Australia United States

6/18/2011 6:29:43 AM #

HD204UI Samsung

Great article. This goes to show what can be achieved with Microsoft SQL Server

HD204UI Samsung United Kingdom

7/27/2011 2:27:00 AM #

Vaibhav

hello, explanation is nice but i am not into programming so i dont understand, i only do website designe and provide seo services.

Vaibhav United States

8/5/2011 2:30:36 PM #

Dealer Websites

Just starting using RS 2008 semantic models so this will come in handy and cut out alot of hunt and peck coding. I'll follow what you laid out first and then check back if I have more questions Thanks

Dealer Websites United States

10/30/2011 10:02:57 PM #

james

Hi
I’m going to spend more time learning about this topic

james

Pingbacks and trackbacks (1)+

Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading