<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>VibrantCode - DNN</title>
    <link>http://blog.andrewnurse.net/</link>
    <description>Oooh...pretty code</description>
    <language>en-us</language>
    <copyright>Andrew Nurse</copyright>
    <lastBuildDate>Tue, 21 Apr 2009 22:22:14 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>andrew@andrewnurse.net</managingEditor>
    <webMaster>andrew@andrewnurse.net</webMaster>
    <item>
      <trackback:ping>http://blog.andrewnurse.net/Trackback.aspx?guid=cf83b2ef-bb7e-4129-9412-e3d5fc6ad0d2</trackback:ping>
      <pingback:server>http://blog.andrewnurse.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.andrewnurse.net/PermaLink,guid,cf83b2ef-bb7e-4129-9412-e3d5fc6ad0d2.aspx</pingback:target>
      <dc:creator>Andrew Nurse</dc:creator>
      <wfw:comment>http://blog.andrewnurse.net/CommentView,guid,cf83b2ef-bb7e-4129-9412-e3d5fc6ad0d2.aspx</wfw:comment>
      <wfw:commentRss>http://blog.andrewnurse.net/SyndicationService.asmx/GetEntryCommentsRss?guid=cf83b2ef-bb7e-4129-9412-e3d5fc6ad0d2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Well, it's official.  Assuming I pass
the two courses I haven't received grades from, I completed my final day of continuous
education (well, except for the summer breaks/internships) for 18 straight years (K-12
+ 5 years of post-secondary) today.  I've already got marks for 3 of the 5 courses
I took this year, and they were pretty good (couple of A's and a B).  This semester
has been a bit of a strange one, since I had only one computing science course and
it was a "Writing for Computer Scientists" course which involved no programming! (Despite
that, it was one of my favorite courses this semester :D).  I took introductory
courses in Communications, Linguistics and Nutrition as well as a intro to the Physics
of Sound and Music entitled "Logarithm and Blues" taught by a two-man team of a musician
and a physicist (sorry "Writing for Computing Scientists", this one takes the top
slot this semester :)).<br /><br />
Now that I'm finished school, probably for a while (still eying a part-time masters
at University of Washington when I've been at Microsoft for a while), I can settle
down and finish up a few side-projects and some DNN Reports work.  Reports Module
version 5.1 is finished from a code perspective and contains a number of bugfixes
(details to come) as well as two new features:<br /><ul><li>
XSLT Extension Objects - The XSLT Visualizer now allows you to provide a list of .Net
Types which are constructed at runtime and mapped into the XSLT file as XML namespaces.</li><li>
Experimental and mostly hacky support for QueryString parameters in Report Queries
- A number of people have been asking for this, and it's a relatively simple feature
in the Reports Module architecture.  On the settings page, you can provide a
comma-separated list of QueryString parameters which will be passed to the Report
Query.  The parameters are prefixed with "url_" in the query to distinguish them
from the existing parameters.  NOTE: Don't forget that many Databases use still
another prefix, such as SQL Server ("@"), so for example, the full name of the SQL
Server parameter mapped to "foobar" QueryString parameter is "@url_foobar". 
This is only a stopgap solution to allow for some linking into Reports with parameters,
so expect the next version to include a more detailed system (<b>which <i><u>may</u></i> include
breaking changes which <u><i>will </i></u>require that you update your queries</b>).
I'll do my best to support an upgrade path, but no promises, so <i><u><b>use at your
own risk</b></u></i></li></ul>
I just need to do some testing and then I'll put 5.1 into the release process. 
I expect to do that this week, so depending on how long it takes the diligent reviewers
in the release process to make sure that the new version won't obliterate your existing
site (and believe me, you don't want to rush that!), it should be out very soon!<br /><br />
Moving on to a new project...  I've been hinting to some of the people in the
internal project forums at DotNetNuke that I've been working on a top-secret project
involving MVC.  (This is a pure side-project, not part of the DNN Project at
all).  I'm very close to releasing something which, I think, is pretty cool. 
I'll keep the secret for now, but let's say this: I've been working on/with DotNetNuke
for a few years, and I've a huge fan of ASP.Net MVC.  I've learned a lot from
DNN and I think MVC users can benefit from some of that experience ;).  I'm <i>hoping</i> to
have something ready on this secret project, which I call "MaVeriCk", in the next
week or two (but Reports 5.1 is my priority at the moment).<br /><br />
Hope that teased you just enough to stay tuned :P<br /><p></p><img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=cf83b2ef-bb7e-4129-9412-e3d5fc6ad0d2" /></body>
      <title>School is done!  On to Reports, and something else ;)</title>
      <guid isPermaLink="false">http://blog.andrewnurse.net/PermaLink,guid,cf83b2ef-bb7e-4129-9412-e3d5fc6ad0d2.aspx</guid>
      <link>http://blog.andrewnurse.net/2009/04/21/SchoolIsDoneOnToReportsAndSomethingElse.aspx</link>
      <pubDate>Tue, 21 Apr 2009 22:22:14 GMT</pubDate>
      <description>Well, it's official.&amp;nbsp; Assuming I pass the two courses I haven't received grades from, I completed my final day of continuous education (well, except for the summer breaks/internships) for 18 straight years (K-12 + 5 years of post-secondary) today.&amp;nbsp; I've already got marks for 3 of the 5 courses I took this year, and they were pretty good (couple of A's and a B).&amp;nbsp; This semester has been a bit of a strange one, since I had only one computing science course and it was a "Writing for Computer Scientists" course which involved no programming! (Despite that, it was one of my favorite courses this semester :D).&amp;nbsp; I took introductory courses in Communications, Linguistics and Nutrition as well as a intro to the Physics of Sound and Music entitled "Logarithm and Blues" taught by a two-man team of a musician and a physicist (sorry "Writing for Computing Scientists", this one takes the top slot this semester :)).&lt;br&gt;
&lt;br&gt;
Now that I'm finished school, probably for a while (still eying a part-time masters
at University of Washington when I've been at Microsoft for a while), I can settle
down and finish up a few side-projects and some DNN Reports work.&amp;nbsp; Reports Module
version 5.1 is finished from a code perspective and contains a number of bugfixes
(details to come) as well as two new features:&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
XSLT Extension Objects - The XSLT Visualizer now allows you to provide a list of .Net
Types which are constructed at runtime and mapped into the XSLT file as XML namespaces.&lt;/li&gt;
&lt;li&gt;
Experimental and mostly hacky support for QueryString parameters in Report Queries
- A number of people have been asking for this, and it's a relatively simple feature
in the Reports Module architecture.&amp;nbsp; On the settings page, you can provide a
comma-separated list of QueryString parameters which will be passed to the Report
Query.&amp;nbsp; The parameters are prefixed with "url_" in the query to distinguish them
from the existing parameters.&amp;nbsp; NOTE: Don't forget that many Databases use still
another prefix, such as SQL Server ("@"), so for example, the full name of the SQL
Server parameter mapped to "foobar" QueryString parameter is "@url_foobar".&amp;nbsp;
This is only a stopgap solution to allow for some linking into Reports with parameters,
so expect the next version to include a more detailed system (&lt;b&gt;which &lt;i&gt;&lt;u&gt;may&lt;/u&gt;&lt;/i&gt; include
breaking changes which &lt;u&gt;&lt;i&gt;will &lt;/i&gt;&lt;/u&gt;require that you update your queries&lt;/b&gt;).
I'll do my best to support an upgrade path, but no promises, so &lt;i&gt;&lt;u&gt;&lt;b&gt;use at your
own risk&lt;/b&gt;&lt;/u&gt;&lt;/i&gt;
&lt;/li&gt;
&lt;/ul&gt;
I just need to do some testing and then I'll put 5.1 into the release process.&amp;nbsp;
I expect to do that this week, so depending on how long it takes the diligent reviewers
in the release process to make sure that the new version won't obliterate your existing
site (and believe me, you don't want to rush that!), it should be out very soon!&lt;br&gt;
&lt;br&gt;
Moving on to a new project...&amp;nbsp; I've been hinting to some of the people in the
internal project forums at DotNetNuke that I've been working on a top-secret project
involving MVC.&amp;nbsp; (This is a pure side-project, not part of the DNN Project at
all).&amp;nbsp; I'm very close to releasing something which, I think, is pretty cool.&amp;nbsp;
I'll keep the secret for now, but let's say this: I've been working on/with DotNetNuke
for a few years, and I've a huge fan of ASP.Net MVC.&amp;nbsp; I've learned a lot from
DNN and I think MVC users can benefit from some of that experience ;).&amp;nbsp; I'm &lt;i&gt;hoping&lt;/i&gt; to
have something ready on this secret project, which I call "MaVeriCk", in the next
week or two (but Reports 5.1 is my priority at the moment).&lt;br&gt;
&lt;br&gt;
Hope that teased you just enough to stay tuned :P&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=cf83b2ef-bb7e-4129-9412-e3d5fc6ad0d2" /&gt;</description>
      <comments>http://blog.andrewnurse.net/CommentView,guid,cf83b2ef-bb7e-4129-9412-e3d5fc6ad0d2.aspx</comments>
      <category>DNN</category>
      <category>MaVeriCk</category>
      <category>MVC</category>
      <category>Reports Module</category>
    </item>
    <item>
      <trackback:ping>http://blog.andrewnurse.net/Trackback.aspx?guid=9425e19f-3119-4880-9f2f-cd5b5c445825</trackback:ping>
      <pingback:server>http://blog.andrewnurse.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.andrewnurse.net/PermaLink,guid,9425e19f-3119-4880-9f2f-cd5b5c445825.aspx</pingback:target>
      <dc:creator>Andrew Nurse</dc:creator>
      <wfw:comment>http://blog.andrewnurse.net/CommentView,guid,9425e19f-3119-4880-9f2f-cd5b5c445825.aspx</wfw:comment>
      <wfw:commentRss>http://blog.andrewnurse.net/SyndicationService.asmx/GetEntryCommentsRss?guid=9425e19f-3119-4880-9f2f-cd5b5c445825</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hello avid readers!  It’s been over a week since I blogged, I know, but I’ve
been cramming for exams.  The CMPT 376 assignment I mentioned a while ago has
finished, so I’m no longer required to blog for grades.  Having said that, after
exams, I plan to keep blogging, so keep watching the feed :).
</p>
        <p>
Just to tease you a bit: I’ve got a cool little ASP.Net MVC side-project well underway
that I’m just dying to show off on the blog, so stick around :P
</p>
        <p>
Also, to the Reports Module users out there, 5.1 is very close to being finished. 
There may be a surprise new feature in there too.  Details to follow later :D.
</p>
        <img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=9425e19f-3119-4880-9f2f-cd5b5c445825" />
      </body>
      <title>I&amp;rsquo;m still here&amp;hellip; just cramming&amp;hellip; and working</title>
      <guid isPermaLink="false">http://blog.andrewnurse.net/PermaLink,guid,9425e19f-3119-4880-9f2f-cd5b5c445825.aspx</guid>
      <link>http://blog.andrewnurse.net/2009/04/10/IrsquomStillHerehellipJustCramminghellipAndWorking.aspx</link>
      <pubDate>Fri, 10 Apr 2009 21:42:49 GMT</pubDate>
      <description>&lt;p&gt;
Hello avid readers!&amp;#160; It’s been over a week since I blogged, I know, but I’ve
been cramming for exams.&amp;#160; The CMPT 376 assignment I mentioned a while ago has
finished, so I’m no longer required to blog for grades.&amp;#160; Having said that, after
exams, I plan to keep blogging, so keep watching the feed :).
&lt;/p&gt;
&lt;p&gt;
Just to tease you a bit: I’ve got a cool little ASP.Net MVC side-project well underway
that I’m just dying to show off on the blog, so stick around :P
&lt;/p&gt;
&lt;p&gt;
Also, to the Reports Module users out there, 5.1 is very close to being finished.&amp;#160;
There may be a surprise new feature in there too.&amp;#160; Details to follow later :D.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=9425e19f-3119-4880-9f2f-cd5b5c445825" /&gt;</description>
      <comments>http://blog.andrewnurse.net/CommentView,guid,9425e19f-3119-4880-9f2f-cd5b5c445825.aspx</comments>
      <category>Cool Software</category>
      <category>DNN</category>
      <category>MVC</category>
      <category>Reports Module</category>
    </item>
    <item>
      <trackback:ping>http://blog.andrewnurse.net/Trackback.aspx?guid=4159504d-84ed-4198-abca-2e14bceecd83</trackback:ping>
      <pingback:server>http://blog.andrewnurse.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.andrewnurse.net/PermaLink,guid,4159504d-84ed-4198-abca-2e14bceecd83.aspx</pingback:target>
      <dc:creator>Andrew Nurse</dc:creator>
      <wfw:comment>http://blog.andrewnurse.net/CommentView,guid,4159504d-84ed-4198-abca-2e14bceecd83.aspx</wfw:comment>
      <wfw:commentRss>http://blog.andrewnurse.net/SyndicationService.asmx/GetEntryCommentsRss?guid=4159504d-84ed-4198-abca-2e14bceecd83</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Did you know that the largest open-source project on the Microsoft platform was started
in Vancouver, Canada?  It’s true!  DotNetNuke is the largest Open-Source
community in the .Net by downloads (at least).  Since moving to CodePlex (Microsoft’s
Open-Source hosting platform) in January 2009, DNN has been downloaded over 180,000
times (at time of writing).  This makes it second only to a World Of Warcraft
Add-On development studio which has been on CodePlex since Sept 2007 (at least that
was the earliest check-in I could find).  Adding that to the all-time download
score on SourceForge (the project’s previous host) of <strong>4.3 Million downloads</strong>,
and you’ve got the the largest .Net open-source project (and one which I am proud
to <a href="http://www.dotnetnuke.com/Products/Development/Forge/ModuleReports/tabid/970/Default.aspx" target="_blank">contribute
to</a>)!
</p>
        <p>
And here’s the great part for us Canucks, DotNetNuke was created right here (by “here”,
I mean where I live :P) in Vancouver!
</p>
        <p>
Microsoft Canada is running a contest called the “Ignite It” award to honour Canadian
developers and IT professionals.  DotNetNuke is nominated in the Developer category,
and we’re looking for your votes!  There’s only 2 days left, and we’re in the
top 5 (which will go on to be judged).  Still, we’d like to be up at number one
before voting ends, so here comes the shameless plug :P.  Here’s the deal: You
can vote once per Windows Live account per day (though there aren’t many days left
:( ).  It only takes a second to vote, and I’ve even created a TinyURL to share
with your friends: <a href="http://tinyurl.com/dnnigniteit">http://tinyurl.com/dnnigniteit</a></p>
        <p>
Let’s push DNN into the top spot!
</p>
        <img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=4159504d-84ed-4198-abca-2e14bceecd83" />
      </body>
      <title>DotNetNuke on IgniteIT</title>
      <guid isPermaLink="false">http://blog.andrewnurse.net/PermaLink,guid,4159504d-84ed-4198-abca-2e14bceecd83.aspx</guid>
      <link>http://blog.andrewnurse.net/2009/03/30/DotNetNukeOnIgniteIT.aspx</link>
      <pubDate>Mon, 30 Mar 2009 06:47:18 GMT</pubDate>
      <description>&lt;p&gt;
Did you know that the largest open-source project on the Microsoft platform was started
in Vancouver, Canada?&amp;#160; It’s true!&amp;#160; DotNetNuke is the largest Open-Source
community in the .Net by downloads (at least).&amp;#160; Since moving to CodePlex (Microsoft’s
Open-Source hosting platform) in January 2009, DNN has been downloaded over 180,000
times (at time of writing).&amp;#160; This makes it second only to a World Of Warcraft
Add-On development studio which has been on CodePlex since Sept 2007 (at least that
was the earliest check-in I could find).&amp;#160; Adding that to the all-time download
score on SourceForge (the project’s previous host) of &lt;strong&gt;4.3 Million downloads&lt;/strong&gt;,
and you’ve got the the largest .Net open-source project (and one which I am proud
to &lt;a href="http://www.dotnetnuke.com/Products/Development/Forge/ModuleReports/tabid/970/Default.aspx" target="_blank"&gt;contribute
to&lt;/a&gt;)!
&lt;/p&gt;
&lt;p&gt;
And here’s the great part for us Canucks, DotNetNuke was created right here (by “here”,
I mean where I live :P) in Vancouver!
&lt;/p&gt;
&lt;p&gt;
Microsoft Canada is running a contest called the “Ignite It” award to honour Canadian
developers and IT professionals.&amp;#160; DotNetNuke is nominated in the Developer category,
and we’re looking for your votes!&amp;#160; There’s only 2 days left, and we’re in the
top 5 (which will go on to be judged).&amp;#160; Still, we’d like to be up at number one
before voting ends, so here comes the shameless plug :P.&amp;#160; Here’s the deal: You
can vote once per Windows Live account per day (though there aren’t many days left
:( ).&amp;#160; It only takes a second to vote, and I’ve even created a TinyURL to share
with your friends: &lt;a href="http://tinyurl.com/dnnigniteit"&gt;http://tinyurl.com/dnnigniteit&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Let’s push DNN into the top spot!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=4159504d-84ed-4198-abca-2e14bceecd83" /&gt;</description>
      <comments>http://blog.andrewnurse.net/CommentView,guid,4159504d-84ed-4198-abca-2e14bceecd83.aspx</comments>
      <category>CMPT 376</category>
      <category>DNN</category>
    </item>
    <item>
      <trackback:ping>http://blog.andrewnurse.net/Trackback.aspx?guid=e608612d-51d2-4bee-94cf-53366df772d9</trackback:ping>
      <pingback:server>http://blog.andrewnurse.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.andrewnurse.net/PermaLink,guid,e608612d-51d2-4bee-94cf-53366df772d9.aspx</pingback:target>
      <dc:creator>Andrew Nurse</dc:creator>
      <wfw:comment>http://blog.andrewnurse.net/CommentView,guid,e608612d-51d2-4bee-94cf-53366df772d9.aspx</wfw:comment>
      <wfw:commentRss>http://blog.andrewnurse.net/SyndicationService.asmx/GetEntryCommentsRss?guid=e608612d-51d2-4bee-94cf-53366df772d9</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
So, I downloaded and installed the IE8 Beta yesterday and decided to play around with <a href="http://www.microsoft.com/windows/products/winfamily/ie/ie8/features.mspx">WebSlices</a>.
I found it really easy to create a simple WebSlice (just apply some CSS Classes) and
I decided to try and do this with the Reports Module.
</p>
        <p>
I was suprised with just how easy it was! I have already created a replacement ViewReports.ascx
file that turns every Reports Module into a WebSlice. I've attached the new file here,
just replace your existing DesktopModules/Reports/ViewReports.ascx file with it if
you want to check it out. Any Visualizer should work, but I've only tried the Grid.
</p>
        <p>
CAUTION: This is for preview purposes ONLY! This replacement file has NOT been tested
in ANY SIGNIFICANT WAY (other than trying it out once). Back up your existing ViewReports.ascx
file BEFORE using this!
</p>
        <p>
Here's the popup you see when you view a report
</p>
        <img border="0" src="http://blog.andrewnurse.net/content/binary/webslice_popup_screenshot.png" />
        <p>
And here's a screenshot of the WebSlice in action:
</p>
        <p>
          <img border="0" src="http://blog.andrewnurse.net/content/binary/webslice_screenshot.png" />
        </p>
        <p>
Anyway, the file is attached. Try it out on one of your test sites! I'll probably
integrate this into an upcoming version in a more configurable way, since it's so
easy :).
</p>
        <p>
          <a href="http://blog.andrewnurse.net/content/binary/ViewReports.zip">ViewReports.zip
(.54 KB)</a>
        </p>
        <p>
UPDATE: Changed to a ZIP file
</p>
        <img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=e608612d-51d2-4bee-94cf-53366df772d9" />
      </body>
      <title>Playing with IE8: Reports Module as a WebSlice</title>
      <guid isPermaLink="false">http://blog.andrewnurse.net/PermaLink,guid,e608612d-51d2-4bee-94cf-53366df772d9.aspx</guid>
      <link>http://blog.andrewnurse.net/2008/03/06/PlayingWithIE8ReportsModuleAsAWebSlice.aspx</link>
      <pubDate>Thu, 06 Mar 2008 19:51:51 GMT</pubDate>
      <description>&lt;p&gt;
So, I downloaded and installed the IE8 Beta yesterday and decided to play around with &lt;a href="http://www.microsoft.com/windows/products/winfamily/ie/ie8/features.mspx"&gt;WebSlices&lt;/a&gt;.
I found it really easy to create a simple WebSlice (just apply some CSS Classes) and
I decided to try and do this with the Reports Module.
&lt;/p&gt;
&lt;p&gt;
I was suprised with just how easy it was! I have already created a replacement ViewReports.ascx
file that turns every Reports Module into a WebSlice. I've attached the new file here,
just replace your existing DesktopModules/Reports/ViewReports.ascx file with it if
you want to check it out. Any Visualizer should work, but I've only tried the Grid.
&lt;/p&gt;
&lt;p&gt;
CAUTION: This is for preview purposes ONLY! This replacement file has NOT been tested
in ANY SIGNIFICANT WAY (other than trying it out once). Back up your existing ViewReports.ascx
file BEFORE using this!
&lt;/p&gt;
&lt;p&gt;
Here's the popup you see when you view a report
&lt;/p&gt;
&lt;img border="0" src="http://blog.andrewnurse.net/content/binary/webslice_popup_screenshot.png"&gt; 
&lt;p&gt;
And here's a screenshot of the WebSlice in action:
&lt;/p&gt;
&lt;p&gt;
&lt;img border=0 src="http://blog.andrewnurse.net/content/binary/webslice_screenshot.png"&gt;
&lt;/p&gt;
&lt;p&gt;
Anyway, the file is attached. Try it out on one of your test sites! I'll probably
integrate this into an upcoming version in a more configurable way, since it's so
easy :).
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.andrewnurse.net/content/binary/ViewReports.zip"&gt;ViewReports.zip
(.54 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
UPDATE: Changed to a ZIP file
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=e608612d-51d2-4bee-94cf-53366df772d9" /&gt;</description>
      <comments>http://blog.andrewnurse.net/CommentView,guid,e608612d-51d2-4bee-94cf-53366df772d9.aspx</comments>
      <category>DNN</category>
      <category>Reports Module</category>
    </item>
    <item>
      <trackback:ping>http://blog.andrewnurse.net/Trackback.aspx?guid=195f9774-95f7-49dc-a21a-3f32f1f8c31b</trackback:ping>
      <pingback:server>http://blog.andrewnurse.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.andrewnurse.net/PermaLink,guid,195f9774-95f7-49dc-a21a-3f32f1f8c31b.aspx</pingback:target>
      <dc:creator>Andrew Nurse</dc:creator>
      <wfw:comment>http://blog.andrewnurse.net/CommentView,guid,195f9774-95f7-49dc-a21a-3f32f1f8c31b.aspx</wfw:comment>
      <wfw:commentRss>http://blog.andrewnurse.net/SyndicationService.asmx/GetEntryCommentsRss?guid=195f9774-95f7-49dc-a21a-3f32f1f8c31b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In this series of blogs, I'm going to follow the development of an RSS Data Source.
I'm going to use Visual Studio 2008, but I'll be using .Net 2.0 features so you should
be able to follow along in Visual Studio 2005. You can also use the Express editions
of Visual Web Developer (both 2005 and 2008 versions should work). All the code will
be in VB.Net, but it should be straightforward enough for C# developers to understand
(after all, its all .Net)
</p>
        <p>
Continued from <a href="http://blog.andrewnurse.net/2008/02/29/DevelopingAnRSSDataSourcePartII.aspx"><font color="#547699">Part
II</font></a>.
</p>
        <h2>Part III - Settings
</h2>
        <p>
In this part, we're going to add a setting page so that we can change the RSS feed
that our Data Source downloads.
</p>
        <p>
In current versions of the Reports Module, Data Source settings are stored in the
ModuleSettings table provided by DotNetNuke. This ensures that all copies of the same
module instance will share the same Data Source settings (Visualizer settings are <strong>not</strong> shared
between copies). However, Data Source developers need not (and <strong>should</strong><strong>not</strong>)
access these directly. Instead, the Reports Module provides a layer on top of the
ModuleSettings table called "Data Source Settings". When the Data Source is executed,
the Reports Module passes a Dictionary containing these settings (inside the ReportInfo
object). To allow users to edit the settings, we go back to the Settings.ascx file
we created in <a href="Part1.htm">Part I</a>.
</p>
        <p>
Let's start with the user interface for our settings page. All we need for now is
a place for the user to enter a feed URL. When we're done, it should look like the
screenshot below
</p>
        <div class="captioned_image">
          <img alt="The finished settings UI" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part3/IE-FullFinishedSettings.png" />
          <p class="caption">
Figure 1 - The finished settings UI
</p>
        </div>
        <p>
So, open up the <em>Settings.ascx</em> file and make sure you are in <kbd>Design</kbd> mode.
First we need to add a label, so users know what they should type in our text box.
In the Solution Explorer, find the file: <em>controls/labelcontrol.ascx</em> and drag
it on to the design surface.
</p>
        <div class="captioned_image">
          <img alt="Locating the LabelControl.ascx file" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part3/VS-LabelControl.png" />
          <p class="caption">
Figure 2 - Locating the LabelControl.ascx file
</p>
        </div>
        <p>
Next drag an ASP.Net TextBox control, from the Toolbox, on to the surface. You should
have something that looks like this:
</p>
        <div class="captioned_image">
          <img alt="Locating the LabelControl.ascx file" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part3/VS-DesignSurface.png" />
          <p class="caption">
Figure 3 - Locating the LabelControl.ascx file
</p>
        </div>
        <p>
Now, set the properties of the controls to the following values:
</p>
        <table>
          <thead>
            <tr>
              <th>
Property</th>
              <th>
Value for Label</th>
              <th>
Value for Text Box</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>
                <kbd>ID</kbd>
              </td>
              <td>
feedUrlLabel</td>
              <td>
feedUrlTextBox</td>
            </tr>
            <tr>
              <td>
                <kbd>ControlName</kbd>
              </td>
              <td>
feedUrlTextBox</td>
              <td>
N/A</td>
            </tr>
            <tr>
              <td>
                <kbd>Width</kbd>
              </td>
              <td>
N/A</td>
              <td>
100%</td>
            </tr>
          </tbody>
        </table>
        <p>
Save your changes, and open up the code file: <em>Settings.ascx.vb</em>. Here, we
need to add code to connect our text box to the Data Source settings. The key to this
is the <kbd>LoadSettings</kbd> and <kbd>SaveSettings</kbd> methods provided by <kbd>ReportsSettingsBase</kbd>.
First, we need to import some extra namespaces:
</p>
        <!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red204\green120\blue50;\red0\green0\blue0;\red255\green255\blue255;}??\fs26 \cf1\cb2\highlight2 {\b Imports}\cf3 {\b  DotNetNuke.Modules.Reports}\par ??\cf1 {\b Imports}\cf3 {\b  System.Collections.Generic}}
-->
        <div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas">
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">Imports</span> DotNetNuke.Modules.Reports
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">Imports</span> System.Collections.Generic
</p>
        </div>
        <p>
Then, we can implement the <kbd>LoadSettings</kbd> and <kbd>SaveSettings</kbd> methods.
</p>
        <!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red165\green194\blue92;}??\fs26 \cf1\cb2\highlight2 {\b     }\cf3 {\b Public}\cf1 {\b  }\cf3 {\b Overrides}\cf1 {\b  }\cf3 {\b Sub}\cf1 {\b  LoadSettings(}\cf3 {\b ByVal}\cf1 {\b  Settings }\cf3 {\b As}\cf1 {\b  Dictionary(}\cf3 {\b Of}\cf1 {\b  }\cf3 {\b String}\cf1 {\b , }\cf3 {\b String}\cf1 {\b ))}\par ??{\b         }\cf3 {\b MyBase}\cf1 {\b .LoadSettings(Settings)}\par ??{\b         feedUrlTextBox.Text = SettingsUtil.GetDictionarySetting(Settings, _}\par ??{\b                                                                 }\cf4 "FeedUrl"\cf1 {\b , _}\par ??{\b                                                                 }\cf3 {\b String}\cf1 {\b .Empty)}\par ??{\b     }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Sub}\par ??\par ??\cf1 {\b     }\cf3 {\b Public}\cf1 {\b  }\cf3 {\b Overrides}\cf1 {\b  }\cf3 {\b Sub}\cf1 {\b  SaveSettings(}\cf3 {\b ByVal}\cf1 {\b  Settings }\cf3 {\b As}\cf1 {\b  Dictionary(}\cf3 {\b Of}\cf1 {\b  }\cf3 {\b String}\cf1 {\b , }\cf3 {\b String}\cf1 {\b ))}\par ??{\b         }\cf3 {\b MyBase}\cf1 {\b .SaveSettings(Settings)}\par ??{\b         Settings(}\cf4 "FeedUrl"\cf1 {\b ) = feedUrlTextBox.Text}\par ??{\b     }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Sub}}
-->
        <div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas">
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">Public</span>
            <span style="COLOR: #cc7832">Overrides</span>
            <span style="COLOR: #cc7832">Sub</span> LoadSettings(<span style="COLOR: #cc7832">ByVal</span> Settings <span style="COLOR: #cc7832">As</span> Dictionary(<span style="COLOR: #cc7832">Of</span><span style="COLOR: #cc7832">String</span>, <span style="COLOR: #cc7832">String</span>))
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #cc7832">MyBase</span>.LoadSettings(Settings)
</p>
          <p style="MARGIN: 0px">
    feedUrlTextBox.Text = SettingsUtil.GetDictionarySetting(Settings,
_
</p>
          <p style="MARGIN: 0px">
                   
                   
                    <span style="FONT-WEIGHT: normal; COLOR: #a5c25c">"FeedUrl"</span>,
_
</p>
          <p style="MARGIN: 0px">
                   
                   
                    <span style="COLOR: #cc7832">String</span>.Empty)
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">End</span>
            <span style="COLOR: #cc7832">Sub</span>
          </p>
          <p style="MARGIN: 0px">
 
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">Public</span>
            <span style="COLOR: #cc7832">Overrides</span>
            <span style="COLOR: #cc7832">Sub</span> SaveSettings(<span style="COLOR: #cc7832">ByVal</span> Settings <span style="COLOR: #cc7832">As</span> Dictionary(<span style="COLOR: #cc7832">Of</span><span style="COLOR: #cc7832">String</span>, <span style="COLOR: #cc7832">String</span>))
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #cc7832">MyBase</span>.SaveSettings(Settings)
</p>
          <p style="MARGIN: 0px">
    Settings(<span style="FONT-WEIGHT: normal; COLOR: #a5c25c">"FeedUrl"</span>)
= feedUrlTextBox.Text
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">End</span>
            <span style="COLOR: #cc7832">Sub</span>
          </p>
        </div>
        <p>
The <kbd>LoadSettings</kbd> method is provided with a <kbd>System.Collections.Generic.Dictionary(Of
String, String)</kbd> containing the current settings saved for the Data Source. Our
implementation uses the <kbd>SettingsUtil</kbd> helper class (provided with the Reports
Module) to retrieve a value from the dictionary, or return a default value if it doesn't
exist (in this case, an empty string).
</p>
        <p>
The <kbd>SaveSettings</kbd> method is also provided with the current settings. However,
this method is responsible for retrieving the values entered by the user and updating
the settings.
</p>
        <p>
Save the file, and navigate to the Settings page on your test module. You should see
our new Settings control displayed, as in the screenshot below:
</p>
        <div class="captioned_image">
          <img alt="Settings page so far" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part3/IE-EmptySettings.png" />
          <p class="caption">
Figure 4 - Settings page so far
</p>
        </div>
        <p>
Oops, we still need to put the label text in! We're going to support the DotNetNuke
Localization Framework, so we need to put the text in two places.
</p>
        <p>
First, lets add the localized text. Create a Resource File called<em> Settings.ascx.resx </em>in <em>/DesktopModules/Reports/DataSources/RSS/App_LocalResources</em> file
and open it. In Visual Studio, you get a nice table interface for editing resource
strings. Add the following entries to the table (feel free to tweak the values as
you want, just keep the name the same):
</p>
        <table>
          <thead>
            <tr>
              <th>
Name</th>
              <th>
Value</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>
                <kbd>feedUrlLabel.Text</kbd>
              </td>
              <td>
RSS Feed URL</td>
            </tr>
            <tr>
              <td>
                <kbd>feedUrlLabel.Help</kbd>
              </td>
              <td>
Enter the URL to an RSS feed to retrieve data from</td>
            </tr>
          </tbody>
        </table>
        <p>
Your resource file should look like this after making those changes
</p>
        <div class="captioned_image">
          <img alt="Resource File after entering values" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part3/VS-ResourceFile.png" />
          <p class="caption">
Figure 5 - Resource File after entering values
</p>
        </div>
        <p>
Now, go back to <em>Settings.ascx</em> and set the following properties on the label
we created earlier:
</p>
        <table>
          <thead>
            <tr>
              <th>
Property</th>
              <th>
Value</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>
                <kbd>Text</kbd>
              </td>
              <td>
RSS Feed URL</td>
            </tr>
            <tr>
              <td>
                <kbd>Suffix</kbd>
              </td>
              <td>
:</td>
            </tr>
            <tr>
              <td>
                <kbd>CssClass</kbd>
              </td>
              <td>
SubHead</td>
            </tr>
          </tbody>
        </table>
        <p>
Note: That's a colon (':') in the Suffix property. Also, <kbd>CssClass</kbd> is case
sensitive.
</p>
        <p>
Now, save and refresh your page. You should see something like the screen shot below:
</p>
        <div class="captioned_image">
          <img alt="Finished Settings UI" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part3/IE-FinishedSettingsUI.png" />
          <p class="caption">
Figure 6 - The finished Feed URL text box
</p>
        </div>
        <p>
Now, to change our Data Source code to use this new setting. Let's go back to the <em>/App_Code/RSSDataSource/RSSDataSource.vb</em> file
and take a look at the signature for the <kbd>ExecuteReport</kbd> method:
</p>
        <!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;}??\fs26 \cf1\cb2\highlight2 {\b     }\cf3 {\b Public}\cf1 {\b  }\cf3 {\b Overrides}\cf1 {\b  }\cf3 {\b Function}\cf1 {\b  ExecuteReport(}\cf3 {\b ByVal}\cf1 {\b  report }\cf3 {\b As}\cf1 {\b  ReportInfo, _}\par ??{\b                                             }\cf3 {\b ByVal}\cf1 {\b  hostModule }\cf3 {\b As}\cf1 {\b  PortalModuleBase, _}\par ??{\b                                             }\cf3 {\b ByVal}\cf1 {\b  inputParameters }\cf3 {\b As}\cf1 {\b  IDictionary(}\cf3 {\b Of}\cf1 {\b  }\cf3 {\b String}\cf1 {\b , }\cf3 {\b Object}\cf1 {\b )) }\cf3 {\b As}\cf1 {\b  System.Data.DataView}\par ??}
-->
        <div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas">
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">Public</span>
            <span style="COLOR: #cc7832">Overrides</span>
            <span style="COLOR: #cc7832">Function</span> ExecuteReport(<span style="COLOR: #cc7832">ByVal</span> report <span style="COLOR: #cc7832">As</span> ReportInfo,
_
</p>
          <p style="MARGIN: 0px">
                   
                    <span style="COLOR: #cc7832">ByVal</span> hostModule <span style="COLOR: #cc7832">As</span> PortalModuleBase,
_
</p>
          <p style="MARGIN: 0px">
                   
                    <span style="COLOR: #cc7832">ByVal</span> inputParameters <span style="COLOR: #cc7832">As</span> IDictionary(<span style="COLOR: #cc7832">Of</span><span style="COLOR: #cc7832">String</span>, <span style="COLOR: #cc7832">Object</span>)) <span style="COLOR: #cc7832">As</span> System.Data.DataView
</p>
        </div>
        <p>
The important parameter here is the <kbd>report</kbd> parameter. There is a property
called <kbd>DataSourceSettings</kbd> on that object which contains the same dictionary
we created in <kbd>SaveSettings</kbd>. First, delete the FeedUrl constant we were
using before. Then add following code to the beginning of the <kbd>ExecuteReport</kbd> method
to get the Feed URL from the settings:
</p>
        <!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red165\green194\blue92;}??\fs26 \cf1\cb2\highlight2 {\b         }\cf3 {\b If}\cf1 {\b  }\cf3 {\b Not}\cf1 {\b  report.DataSourceSettings.ContainsKey(}\cf4 "FeedUrl"\cf1 {\b ) }\cf3 {\b Then}\par ??\cf1 {\b             }\cf3 {\b Throw}\cf1 {\b  }\cf3 {\b New}\cf1 {\b  RequiredSettingMissingException(}\cf4 "FeedUrl"\cf1 {\b , }\cf3 {\b MyBase}\cf1 {\b .ExtensionContext)}\par ??{\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b         }\cf3 {\b Dim}\cf1 {\b  feedUrl }\cf3 {\b As}\cf1 {\b  Uri = }\cf3 {\b Nothing}\par ??\cf1 {\b         }\cf3 {\b If}\cf1 {\b  }\cf3 {\b Not}\cf1 {\b  Uri.TryCreate(report.DataSourceSettings(}\cf4 "FeedUrl"\cf1 {\b ), UriKind.Absolute, feedUrl) }\cf3 {\b Then}\par ??\cf1 {\b             }\cf3 {\b Throw}\cf1 {\b  }\cf3 {\b New}\cf1 {\b  RequiredSettingMissingException(}\cf4 "FeedUrl"\cf1 {\b , }\cf3 {\b MyBase}\cf1 {\b .ExtensionContext)}\par ??{\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}}
-->
        <div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas">
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">If</span>
            <span style="COLOR: #cc7832">Not</span> report.DataSourceSettings.ContainsKey(<span style="FONT-WEIGHT: normal; COLOR: #a5c25c">"FeedUrl"</span>) <span style="COLOR: #cc7832">Then</span></p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #cc7832">Throw</span><span style="COLOR: #cc7832">New</span> RequiredSettingMissingException(<span style="FONT-WEIGHT: normal; COLOR: #a5c25c">"FeedUrl"</span>, <span style="COLOR: #cc7832">MyBase</span>.ExtensionContext)
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">End</span>
            <span style="COLOR: #cc7832">If</span>
          </p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">Dim</span> feedUrl <span style="COLOR: #cc7832">As</span> Uri
= <span style="COLOR: #cc7832">Nothing</span></p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">If</span>
            <span style="COLOR: #cc7832">Not</span> Uri.TryCreate(report.DataSourceSettings(<span style="FONT-WEIGHT: normal; COLOR: #a5c25c">"FeedUrl"</span>),
UriKind.Absolute, feedUrl) <span style="COLOR: #cc7832">Then</span></p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #cc7832">Throw</span><span style="COLOR: #cc7832">New</span> RequiredSettingMissingException(<span style="FONT-WEIGHT: normal; COLOR: #a5c25c">"FeedUrl"</span>, <span style="COLOR: #cc7832">MyBase</span>.ExtensionContext)
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">End</span>
            <span style="COLOR: #cc7832">If</span>
          </p>
        </div>
        <p>
This code checks for the setting, and if it isn't present or if it isn't a valid URL
we throw an exception provided by the Reports Module: <kbd>RequiredSettingMissingException</kbd>.
We pass it the name of our setting and some contextual information about our Data
Source (which is provided automatically by our base class. If the setting isn't present,
the Reports Module will automatically display a useful error message indicating that
the setting is missing.
</p>
        <p>
While we're in the code, let's add HTML Decoding directly to the Data Source, so we
don't have to use the HTML Decode converter in the Module Settings. To do that, we
change the line that adds entries to the output table so that it automatically HTML
Decodes the description:
</p>
        <!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;}??\fs26 \cf1\cb2\highlight2 {\b dt.Rows.Add(title, }\cf3 {\b New}\cf1 {\b  Uri(link), HttpUtility.HtmlDecode(description))}}
-->
        <div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas">
          <p style="MARGIN: 0px">
dt.Rows.Add(title, <span style="COLOR: #cc7832">New</span> Uri(link), HttpUtility.HtmlDecode(description))
</p>
        </div>
        <p>
Make sure everything is saved and go back to the website. You should probably go back
to the home page, just to make sure everything is properly recompiled. Go back to
the settings page for the Reports Module, and make sure the RSS Data Source is selected.
Then configure it with your favourite RSS feed. This time, I'll use my personal blog's
RSS feed (WARNING: Shameless plug alert!).
</p>
        <div class="captioned_image">
          <img alt="Testing the Settings UI" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part3/IE-SettingsUITest.png" />
          <p class="caption">
Figure 7 - Testing the Settings UI
</p>
        </div>
        <p>
Once you've done that, make sure the HTML Decode property is set and the HTML Visualizer
is properly configured, just like in part 2 and click Update. You should see the RSS
feed displayed just like in Part 2, only now we can change the URL!
</p>
        <div class="captioned_image">
          <img alt="Final Results" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part3/IE-Final.png" />
          <p class="caption">
Figure 8 - The Final Results
</p>
          <h3>Conclusion
</h3>
        </div>
        <p>
At this point, we have a working RSS Data Source! You can stop here if you want, but
in the next part I'll cover packaging the Data Source up so that it can be installed
in any Reports Module installation.
</p>
        <p>
          <a href="http://blog.andrewnurse.net/content/binary/RSSDataSource/Files/Part3.zip">Download
the code so far.</a>
        </p>
        <img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=195f9774-95f7-49dc-a21a-3f32f1f8c31b" />
      </body>
      <title>Developing an RSS Data Source - Part III</title>
      <guid isPermaLink="false">http://blog.andrewnurse.net/PermaLink,guid,195f9774-95f7-49dc-a21a-3f32f1f8c31b.aspx</guid>
      <link>http://blog.andrewnurse.net/2008/03/02/DevelopingAnRSSDataSourcePartIII.aspx</link>
      <pubDate>Sun, 02 Mar 2008 17:23:00 GMT</pubDate>
      <description>&lt;p&gt;
In this series of blogs, I'm going to follow the development of an RSS Data Source.
I'm going to use Visual Studio 2008, but I'll be using .Net 2.0 features so you should
be able to follow along in Visual Studio 2005. You can also use the Express editions
of Visual Web Developer (both 2005 and 2008 versions should work). All the code will
be in VB.Net, but it should be straightforward enough for C# developers to understand
(after all, its all .Net)
&lt;/p&gt;
&lt;p&gt;
Continued from &lt;a href="http://blog.andrewnurse.net/2008/02/29/DevelopingAnRSSDataSourcePartII.aspx"&gt;&lt;font color=#547699&gt;Part
II&lt;/font&gt;&lt;/a&gt;.
&lt;/p&gt;
&lt;h2&gt;Part III - Settings
&lt;/h2&gt;
&lt;p&gt;
In this part, we're going to add a setting page so that we can change the RSS feed
that our Data Source downloads.
&lt;/p&gt;
&lt;p&gt;
In current versions of the Reports Module, Data Source settings are stored in the
ModuleSettings table provided by DotNetNuke. This ensures that all copies of the same
module instance will share the same Data Source settings (Visualizer settings are &lt;strong&gt;not&lt;/strong&gt; shared
between copies). However, Data Source developers need not (and &lt;strong&gt;should&lt;/strong&gt; &lt;strong&gt;not&lt;/strong&gt;)
access these directly. Instead, the Reports Module provides a layer on top of the
ModuleSettings table called "Data Source Settings". When the Data Source is executed,
the Reports Module passes a Dictionary containing these settings (inside the ReportInfo
object). To allow users to edit the settings, we go back to the Settings.ascx file
we created in &lt;a href="Part1.htm"&gt;Part I&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Let's start with the user interface for our settings page. All we need for now is
a place for the user to enter a feed URL. When we're done, it should look like the
screenshot below
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="The finished settings UI" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part3/IE-FullFinishedSettings.png"&gt; 
&lt;p class=caption&gt;
Figure 1 - The finished settings UI
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
So, open up the &lt;em&gt;Settings.ascx&lt;/em&gt; file and make sure you are in &lt;kbd&gt;Design&lt;/kbd&gt; mode.
First we need to add a label, so users know what they should type in our text box.
In the Solution Explorer, find the file: &lt;em&gt;controls/labelcontrol.ascx&lt;/em&gt; and drag
it on to the design surface.
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="Locating the LabelControl.ascx file" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part3/VS-LabelControl.png"&gt; 
&lt;p class=caption&gt;
Figure 2 - Locating the LabelControl.ascx file
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Next drag an ASP.Net TextBox control, from the Toolbox, on to the surface. You should
have something that looks like this:
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="Locating the LabelControl.ascx file" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part3/VS-DesignSurface.png"&gt; 
&lt;p class=caption&gt;
Figure 3 - Locating the LabelControl.ascx file
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Now, set the properties of the controls to the following values:
&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;
Property&lt;/th&gt;
&lt;th&gt;
Value for Label&lt;/th&gt;
&lt;th&gt;
Value for Text Box&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;kbd&gt;ID&lt;/kbd&gt;&lt;/td&gt;
&lt;td&gt;
feedUrlLabel&lt;/td&gt;
&lt;td&gt;
feedUrlTextBox&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;kbd&gt;ControlName&lt;/kbd&gt;&lt;/td&gt;
&lt;td&gt;
feedUrlTextBox&lt;/td&gt;
&lt;td&gt;
N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;kbd&gt;Width&lt;/kbd&gt;&lt;/td&gt;
&lt;td&gt;
N/A&lt;/td&gt;
&lt;td&gt;
100%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
Save your changes, and open up the code file: &lt;em&gt;Settings.ascx.vb&lt;/em&gt;. Here, we
need to add code to connect our text box to the Data Source settings. The key to this
is the &lt;kbd&gt;LoadSettings&lt;/kbd&gt; and &lt;kbd&gt;SaveSettings&lt;/kbd&gt; methods provided by &lt;kbd&gt;ReportsSettingsBase&lt;/kbd&gt;.
First, we need to import some extra namespaces:
&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red204\green120\blue50;\red0\green0\blue0;\red255\green255\blue255;}??\fs26 \cf1\cb2\highlight2 {\b Imports}\cf3 {\b  DotNetNuke.Modules.Reports}\par ??\cf1 {\b Imports}\cf3 {\b  System.Collections.Generic}}
--&gt;
&lt;div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas"&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;Imports&lt;/span&gt; DotNetNuke.Modules.Reports
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;Imports&lt;/span&gt; System.Collections.Generic
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Then, we can implement the &lt;kbd&gt;LoadSettings&lt;/kbd&gt; and &lt;kbd&gt;SaveSettings&lt;/kbd&gt; methods.
&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red165\green194\blue92;}??\fs26 \cf1\cb2\highlight2 {\b     }\cf3 {\b Public}\cf1 {\b  }\cf3 {\b Overrides}\cf1 {\b  }\cf3 {\b Sub}\cf1 {\b  LoadSettings(}\cf3 {\b ByVal}\cf1 {\b  Settings }\cf3 {\b As}\cf1 {\b  Dictionary(}\cf3 {\b Of}\cf1 {\b  }\cf3 {\b String}\cf1 {\b , }\cf3 {\b String}\cf1 {\b ))}\par ??{\b         }\cf3 {\b MyBase}\cf1 {\b .LoadSettings(Settings)}\par ??{\b         feedUrlTextBox.Text = SettingsUtil.GetDictionarySetting(Settings, _}\par ??{\b                                                                 }\cf4 "FeedUrl"\cf1 {\b , _}\par ??{\b                                                                 }\cf3 {\b String}\cf1 {\b .Empty)}\par ??{\b     }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Sub}\par ??\par ??\cf1 {\b     }\cf3 {\b Public}\cf1 {\b  }\cf3 {\b Overrides}\cf1 {\b  }\cf3 {\b Sub}\cf1 {\b  SaveSettings(}\cf3 {\b ByVal}\cf1 {\b  Settings }\cf3 {\b As}\cf1 {\b  Dictionary(}\cf3 {\b Of}\cf1 {\b  }\cf3 {\b String}\cf1 {\b , }\cf3 {\b String}\cf1 {\b ))}\par ??{\b         }\cf3 {\b MyBase}\cf1 {\b .SaveSettings(Settings)}\par ??{\b         Settings(}\cf4 "FeedUrl"\cf1 {\b ) = feedUrlTextBox.Text}\par ??{\b     }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Sub}}
--&gt;
&lt;div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas"&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;Public&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Overrides&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Sub&lt;/span&gt; LoadSettings(&lt;span style="COLOR: #cc7832"&gt;ByVal&lt;/span&gt; Settings &lt;span style="COLOR: #cc7832"&gt;As&lt;/span&gt; Dictionary(&lt;span style="COLOR: #cc7832"&gt;Of&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;String&lt;/span&gt;, &lt;span style="COLOR: #cc7832"&gt;String&lt;/span&gt;))
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;MyBase&lt;/span&gt;.LoadSettings(Settings)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; feedUrlTextBox.Text = SettingsUtil.GetDictionarySetting(Settings,
_
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="FONT-WEIGHT: normal; COLOR: #a5c25c"&gt;"FeedUrl"&lt;/span&gt;,
_
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;String&lt;/span&gt;.Empty)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;End&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Sub&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;Public&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Overrides&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Sub&lt;/span&gt; SaveSettings(&lt;span style="COLOR: #cc7832"&gt;ByVal&lt;/span&gt; Settings &lt;span style="COLOR: #cc7832"&gt;As&lt;/span&gt; Dictionary(&lt;span style="COLOR: #cc7832"&gt;Of&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;String&lt;/span&gt;, &lt;span style="COLOR: #cc7832"&gt;String&lt;/span&gt;))
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;MyBase&lt;/span&gt;.SaveSettings(Settings)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Settings(&lt;span style="FONT-WEIGHT: normal; COLOR: #a5c25c"&gt;"FeedUrl"&lt;/span&gt;)
= feedUrlTextBox.Text
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;End&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Sub&lt;/span&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
The &lt;kbd&gt;LoadSettings&lt;/kbd&gt; method is provided with a &lt;kbd&gt;System.Collections.Generic.Dictionary(Of
String, String)&lt;/kbd&gt; containing the current settings saved for the Data Source. Our
implementation uses the &lt;kbd&gt;SettingsUtil&lt;/kbd&gt; helper class (provided with the Reports
Module) to retrieve a value from the dictionary, or return a default value if it doesn't
exist (in this case, an empty string).
&lt;/p&gt;
&lt;p&gt;
The &lt;kbd&gt;SaveSettings&lt;/kbd&gt; method is also provided with the current settings. However,
this method is responsible for retrieving the values entered by the user and updating
the settings.
&lt;/p&gt;
&lt;p&gt;
Save the file, and navigate to the Settings page on your test module. You should see
our new Settings control displayed, as in the screenshot below:
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="Settings page so far" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part3/IE-EmptySettings.png"&gt; 
&lt;p class=caption&gt;
Figure 4 - Settings page so far
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Oops, we still need to put the label text in! We're going to support the DotNetNuke
Localization Framework, so we need to put the text in two places.
&lt;/p&gt;
&lt;p&gt;
First, lets add the localized text. Create a Resource File called&lt;em&gt; Settings.ascx.resx &lt;/em&gt;in &lt;em&gt;/DesktopModules/Reports/DataSources/RSS/App_LocalResources&lt;/em&gt; file
and open it. In Visual Studio, you get a nice table interface for editing resource
strings. Add the following entries to the table (feel free to tweak the values as
you want, just keep the name the same):
&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;
Name&lt;/th&gt;
&lt;th&gt;
Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;kbd&gt;feedUrlLabel.Text&lt;/kbd&gt;&lt;/td&gt;
&lt;td&gt;
RSS Feed URL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;kbd&gt;feedUrlLabel.Help&lt;/kbd&gt;&lt;/td&gt;
&lt;td&gt;
Enter the URL to an RSS feed to retrieve data from&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
Your resource file should look like this after making those changes
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="Resource File after entering values" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part3/VS-ResourceFile.png"&gt; 
&lt;p class=caption&gt;
Figure 5 - Resource File after entering values
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Now, go back to &lt;em&gt;Settings.ascx&lt;/em&gt; and set the following properties on the label
we created earlier:
&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;
Property&lt;/th&gt;
&lt;th&gt;
Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;kbd&gt;Text&lt;/kbd&gt;&lt;/td&gt;
&lt;td&gt;
RSS Feed URL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;kbd&gt;Suffix&lt;/kbd&gt;&lt;/td&gt;
&lt;td&gt;
:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;kbd&gt;CssClass&lt;/kbd&gt;&lt;/td&gt;
&lt;td&gt;
SubHead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
Note: That's a colon (':') in the Suffix property. Also, &lt;kbd&gt;CssClass&lt;/kbd&gt; is case
sensitive.
&lt;/p&gt;
&lt;p&gt;
Now, save and refresh your page. You should see something like the screen shot below:
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="Finished Settings UI" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part3/IE-FinishedSettingsUI.png"&gt; 
&lt;p class=caption&gt;
Figure 6 - The finished Feed URL text box
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Now, to change our Data Source code to use this new setting. Let's go back to the &lt;em&gt;/App_Code/RSSDataSource/RSSDataSource.vb&lt;/em&gt; file
and take a look at the signature for the &lt;kbd&gt;ExecuteReport&lt;/kbd&gt; method:
&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;}??\fs26 \cf1\cb2\highlight2 {\b     }\cf3 {\b Public}\cf1 {\b  }\cf3 {\b Overrides}\cf1 {\b  }\cf3 {\b Function}\cf1 {\b  ExecuteReport(}\cf3 {\b ByVal}\cf1 {\b  report }\cf3 {\b As}\cf1 {\b  ReportInfo, _}\par ??{\b                                             }\cf3 {\b ByVal}\cf1 {\b  hostModule }\cf3 {\b As}\cf1 {\b  PortalModuleBase, _}\par ??{\b                                             }\cf3 {\b ByVal}\cf1 {\b  inputParameters }\cf3 {\b As}\cf1 {\b  IDictionary(}\cf3 {\b Of}\cf1 {\b  }\cf3 {\b String}\cf1 {\b , }\cf3 {\b Object}\cf1 {\b )) }\cf3 {\b As}\cf1 {\b  System.Data.DataView}\par ??}
--&gt;
&lt;div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas"&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;Public&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Overrides&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Function&lt;/span&gt; ExecuteReport(&lt;span style="COLOR: #cc7832"&gt;ByVal&lt;/span&gt; report &lt;span style="COLOR: #cc7832"&gt;As&lt;/span&gt; ReportInfo,
_
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;ByVal&lt;/span&gt; hostModule &lt;span style="COLOR: #cc7832"&gt;As&lt;/span&gt; PortalModuleBase,
_
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;ByVal&lt;/span&gt; inputParameters &lt;span style="COLOR: #cc7832"&gt;As&lt;/span&gt; IDictionary(&lt;span style="COLOR: #cc7832"&gt;Of&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;String&lt;/span&gt;, &lt;span style="COLOR: #cc7832"&gt;Object&lt;/span&gt;)) &lt;span style="COLOR: #cc7832"&gt;As&lt;/span&gt; System.Data.DataView
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
The important parameter here is the &lt;kbd&gt;report&lt;/kbd&gt; parameter. There is a property
called &lt;kbd&gt;DataSourceSettings&lt;/kbd&gt; on that object which contains the same dictionary
we created in &lt;kbd&gt;SaveSettings&lt;/kbd&gt;. First, delete the FeedUrl constant we were
using before. Then add following code to the beginning of the &lt;kbd&gt;ExecuteReport&lt;/kbd&gt; method
to get the Feed URL from the settings:
&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red165\green194\blue92;}??\fs26 \cf1\cb2\highlight2 {\b         }\cf3 {\b If}\cf1 {\b  }\cf3 {\b Not}\cf1 {\b  report.DataSourceSettings.ContainsKey(}\cf4 "FeedUrl"\cf1 {\b ) }\cf3 {\b Then}\par ??\cf1 {\b             }\cf3 {\b Throw}\cf1 {\b  }\cf3 {\b New}\cf1 {\b  RequiredSettingMissingException(}\cf4 "FeedUrl"\cf1 {\b , }\cf3 {\b MyBase}\cf1 {\b .ExtensionContext)}\par ??{\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b         }\cf3 {\b Dim}\cf1 {\b  feedUrl }\cf3 {\b As}\cf1 {\b  Uri = }\cf3 {\b Nothing}\par ??\cf1 {\b         }\cf3 {\b If}\cf1 {\b  }\cf3 {\b Not}\cf1 {\b  Uri.TryCreate(report.DataSourceSettings(}\cf4 "FeedUrl"\cf1 {\b ), UriKind.Absolute, feedUrl) }\cf3 {\b Then}\par ??\cf1 {\b             }\cf3 {\b Throw}\cf1 {\b  }\cf3 {\b New}\cf1 {\b  RequiredSettingMissingException(}\cf4 "FeedUrl"\cf1 {\b , }\cf3 {\b MyBase}\cf1 {\b .ExtensionContext)}\par ??{\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}}
--&gt;
&lt;div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas"&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;If&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Not&lt;/span&gt; report.DataSourceSettings.ContainsKey(&lt;span style="FONT-WEIGHT: normal; COLOR: #a5c25c"&gt;"FeedUrl"&lt;/span&gt;) &lt;span style="COLOR: #cc7832"&gt;Then&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;Throw&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;New&lt;/span&gt; RequiredSettingMissingException(&lt;span style="FONT-WEIGHT: normal; COLOR: #a5c25c"&gt;"FeedUrl"&lt;/span&gt;, &lt;span style="COLOR: #cc7832"&gt;MyBase&lt;/span&gt;.ExtensionContext)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;End&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;If&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;Dim&lt;/span&gt; feedUrl &lt;span style="COLOR: #cc7832"&gt;As&lt;/span&gt; Uri
= &lt;span style="COLOR: #cc7832"&gt;Nothing&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;If&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Not&lt;/span&gt; Uri.TryCreate(report.DataSourceSettings(&lt;span style="FONT-WEIGHT: normal; COLOR: #a5c25c"&gt;"FeedUrl"&lt;/span&gt;),
UriKind.Absolute, feedUrl) &lt;span style="COLOR: #cc7832"&gt;Then&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;Throw&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;New&lt;/span&gt; RequiredSettingMissingException(&lt;span style="FONT-WEIGHT: normal; COLOR: #a5c25c"&gt;"FeedUrl"&lt;/span&gt;, &lt;span style="COLOR: #cc7832"&gt;MyBase&lt;/span&gt;.ExtensionContext)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;End&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;If&lt;/span&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
This code checks for the setting, and if it isn't present or if it isn't a valid URL
we throw an exception provided by the Reports Module: &lt;kbd&gt;RequiredSettingMissingException&lt;/kbd&gt;.
We pass it the name of our setting and some contextual information about our Data
Source (which is provided automatically by our base class. If the setting isn't present,
the Reports Module will automatically display a useful error message indicating that
the setting is missing.
&lt;/p&gt;
&lt;p&gt;
While we're in the code, let's add HTML Decoding directly to the Data Source, so we
don't have to use the HTML Decode converter in the Module Settings. To do that, we
change the line that adds entries to the output table so that it automatically HTML
Decodes the description:
&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;}??\fs26 \cf1\cb2\highlight2 {\b dt.Rows.Add(title, }\cf3 {\b New}\cf1 {\b  Uri(link), HttpUtility.HtmlDecode(description))}}
--&gt;
&lt;div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas"&gt;
&lt;p style="MARGIN: 0px"&gt;
dt.Rows.Add(title, &lt;span style="COLOR: #cc7832"&gt;New&lt;/span&gt; Uri(link), HttpUtility.HtmlDecode(description))
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Make sure everything is saved and go back to the website. You should probably go back
to the home page, just to make sure everything is properly recompiled. Go back to
the settings page for the Reports Module, and make sure the RSS Data Source is selected.
Then configure it with your favourite RSS feed. This time, I'll use my personal blog's
RSS feed (WARNING: Shameless plug alert!).
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="Testing the Settings UI" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part3/IE-SettingsUITest.png"&gt; 
&lt;p class=caption&gt;
Figure 7 - Testing the Settings UI
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Once you've done that, make sure the HTML Decode property is set and the HTML Visualizer
is properly configured, just like in part 2 and click Update. You should see the RSS
feed displayed just like in Part 2, only now we can change the URL!
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="Final Results" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part3/IE-Final.png"&gt; 
&lt;p class=caption&gt;
Figure 8 - The Final Results
&lt;/p&gt;
&lt;h3&gt;Conclusion
&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;
At this point, we have a working RSS Data Source! You can stop here if you want, but
in the next part I'll cover packaging the Data Source up so that it can be installed
in any Reports Module installation.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.andrewnurse.net/content/binary/RSSDataSource/Files/Part3.zip"&gt;Download
the code so far.&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=195f9774-95f7-49dc-a21a-3f32f1f8c31b" /&gt;</description>
      <comments>http://blog.andrewnurse.net/CommentView,guid,195f9774-95f7-49dc-a21a-3f32f1f8c31b.aspx</comments>
      <category>DNN</category>
      <category>Reports Module</category>
    </item>
    <item>
      <trackback:ping>http://blog.andrewnurse.net/Trackback.aspx?guid=fd4a2728-3346-4256-ac28-2e99875145e3</trackback:ping>
      <pingback:server>http://blog.andrewnurse.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.andrewnurse.net/PermaLink,guid,fd4a2728-3346-4256-ac28-2e99875145e3.aspx</pingback:target>
      <dc:creator>Andrew Nurse</dc:creator>
      <wfw:comment>http://blog.andrewnurse.net/CommentView,guid,fd4a2728-3346-4256-ac28-2e99875145e3.aspx</wfw:comment>
      <wfw:commentRss>http://blog.andrewnurse.net/SyndicationService.asmx/GetEntryCommentsRss?guid=fd4a2728-3346-4256-ac28-2e99875145e3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
UPDATE: <a href="http://blog.andrewnurse.net/2008/03/02/DevelopingAnRSSDataSourcePartIII.aspx">Part
III</a> is now available.
</p>
        <p>
In this series of blogs, I'm going to follow the development of an RSS Data Source.
I'm going to use Visual Studio 2008, but I'll be using .Net 2.0 features so you should
be able to follow along in Visual Studio 2005. You can also use the Express editions
of Visual Web Developer (both 2005 and 2008 versions should work). All the code will
be in VB.Net, but it should be straightforward enough for C# developers to understand
(after all, its all .Net)
</p>
        <p>
Continued from <a href="http://blog.andrewnurse.net/2008/02/29/DevelopingAnRSSDataSourcePartI.aspx">Part
I</a>.
</p>
        <h2>Part II - WebRequests, XPath, and Data Tables, oh my!
</h2>
        <p>
In this part, we're going to add the code to retrieve data from the RSS feed. First,
we need to create a folder to hold our code. We're going to put our code in the <em>App_Code</em> folder,
so it will be compiled automatically by ASP.Net. That way we can save a few extra
steps and get straight to the point. You could also put this code in a separate .Net
Class Library, and put that library in the Bin folder of your website.
</p>
        <p>
We'll create a sub-folder inside the App_Code folder for our code and call it <em>RSSDataSource</em>:
</p>
        <div class="captioned_image">
          <img alt="Creating an App_Code folder" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part2/VS-AppCodeFolder.png" />
          <p class="caption">
Figure 1 - Creating an App_Code folder
</p>
        </div>
        <p>
Next, we need to tell ASP.Net to compile code found in this folder. Open the <em>web.config</em> file,
in the root of the website, and find the <em>&lt;codeSubDirectories&gt;</em> section
(its inside the <em>&lt;system.web&gt;</em> section). In my version of DotNetNuke
it looks like this, but yours may have different <em>&lt;add&gt;</em> entries:
</p>
        <!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red165\green194\blue92;}??\fs26 \cf1\cb2\highlight2 {\b       &lt;}\cf3 {\b codeSubDirectories}\cf1 {\b &gt;}\par ??{\b         &lt;}\cf3 {\b add}\cf1 {\b  directoryName="}\cf4 {\b HTML}\cf1 {\b " /&gt;}\par ??{\b       &lt;/}\cf3 {\b codeSubDirectories}\cf1 {\b &gt;}}
-->
        <div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas, monospace">
          <p style="MARGIN: 0px">
&lt;<span style="COLOR: #cc7832">codeSubDirectories</span>&gt;
</p>
          <p style="MARGIN: 0px">
  &lt;<span style="COLOR: #cc7832">add</span> directoryName="<span style="COLOR: #a5c25c">HTML</span>"
/&gt;
</p>
          <p style="MARGIN: 0px">
&lt;/<span style="COLOR: #cc7832">codeSubDirectories</span>&gt;
</p>
        </div>
        <p>
We need to add an entry to this list for our new subfolder. On my system, it looks
like this (again, yours may vary slightly):
</p>
        <!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red165\green194\blue92;}??\fs26 \cf1\cb2\highlight2 {\b       &lt;}\cf3 {\b codeSubDirectories}\cf1 {\b &gt;}\par ??{\b         &lt;}\cf3 {\b add}\cf1 {\b  directoryName="}\cf4 {\b HTML}\cf1 {\b " /&gt;}\par ??{\b         &lt;}\cf3 {\b add}\cf1 {\b  directoryName="}\cf4 {\b RSSDataSource}\cf1 {\b "/&gt;}\par ??{\b       &lt;/}\cf3 {\b codeSubDirectories}\cf1 {\b &gt;}}
-->
        <div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas, monospace">
          <p style="MARGIN: 0px">
&lt;<span style="COLOR: #cc7832">codeSubDirectories</span>&gt;
</p>
          <p style="MARGIN: 0px">
  &lt;<span style="COLOR: #cc7832">add</span> directoryName="<span style="COLOR: #a5c25c">HTML</span>"
/&gt;
</p>
          <p style="MARGIN: 0px">
  &lt;<span style="COLOR: #cc7832">add</span> directoryName="<span style="COLOR: #a5c25c">RSSDataSource</span>"/&gt;
</p>
          <p style="MARGIN: 0px">
&lt;/<span style="COLOR: #cc7832">codeSubDirectories</span>&gt;
</p>
        </div>
        <p>
Now that we have somewhere to put our code, let's create our Data Source! We'll create
a class inside our nice new <em>App_Code</em> folder called <em>RSSDataSource</em>.
</p>
        <p>
I'm not going to list the code for the Data Source in this post, because I've attached
it to this post. However, I'll go over the general steps.
</p>
        <ol>
          <li>
First, we use the <em>System.Net.WebClient</em> class to download the RSS feed. For
now, I've hardcoded it to one of my favourite blogs: <a href="http://www.hanselman.com/blog/">Scott
Hanselman's Computer Zen</a></li>
          <li>
Next we create an ADO.Net <em>DataTable</em> with three columns: <em>Title</em>, <em>Link</em> and <em>Description</em></li>
          <li>
Then, we use the classes in the <em>System.Xml.XPath</em> namespace to add a row for
each item in the feed to the <em>DataTable</em>. 
</li>
          <li>
Finally, we wrap the DataTable in a DataView. The Reports Module expects us to return
a DataView in order to allow us to do filtering and sorting if we wanted to. We aren't
using that feature, so we just create a simple DataView to wrap our table.</li>
        </ol>
        <p>
There's only one last step to hook everything up. We need to tell the Reports Module
how to find our Data Source code. To do that, open the code-behind file for <em>DesktopModules/Reports/DataSources/RSS/Settings.ascx</em> and
change the <em>DataSourceClass</em> property to the following code:
</p>
        <!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;}??\fs26 \cf1\cb2\highlight2 {\b     }\cf3 {\b Public}\cf1 {\b  }\cf3 {\b ReadOnly}\cf1 {\b  }\cf3 {\b Property}\cf1 {\b  DataSourceClass() }\cf3 {\b As}\cf1 {\b  }\cf3 {\b String}\cf1 {\b  }\cf3 {\b Implements}\cf1 {\b  IDataSourceSettingsControl.DataSourceClass}\par ??{\b         }\cf3 {\b Get}\par ??\cf1 {\b             }\cf3 {\b Return}\cf1 {\b  }\cf3 {\b GetType}\cf1 {\b (RSSDataSource).FullName}\par ??{\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Get}\par ??\cf1 {\b     }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Property}}
-->
        <div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas">
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">Public</span>
            <span style="COLOR: #cc7832">ReadOnly</span>
            <span style="COLOR: #cc7832">Property</span> DataSourceClass() <span style="COLOR: #cc7832">As</span><span style="COLOR: #cc7832">String</span><span style="COLOR: #cc7832">Implements</span> IDataSourceSettingsControl.DataSourceClass
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #cc7832">Get</span></p>
          <p style="MARGIN: 0px">
        <span style="COLOR: #cc7832">Return</span><span style="COLOR: #cc7832">GetType</span>(RSSDataSource).FullName
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #cc7832">End</span><span style="COLOR: #cc7832">Get</span></p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">End</span>
            <span style="COLOR: #cc7832">Property</span>
          </p>
        </div>
        <p>
And with that, we have a working RSS Data Source! Go back to your browser and go to
the Settings page for the Reports Module instance we created in Part 1. Select the
RSS Data Source as the <em>Active Data Source</em>, and click update. You should see
a very wide grid containing the data from the RSS feed (assuming you are using the
Grid Visualizer, which is the default):
</p>
        <div class="captioned_image">
          <img alt="Simple Grid View" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part2/IE-GridNoDecode.png" />
          <p class="caption">
Figure 2 - Simple Grid View
</p>
        </div>
        <p>
Well, that doesn't look very useful does it? Let's start by getting rid of that HTML
junk in the Description field. To get rid of that, go back to the Settings page, and
add "Description" to the list of columns to HTML Decode.
</p>
        <div class="captioned_image">
          <img alt="HTML Decode Converter" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part2/IE-HtmlDecodeSetting.png" />
          <p class="caption">
Figure 3 - HTML Decode Converter
</p>
        </div>
        <p>
That should clean up the HTML, but it's still a big grid. Let's use the HTML Visualizer
to clean it up a bit. Put the following code in an HTML file and place it in your <em>Portals/[PortalID]</em> folder:
</p>
        <!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red232\green188\blue100;\red165\green194\blue92;}??\fs26 \cf1\cb2\highlight2 {\b &lt;}\cf3 {\b h1}\cf1 {\b &gt;&lt;}\cf3 {\b a}\cf1 {\b  href=}\cf4 {\b "[Link]"}\cf1 {\b &gt;[Title]&lt;/}\cf3 {\b a}\cf1 {\b &gt;&lt;/}\cf3 {\b h1}\cf1 {\b &gt;}\par ??{\b [Description]}\par ??{\b &lt;}\cf3 {\b hr}\cf1 {\b  /&gt;}}
-->
        <div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas">
          <p style="MARGIN: 0px">
&lt;<span style="COLOR: #e8bc64">h1</span>&gt;&lt;<span style="COLOR: #e8bc64">a</span> href=<span style="COLOR: #a5c25c">"[Link]"</span>&gt;[Title]&lt;/<span style="COLOR: #e8bc64">a</span>&gt;&lt;/<span style="COLOR: #e8bc64">h1</span>&gt;
</p>
          <p style="MARGIN: 0px">
[Description]
</p>
          <p style="MARGIN: 0px">
&lt;<span style="COLOR: #e8bc64">hr</span> /&gt;
</p>
        </div>
        <p>
Then, go back to the Settings page, select the HTML Template Visualizer and the HTML
file you just uploaded:
</p>
        <div class="captioned_image">
          <img alt="Configuring the HTML Visualizer" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part2/IE-HtmlTemplate.png" />
          <p class="caption">
Figure 4 - Configuring the HTML Visualizer
</p>
        </div>
        <p>
Click Update and you should see a much more readable display. It's almost like a real
RSS Reader!
</p>
        <div class="captioned_image">
          <img alt="A Reports Module-powered RSS Reader?" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part2/IE-RSSReader.png" />
          <p class="caption">
Figure 5 - A Reports Module-powered RSS Reader!
</p>
        </div>
        <h3>Conclusion
</h3>
        <p>
Well, that's all for part two. Next, we'll cover Data Source settings so that we can
point our Data Source at any RSS feed we want, rather than hard coding it. Then, we
add an HTML Decoding feature directly into the Data Source so we don't have to configure
the module to decode the Description field. Finally, we'll package it all up so that
others can download and install it.
</p>
        <p>
          <a href="http://blog.andrewnurse.net/content/binary/RSSDataSource/Files/Part2.zip">Download
the code so far.</a>
        </p>
        <img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=fd4a2728-3346-4256-ac28-2e99875145e3" />
      </body>
      <title>Developing an RSS Data Source - Part II</title>
      <guid isPermaLink="false">http://blog.andrewnurse.net/PermaLink,guid,fd4a2728-3346-4256-ac28-2e99875145e3.aspx</guid>
      <link>http://blog.andrewnurse.net/2008/02/29/DevelopingAnRSSDataSourcePartII.aspx</link>
      <pubDate>Fri, 29 Feb 2008 20:30:07 GMT</pubDate>
      <description>&lt;p&gt;
UPDATE: &lt;a href="http://blog.andrewnurse.net/2008/03/02/DevelopingAnRSSDataSourcePartIII.aspx"&gt;Part
III&lt;/a&gt; is now available.
&lt;/p&gt;
&lt;p&gt;
In this series of blogs, I'm going to follow the development of an RSS Data Source.
I'm going to use Visual Studio 2008, but I'll be using .Net 2.0 features so you should
be able to follow along in Visual Studio 2005. You can also use the Express editions
of Visual Web Developer (both 2005 and 2008 versions should work). All the code will
be in VB.Net, but it should be straightforward enough for C# developers to understand
(after all, its all .Net)
&lt;/p&gt;
&lt;p&gt;
Continued from &lt;a href="http://blog.andrewnurse.net/2008/02/29/DevelopingAnRSSDataSourcePartI.aspx"&gt;Part
I&lt;/a&gt;.
&lt;/p&gt;
&lt;h2&gt;Part II - WebRequests, XPath, and Data Tables, oh my!
&lt;/h2&gt;
&lt;p&gt;
In this part, we're going to add the code to retrieve data from the RSS feed. First,
we need to create a folder to hold our code. We're going to put our code in the &lt;em&gt;App_Code&lt;/em&gt; folder,
so it will be compiled automatically by ASP.Net. That way we can save a few extra
steps and get straight to the point. You could also put this code in a separate .Net
Class Library, and put that library in the Bin folder of your website.
&lt;/p&gt;
&lt;p&gt;
We'll create a sub-folder inside the App_Code folder for our code and call it &lt;em&gt;RSSDataSource&lt;/em&gt;:
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="Creating an App_Code folder" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part2/VS-AppCodeFolder.png"&gt; 
&lt;p class=caption&gt;
Figure 1 - Creating an App_Code folder
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Next, we need to tell ASP.Net to compile code found in this folder. Open the &lt;em&gt;web.config&lt;/em&gt; file,
in the root of the website, and find the &lt;em&gt;&amp;lt;codeSubDirectories&amp;gt;&lt;/em&gt; section
(its inside the &lt;em&gt;&amp;lt;system.web&amp;gt;&lt;/em&gt; section). In my version of DotNetNuke
it looks like this, but yours may have different &lt;em&gt;&amp;lt;add&amp;gt;&lt;/em&gt; entries:
&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red165\green194\blue92;}??\fs26 \cf1\cb2\highlight2 {\b       &amp;lt;}\cf3 {\b codeSubDirectories}\cf1 {\b &amp;gt;}\par ??{\b         &amp;lt;}\cf3 {\b add}\cf1 {\b  directoryName="}\cf4 {\b HTML}\cf1 {\b " /&amp;gt;}\par ??{\b       &amp;lt;/}\cf3 {\b codeSubDirectories}\cf1 {\b &amp;gt;}}
--&gt;
&lt;div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas, monospace"&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;lt;&lt;span style="COLOR: #cc7832"&gt;codeSubDirectories&lt;/span&gt;&amp;gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp; &amp;lt;&lt;span style="COLOR: #cc7832"&gt;add&lt;/span&gt; directoryName="&lt;span style="COLOR: #a5c25c"&gt;HTML&lt;/span&gt;"
/&amp;gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;lt;/&lt;span style="COLOR: #cc7832"&gt;codeSubDirectories&lt;/span&gt;&amp;gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
We need to add an entry to this list for our new subfolder. On my system, it looks
like this (again, yours may vary slightly):
&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red165\green194\blue92;}??\fs26 \cf1\cb2\highlight2 {\b       &amp;lt;}\cf3 {\b codeSubDirectories}\cf1 {\b &amp;gt;}\par ??{\b         &amp;lt;}\cf3 {\b add}\cf1 {\b  directoryName="}\cf4 {\b HTML}\cf1 {\b " /&amp;gt;}\par ??{\b         &amp;lt;}\cf3 {\b add}\cf1 {\b  directoryName="}\cf4 {\b RSSDataSource}\cf1 {\b "/&amp;gt;}\par ??{\b       &amp;lt;/}\cf3 {\b codeSubDirectories}\cf1 {\b &amp;gt;}}
--&gt;
&lt;div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas, monospace"&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;lt;&lt;span style="COLOR: #cc7832"&gt;codeSubDirectories&lt;/span&gt;&amp;gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp; &amp;lt;&lt;span style="COLOR: #cc7832"&gt;add&lt;/span&gt; directoryName="&lt;span style="COLOR: #a5c25c"&gt;HTML&lt;/span&gt;"
/&amp;gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp; &amp;lt;&lt;span style="COLOR: #cc7832"&gt;add&lt;/span&gt; directoryName="&lt;span style="COLOR: #a5c25c"&gt;RSSDataSource&lt;/span&gt;"/&amp;gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;lt;/&lt;span style="COLOR: #cc7832"&gt;codeSubDirectories&lt;/span&gt;&amp;gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Now that we have somewhere to put our code, let's create our Data Source! We'll create
a class inside our nice new &lt;em&gt;App_Code&lt;/em&gt; folder called &lt;em&gt;RSSDataSource&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;
I'm not going to list the code for the Data Source in this post, because I've attached
it to this post. However, I'll go over the general steps.
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
First, we use the &lt;em&gt;System.Net.WebClient&lt;/em&gt; class to download the RSS feed. For
now, I've hardcoded it to one of my favourite blogs: &lt;a href="http://www.hanselman.com/blog/"&gt;Scott
Hanselman's Computer Zen&lt;/a&gt; 
&lt;li&gt;
Next we create an ADO.Net &lt;em&gt;DataTable&lt;/em&gt; with three columns: &lt;em&gt;Title&lt;/em&gt;, &lt;em&gt;Link&lt;/em&gt; and &lt;em&gt;Description&lt;/em&gt; 
&lt;li&gt;
Then, we use the classes in the &lt;em&gt;System.Xml.XPath&lt;/em&gt; namespace to add a row for
each item in the feed to the &lt;em&gt;DataTable&lt;/em&gt;. 
&lt;li&gt;
Finally, we wrap the DataTable in a DataView. The Reports Module expects us to return
a DataView in order to allow us to do filtering and sorting if we wanted to. We aren't
using that feature, so we just create a simple DataView to wrap our table.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
There's only one last step to hook everything up. We need to tell the Reports Module
how to find our Data Source code. To do that, open the code-behind file for &lt;em&gt;DesktopModules/Reports/DataSources/RSS/Settings.ascx&lt;/em&gt; and
change the &lt;em&gt;DataSourceClass&lt;/em&gt; property to the following code:
&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;}??\fs26 \cf1\cb2\highlight2 {\b     }\cf3 {\b Public}\cf1 {\b  }\cf3 {\b ReadOnly}\cf1 {\b  }\cf3 {\b Property}\cf1 {\b  DataSourceClass() }\cf3 {\b As}\cf1 {\b  }\cf3 {\b String}\cf1 {\b  }\cf3 {\b Implements}\cf1 {\b  IDataSourceSettingsControl.DataSourceClass}\par ??{\b         }\cf3 {\b Get}\par ??\cf1 {\b             }\cf3 {\b Return}\cf1 {\b  }\cf3 {\b GetType}\cf1 {\b (RSSDataSource).FullName}\par ??{\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Get}\par ??\cf1 {\b     }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Property}}
--&gt;
&lt;div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas"&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;Public&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;ReadOnly&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Property&lt;/span&gt; DataSourceClass() &lt;span style="COLOR: #cc7832"&gt;As&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;String&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Implements&lt;/span&gt; IDataSourceSettingsControl.DataSourceClass
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;Get&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;Return&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;GetType&lt;/span&gt;(RSSDataSource).FullName
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;End&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Get&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;End&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Property&lt;/span&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
And with that, we have a working RSS Data Source! Go back to your browser and go to
the Settings page for the Reports Module instance we created in Part 1. Select the
RSS Data Source as the &lt;em&gt;Active Data Source&lt;/em&gt;, and click update. You should see
a very wide grid containing the data from the RSS feed (assuming you are using the
Grid Visualizer, which is the default):
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="Simple Grid View" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part2/IE-GridNoDecode.png"&gt; 
&lt;p class=caption&gt;
Figure 2 - Simple Grid View
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Well, that doesn't look very useful does it? Let's start by getting rid of that HTML
junk in the Description field. To get rid of that, go back to the Settings page, and
add "Description" to the list of columns to HTML Decode.
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="HTML Decode Converter" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part2/IE-HtmlDecodeSetting.png"&gt; 
&lt;p class=caption&gt;
Figure 3 - HTML Decode Converter
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
That should clean up the HTML, but it's still a big grid. Let's use the HTML Visualizer
to clean it up a bit. Put the following code in an HTML file and place it in your &lt;em&gt;Portals/[PortalID]&lt;/em&gt; folder:
&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red232\green188\blue100;\red165\green194\blue92;}??\fs26 \cf1\cb2\highlight2 {\b &amp;lt;}\cf3 {\b h1}\cf1 {\b &amp;gt;&amp;lt;}\cf3 {\b a}\cf1 {\b  href=}\cf4 {\b "[Link]"}\cf1 {\b &amp;gt;[Title]&amp;lt;/}\cf3 {\b a}\cf1 {\b &amp;gt;&amp;lt;/}\cf3 {\b h1}\cf1 {\b &amp;gt;}\par ??{\b [Description]}\par ??{\b &amp;lt;}\cf3 {\b hr}\cf1 {\b  /&amp;gt;}}
--&gt;
&lt;div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas"&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;lt;&lt;span style="COLOR: #e8bc64"&gt;h1&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="COLOR: #e8bc64"&gt;a&lt;/span&gt; href=&lt;span style="COLOR: #a5c25c"&gt;"[Link]"&lt;/span&gt;&amp;gt;[Title]&amp;lt;/&lt;span style="COLOR: #e8bc64"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style="COLOR: #e8bc64"&gt;h1&lt;/span&gt;&amp;gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
[Description]
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;lt;&lt;span style="COLOR: #e8bc64"&gt;hr&lt;/span&gt; /&amp;gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Then, go back to the Settings page, select the HTML Template Visualizer and the HTML
file you just uploaded:
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="Configuring the HTML Visualizer" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part2/IE-HtmlTemplate.png"&gt; 
&lt;p class=caption&gt;
Figure 4 - Configuring the HTML Visualizer
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Click Update and you should see a much more readable display. It's almost like a real
RSS Reader!
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="A Reports Module-powered RSS Reader?" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part2/IE-RSSReader.png"&gt; 
&lt;p class=caption&gt;
Figure 5 - A Reports Module-powered RSS Reader!
&lt;/p&gt;
&lt;/div&gt;
&lt;h3&gt;Conclusion
&lt;/h3&gt;
&lt;p&gt;
Well, that's all for part two. Next, we'll cover Data Source settings so that we can
point our Data Source at any RSS feed we want, rather than hard coding it. Then, we
add an HTML Decoding feature directly into the Data Source so we don't have to configure
the module to decode the Description field. Finally, we'll package it all up so that
others can download and install it.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.andrewnurse.net/content/binary/RSSDataSource/Files/Part2.zip"&gt;Download
the code so far.&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=fd4a2728-3346-4256-ac28-2e99875145e3" /&gt;</description>
      <comments>http://blog.andrewnurse.net/CommentView,guid,fd4a2728-3346-4256-ac28-2e99875145e3.aspx</comments>
      <category>DNN</category>
      <category>Reports Module</category>
    </item>
    <item>
      <trackback:ping>http://blog.andrewnurse.net/Trackback.aspx?guid=155560d2-8873-4fd5-9b6a-df2b23b1a851</trackback:ping>
      <pingback:server>http://blog.andrewnurse.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.andrewnurse.net/PermaLink,guid,155560d2-8873-4fd5-9b6a-df2b23b1a851.aspx</pingback:target>
      <dc:creator>Andrew Nurse</dc:creator>
      <wfw:comment>http://blog.andrewnurse.net/CommentView,guid,155560d2-8873-4fd5-9b6a-df2b23b1a851.aspx</wfw:comment>
      <wfw:commentRss>http://blog.andrewnurse.net/SyndicationService.asmx/GetEntryCommentsRss?guid=155560d2-8873-4fd5-9b6a-df2b23b1a851</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
UPDATE: <a href="http://blog.andrewnurse.net/2008/02/29/DevelopingAnRSSDataSourcePartII.aspx">Part
II</a> is now available.
</p>
        <p>
In this series of blogs, I'm going to follow the development of an RSS Data Source.
I'm going to use Visual Studio 2008, but I'll be using .Net 2.0 features so you should
be able to follow along in Visual Studio 2005. You can also use the Express editions
of Visual Web Developer (both 2005 and 2008 versions should work). All the code will
be in VB.Net, but it should be straightforward enough for C# developers to understand
(after all, its all .Net)
</p>
        <h3>Part I - Setting Up
</h3>
        <p>
First things first, you'll need to install a Source distribution of DotNetNuke. I'm
not going to cover that here because there are some other resources out there. You'll
also need to install the Source package of the Reports Module. Once you've done this,
open your DotNetNuke website up in Visual Studio
</p>
        <div class="captioned_image">
          <img alt="Open Website Dialog" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part1/VS-OpenWebsite.png" />
          <p class="caption">
Figure 1 - Open Website Dialog
</p>
        </div>
        <p>
After opening it, expand the <em>DesktopModules/Reports/DataSources</em> folder. You
should see something similar to the following
</p>
        <div class="captioned_image">
          <img alt="Data Sources Folder" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part1/VS-DataSourcesFolder.png" />
          <p class="caption">
Figure 2 - Data Sources Folder
</p>
        </div>
        <p>
Each of the folder under the <em>DataSources</em> folder represents a different Data
Source. So, lets get started and create a folder for our Data Source and call it <em>RSS</em>.
Inside that folder, we need to create an <em>App_LocalResources</em> folder. Visual
Studio provides a special menu option to do that:
</p>
        <div class="captioned_image">
          <img alt="Add App_LocalResources Folder menu item" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part1/VS-AddAppLRFolder.png" />
          <p class="caption">
Figure 3 - Add App_LocalResources Folder menu item
</p>
        </div>
        <p>
Inside there, we must create a Resource file. Even if you aren't planning to translate
your Data Source into different languages, the Reports Module uses this file to determine
the name of your Data Source, so you must create it. In this sample, we aren't going
to use the DotNetNuke Localization framework, so this is the only time we'll need
to delve into Resource files. Add a new Resource file to the <em>App_LocalResources </em>folder
called "DataSource.ascx.resx".
</p>
        <div class="captioned_image">
          <img alt="Adding a Resource File" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part1/VS-AddResourceFile.png" />
          <p class="caption">
Figure 4 - Adding a Resource File
</p>
        </div>
        <p>
Open this file and add a new resource key called "DataSourceName.Text" with a value
of "RSS".
</p>
        <div class="captioned_image">
          <img alt="Editing the Resource File" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part1/VS-ResourceFileEditor.png" />
          <p class="caption">
Figure 5 - Editing the Resource File
</p>
        </div>
        <p>
We've almost got a running, albeit useless, Data Source. There's only one more file
to add. Back in the "RSS" folder, add a Web User Control called "Settings.ascx". Open
the Code-behind file (Settings.ascx.vb) and replace the contents with the following
code:
</p>
        <!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red204\green120\blue50;\red0\green0\blue0;\red255\green255\blue255;}??\fs26 \cf1\cb2\highlight2 {\b Imports}\cf3 {\b  DotNetNuke.Modules.Reports.Extensions}\par ??\cf1 {\b Imports}\cf3 {\b  DotNetNuke.Modules.Reports.DataSources}\par ??\par ??\cf1 {\b Partial}\cf3 {\b  }\cf1 {\b Class}\cf3 {\b  DesktopModules_Reports_DataSources_RSS_Settings}\par ??{\b     }\cf1 {\b Inherits}\cf3 {\b  ReportsSettingsBase}\par ??{\b     }\cf1 {\b Implements}\cf3 {\b  IDataSourceSettingsControl}\par ??\par ??\par ??{\b     }\cf1 {\b Public}\cf3 {\b  }\cf1 {\b ReadOnly}\cf3 {\b  }\cf1 {\b Property}\cf3 {\b  DataSourceClass() }\cf1 {\b As}\cf3 {\b  }\cf1 {\b String}\cf3 {\b  }\cf1 {\b Implements}\cf3 {\b  IDataSourceSettingsControl.DataSourceClass}\par ??{\b         }\cf1 {\b Get}\par ??\cf3 {\b             }\cf1 {\b Return}\cf3 {\b  }\cf1 {\b String}\cf3 {\b .Empty}\par ??{\b         }\cf1 {\b End}\cf3 {\b  }\cf1 {\b Get}\par ??\cf3 {\b     }\cf1 {\b End}\cf3 {\b  }\cf1 {\b Property}\par ??{\b End}\cf3 {\b  }\cf1 {\b Class}\par ??}
-->
        <div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas">
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">Imports</span> DotNetNuke.Modules.Reports.Extensions
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">Imports</span> DotNetNuke.Modules.Reports.DataSources
</p>
          <p style="MARGIN: 0px">
 
</p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">Partial</span>
            <span style="COLOR: #cc7832">Class</span> DesktopModules_Reports_DataSources_RSS_Settings
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #cc7832">Inherits</span> ReportsSettingsBase
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #cc7832">Implements</span> IDataSourceSettingsControl
</p>
          <p style="MARGIN: 0px">
 
</p>
          <p style="MARGIN: 0px">
 
</p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #cc7832">Public</span><span style="COLOR: #cc7832">ReadOnly</span><span style="COLOR: #cc7832">Property</span> DataSourceClass() <span style="COLOR: #cc7832">As</span><span style="COLOR: #cc7832">String</span><span style="COLOR: #cc7832">Implements </span>IDataSourceSettingsControl.DataSourceClass
</p>
          <p style="MARGIN: 0px">
        <span style="COLOR: #cc7832">Get</span></p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">Return</span><span style="COLOR: #cc7832">String</span>.Empty
</p>
          <p style="MARGIN: 0px">
        <span style="COLOR: #cc7832">End</span><span style="COLOR: #cc7832">Get</span></p>
          <p style="MARGIN: 0px">
    <span style="COLOR: #cc7832">End</span><span style="COLOR: #cc7832">Property</span></p>
          <p style="MARGIN: 0px">
            <span style="COLOR: #cc7832">End</span>
            <span style="COLOR: #cc7832">Class</span>
          </p>
        </div>
        <p>
Save everything and open your Web Browser. Add an instance of the Reports Module to
a page and open the Settings page. You should now see the "RSS Data Source" in the
Active Data Source drop-down. You can select it, but it doesn't do anything, so don't
click Update.
</p>
        <h3>Conclusion
</h3>
        <p>
That's all for part one. I know there isn't anything really useful yet, but I want
to keep these parts short. Tomorrow, we'll add the code to retrieve data from an RSS
feed.
</p>
        <p>
          <a href="http://blog.andrewnurse.net/content/binary/RSSDataSource/Files/Part1.zip">Download
the code so far.</a>
        </p>
        <img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=155560d2-8873-4fd5-9b6a-df2b23b1a851" />
      </body>
      <title>Developing an RSS Data Source - Part I</title>
      <guid isPermaLink="false">http://blog.andrewnurse.net/PermaLink,guid,155560d2-8873-4fd5-9b6a-df2b23b1a851.aspx</guid>
      <link>http://blog.andrewnurse.net/2008/02/29/DevelopingAnRSSDataSourcePartI.aspx</link>
      <pubDate>Fri, 29 Feb 2008 06:03:39 GMT</pubDate>
      <description>&lt;p&gt;
UPDATE: &lt;a href="http://blog.andrewnurse.net/2008/02/29/DevelopingAnRSSDataSourcePartII.aspx"&gt;Part
II&lt;/a&gt; is now available.
&lt;/p&gt;
&lt;p&gt;
In this series of blogs, I'm going to follow the development of an RSS Data Source.
I'm going to use Visual Studio 2008, but I'll be using .Net 2.0 features so you should
be able to follow along in Visual Studio 2005. You can also use the Express editions
of Visual Web Developer (both 2005 and 2008 versions should work). All the code will
be in VB.Net, but it should be straightforward enough for C# developers to understand
(after all, its all .Net)
&lt;/p&gt;
&lt;h3&gt;Part I - Setting Up
&lt;/h3&gt;
&lt;p&gt;
First things first, you'll need to install a Source distribution of DotNetNuke. I'm
not going to cover that here because there are some other resources out there. You'll
also need to install the Source package of the Reports Module. Once you've done this,
open your DotNetNuke website up in Visual Studio
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="Open Website Dialog" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part1/VS-OpenWebsite.png"&gt; 
&lt;p class=caption&gt;
Figure 1 - Open Website Dialog
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
After opening it, expand the &lt;em&gt;DesktopModules/Reports/DataSources&lt;/em&gt; folder. You
should see something similar to the following
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="Data Sources Folder" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part1/VS-DataSourcesFolder.png"&gt; 
&lt;p class=caption&gt;
Figure 2 - Data Sources Folder
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Each of the folder under the &lt;em&gt;DataSources&lt;/em&gt; folder represents a different Data
Source. So, lets get started and create a folder for our Data Source and call it &lt;em&gt;RSS&lt;/em&gt;.
Inside that folder, we need to create an &lt;em&gt;App_LocalResources&lt;/em&gt; folder. Visual
Studio provides a special menu option to do that:
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="Add App_LocalResources Folder menu item" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part1/VS-AddAppLRFolder.png"&gt; 
&lt;p class=caption&gt;
Figure 3 - Add App_LocalResources Folder menu item
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Inside there, we must create a Resource file. Even if you aren't planning to translate
your Data Source into different languages, the Reports Module uses this file to determine
the name of your Data Source, so you must create it. In this sample, we aren't going
to use the DotNetNuke Localization framework, so this is the only time we'll need
to delve into Resource files. Add a new Resource file to the &lt;em&gt;App_LocalResources &lt;/em&gt;folder
called "DataSource.ascx.resx".
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="Adding a Resource File" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part1/VS-AddResourceFile.png"&gt; 
&lt;p class=caption&gt;
Figure 4 - Adding a Resource File
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Open this file and add a new resource key called "DataSourceName.Text" with a value
of "RSS".
&lt;/p&gt;
&lt;div class=captioned_image&gt;&lt;img alt="Editing the Resource File" src="http://blog.andrewnurse.net/content/binary/RSSDataSource/Images/Part1/VS-ResourceFileEditor.png"&gt; 
&lt;p class=caption&gt;
Figure 5 - Editing the Resource File
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
We've almost got a running, albeit useless, Data Source. There's only one more file
to add. Back in the "RSS" folder, add a Web User Control called "Settings.ascx". Open
the Code-behind file (Settings.ascx.vb) and replace the contents with the following
code:
&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red204\green120\blue50;\red0\green0\blue0;\red255\green255\blue255;}??\fs26 \cf1\cb2\highlight2 {\b Imports}\cf3 {\b  DotNetNuke.Modules.Reports.Extensions}\par ??\cf1 {\b Imports}\cf3 {\b  DotNetNuke.Modules.Reports.DataSources}\par ??\par ??\cf1 {\b Partial}\cf3 {\b  }\cf1 {\b Class}\cf3 {\b  DesktopModules_Reports_DataSources_RSS_Settings}\par ??{\b     }\cf1 {\b Inherits}\cf3 {\b  ReportsSettingsBase}\par ??{\b     }\cf1 {\b Implements}\cf3 {\b  IDataSourceSettingsControl}\par ??\par ??\par ??{\b     }\cf1 {\b Public}\cf3 {\b  }\cf1 {\b ReadOnly}\cf3 {\b  }\cf1 {\b Property}\cf3 {\b  DataSourceClass() }\cf1 {\b As}\cf3 {\b  }\cf1 {\b String}\cf3 {\b  }\cf1 {\b Implements}\cf3 {\b  IDataSourceSettingsControl.DataSourceClass}\par ??{\b         }\cf1 {\b Get}\par ??\cf3 {\b             }\cf1 {\b Return}\cf3 {\b  }\cf1 {\b String}\cf3 {\b .Empty}\par ??{\b         }\cf1 {\b End}\cf3 {\b  }\cf1 {\b Get}\par ??\cf3 {\b     }\cf1 {\b End}\cf3 {\b  }\cf1 {\b Property}\par ??{\b End}\cf3 {\b  }\cf1 {\b Class}\par ??}
--&gt;
&lt;div style="FONT-WEIGHT: bold; FONT-SIZE: 13pt; BACKGROUND: black; COLOR: white; FONT-FAMILY: Consolas"&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;Imports&lt;/span&gt; DotNetNuke.Modules.Reports.Extensions
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;Imports&lt;/span&gt; DotNetNuke.Modules.Reports.DataSources
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;Partial&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Class&lt;/span&gt; DesktopModules_Reports_DataSources_RSS_Settings
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;Inherits&lt;/span&gt; ReportsSettingsBase
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;Implements&lt;/span&gt; IDataSourceSettingsControl
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;Public&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;ReadOnly&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Property&lt;/span&gt; DataSourceClass() &lt;span style="COLOR: #cc7832"&gt;As&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;String&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Implements &lt;/span&gt;IDataSourceSettingsControl.DataSourceClass
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;Get&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;Return&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;String&lt;/span&gt;.Empty
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;End&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Get&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #cc7832"&gt;End&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Property&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: #cc7832"&gt;End&lt;/span&gt; &lt;span style="COLOR: #cc7832"&gt;Class&lt;/span&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
Save everything and open your Web Browser. Add an instance of the Reports Module to
a page and open the Settings page. You should now see the "RSS Data Source" in the
Active Data Source drop-down. You can select it, but it doesn't do anything, so don't
click Update.
&lt;/p&gt;
&lt;h3&gt;Conclusion
&lt;/h3&gt;
&lt;p&gt;
That's all for part one. I know there isn't anything really useful yet, but I want
to keep these parts short. Tomorrow, we'll add the code to retrieve data from an RSS
feed.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.andrewnurse.net/content/binary/RSSDataSource/Files/Part1.zip"&gt;Download
the code so far.&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=155560d2-8873-4fd5-9b6a-df2b23b1a851" /&gt;</description>
      <comments>http://blog.andrewnurse.net/CommentView,guid,155560d2-8873-4fd5-9b6a-df2b23b1a851.aspx</comments>
      <category>DNN</category>
      <category>Reports Module</category>
    </item>
    <item>
      <trackback:ping>http://blog.andrewnurse.net/Trackback.aspx?guid=aeb6fab5-6926-45f9-9dbc-c606d2ec8cc8</trackback:ping>
      <pingback:server>http://blog.andrewnurse.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.andrewnurse.net/PermaLink,guid,aeb6fab5-6926-45f9-9dbc-c606d2ec8cc8.aspx</pingback:target>
      <dc:creator>Andrew Nurse</dc:creator>
      <wfw:comment>http://blog.andrewnurse.net/CommentView,guid,aeb6fab5-6926-45f9-9dbc-c606d2ec8cc8.aspx</wfw:comment>
      <wfw:commentRss>http://blog.andrewnurse.net/SyndicationService.asmx/GetEntryCommentsRss?guid=aeb6fab5-6926-45f9-9dbc-c606d2ec8cc8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A common question that comes up in the Reports Module forums is "How can I display
data relevant to the current User in the Reports Module?". So, I figured I should
write a blog post about a feature that has been in the Reports Module for a few versions.
When writing your SQL Scripts for the Reports Module, you automatically have access
to four parameters: <strong><em>@PortalID</em></strong>, <strong><u><em>@TabID</em></u></strong>, <strong><em>@ModuleID </em></strong>and <strong><em>@UserID</em></strong>.
When the SQL Script is executed, these are replaced by the ID of the current Portal,
Tab, Module and User (respectively).
</p>
        <p>
So, if you wanted to display a list of Roles for the currently logged in user you
could use this script:
</p>
        <div class="csharpcode" style="font-size: 11pt; background: black; color: white; font-family: consolas">
          <p style="margin: 0px">
            <span style="color: #ff8000">SELECT  </span>R.* 
</p>
          <p style="margin: 0px">
            <span style="color: #ff8000">FROM    </span>{oQ}UserRoles UR 
</p>
          <p style="margin: 0px">
    <span style="color: #ff8000">INNER JOIN </span>dnn_Roles R 
</p>
          <p style="margin: 0px">
    <span style="color: #ff8000">ON    </span>    
UR.RoleID = R.RoleID 
</p>
          <p style="margin: 0px">
            <span style="color: #ff8000">WHERE   </span>UR.UserID = @UserID
</p>
        </div>
        <p>
When you run this script, the current user's ID will be substituted in the place of
the <strong><em>@UserID</em></strong> parameter. (Note: This is done by SQL Server
itself, which avoids SQL Injection attacks). Also, the <strong><em>{oQ}</em></strong> token
is replaced with the Object Qualifier configured for your database (if you configured
one in your web.config file)
</p>
        <p>
Here's another example. It's a script that retrieves the <strong><em>Website</em></strong> profile
property for each user in the current portal.
</p>
        <div style="font-size: 11pt; background: black; color: white; font-family: consolas">
          <p style="margin: 0px">
            <span style="color: #ff8000">SELECT     </span>U.Username,
</p>
          <p style="margin: 0px">
          <em>(<span style="color: #ff8000">SELECT     </span>PropertyValue</em></p>
          <p style="margin: 0px">
            <em>           <span style="color: #ff8000">FROM    </span>  
{oQ}UserProfile <span style="color: #ff8000">AS </span>UP</em>
          </p>
          <p style="margin: 0px">
            <em>           <span style="color: #ff8000">INNER
JOIN </span>{oQ}ProfilePropertyDefinition <span style="color: #ff8000">AS </span>PPD </em>
          </p>
          <p style="margin: 0px">
            <em>           <span style="color: #ff8000">ON    </span>    
PPD.PropertyDefinitionID = UP.PropertyDefinitionID</em>
          </p>
          <p style="margin: 0px">
            <em>
              <span style="color: #ff8000">          
WHERE    </span>  UP.UserId = U.UserId</em>
          </p>
          <p style="margin: 0px">
            <em>           <span style="color: #ff8000">AND        </span>PropertyName
= <span style="color: lime">'Website'</span></em>
          </p>
          <p style="margin: 0px">
            <em>           <span style="color: #ff8000">AND    </span>   
PropertyCategory = <span style="color: lime">'Contact Info'</span>) <span style="color: #ff8000">AS </span><span style="color: lime">'Website'</span></em>
          </p>
          <p style="margin: 0px">
            <span style="color: #ff8000">FROM    </span>   {oQ}UserPortals <span style="color: #ff8000">AS </span>UP
</p>
          <p style="margin: 0px">
            <span style="color: #ff8000">INNER JOIN </span>{oQ}Users <span style="color: #ff8000">AS </span>U 
</p>
          <p style="margin: 0px">
            <span style="color: #ff8000">ON    </span>    
UP.UserId = U.UserId
</p>
          <p style="margin: 0px">
            <span style="color: #ff8000">WHERE    </span>  PortalID = @PortalID
</p>
        </div>
        <p>
The <em>italicized</em> section is the part that actually retrieves the property value,
you can replace the <strong><em>PropertyName</em></strong> and <strong><em>PropertyCategory</em></strong> values
as you like and repeat this section multiple times to bring back multiple profile
properties.
</p>
        <p>
One of the planned future features for the module is to support user-specified parameters.
This means you could place a text box, drop down, calendar or other control on the
view page for the module and the value of this control would be used as a parameter
to the Report. At the moment you're limited to these four parameters, but there's
still a lot you can do with them!
</p>
        <img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=aeb6fab5-6926-45f9-9dbc-c606d2ec8cc8" />
      </body>
      <title>Using Parameters in the Reports Module</title>
      <guid isPermaLink="false">http://blog.andrewnurse.net/PermaLink,guid,aeb6fab5-6926-45f9-9dbc-c606d2ec8cc8.aspx</guid>
      <link>http://blog.andrewnurse.net/2007/12/19/UsingParametersInTheReportsModule.aspx</link>
      <pubDate>Wed, 19 Dec 2007 14:17:04 GMT</pubDate>
      <description>&lt;p&gt;
A common question that comes up in the Reports Module forums is &amp;quot;How can I display
data relevant to the current User in the Reports Module?&amp;quot;. So, I figured I should
write a blog post about a feature that has been in the Reports Module for a few versions.
When writing your SQL Scripts for the Reports Module, you automatically have access
to four parameters: &lt;strong&gt;&lt;em&gt;@PortalID&lt;/em&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;u&gt;&lt;em&gt;@TabID&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;em&gt;@ModuleID &lt;/em&gt;&lt;/strong&gt;and &lt;strong&gt;&lt;em&gt;@UserID&lt;/em&gt;&lt;/strong&gt;.
When the SQL Script is executed, these are replaced by the ID of the current Portal,
Tab, Module and User (respectively).
&lt;/p&gt;
&lt;p&gt;
So, if you wanted to display a list of Roles for the currently logged in user you
could use this script:
&lt;/p&gt;
&lt;div class="csharpcode" style="font-size: 11pt; background: black; color: white; font-family: consolas"&gt;
&lt;p style="margin: 0px"&gt;
&lt;span style="color: #ff8000"&gt;SELECT&amp;#160; &lt;/span&gt;R.* 
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&lt;span style="color: #ff8000"&gt;FROM&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;{oQ}UserRoles UR 
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #ff8000"&gt;INNER JOIN &lt;/span&gt;dnn_Roles R 
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #ff8000"&gt;ON&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
UR.RoleID = R.RoleID 
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&lt;span style="color: #ff8000"&gt;WHERE&amp;#160;&amp;#160; &lt;/span&gt;UR.UserID = @UserID
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
When you run this script, the current user's ID will be substituted in the place of
the &lt;strong&gt;&lt;em&gt;@UserID&lt;/em&gt;&lt;/strong&gt; parameter. (Note: This is done by SQL Server
itself, which avoids SQL Injection attacks). Also, the &lt;strong&gt;&lt;em&gt;{oQ}&lt;/em&gt;&lt;/strong&gt; token
is replaced with the Object Qualifier configured for your database (if you configured
one in your web.config file)
&lt;/p&gt;
&lt;p&gt;
Here's another example. It's a script that retrieves the &lt;strong&gt;&lt;em&gt;Website&lt;/em&gt;&lt;/strong&gt; profile
property for each user in the current portal.
&lt;/p&gt;
&lt;div style="font-size: 11pt; background: black; color: white; font-family: consolas"&gt;
&lt;p style="margin: 0px"&gt;
&lt;span style="color: #ff8000"&gt;SELECT&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;U.Username,
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;em&gt;(&lt;span style="color: #ff8000"&gt;SELECT&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;PropertyValue&lt;/em&gt;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&lt;em&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #ff8000"&gt;FROM&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;#160;&amp;#160;
{oQ}UserProfile &lt;span style="color: #ff8000"&gt;AS &lt;/span&gt;UP&lt;/em&gt;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&lt;em&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #ff8000"&gt;INNER
JOIN &lt;/span&gt;{oQ}ProfilePropertyDefinition &lt;span style="color: #ff8000"&gt;AS &lt;/span&gt;PPD &lt;/em&gt;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&lt;em&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #ff8000"&gt;ON&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
PPD.PropertyDefinitionID = UP.PropertyDefinitionID&lt;/em&gt;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&lt;em&gt;&lt;span style="color: #ff8000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
WHERE&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;#160; UP.UserId = U.UserId&lt;/em&gt;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&lt;em&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #ff8000"&gt;AND&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;PropertyName
= &lt;span style="color: lime"&gt;'Website'&lt;/span&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&lt;em&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #ff8000"&gt;AND&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;#160;&amp;#160;&amp;#160;
PropertyCategory = &lt;span style="color: lime"&gt;'Contact Info'&lt;/span&gt;) &lt;span style="color: #ff8000"&gt;AS &lt;/span&gt;&lt;span style="color: lime"&gt;'Website'&lt;/span&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&lt;span style="color: #ff8000"&gt;FROM&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;#160;&amp;#160; {oQ}UserPortals &lt;span style="color: #ff8000"&gt;AS &lt;/span&gt;UP
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&lt;span style="color: #ff8000"&gt;INNER JOIN &lt;/span&gt;{oQ}Users &lt;span style="color: #ff8000"&gt;AS &lt;/span&gt;U 
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&lt;span style="color: #ff8000"&gt;ON&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;
UP.UserId = U.UserId
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&lt;span style="color: #ff8000"&gt;WHERE&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&amp;#160; PortalID = @PortalID
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
The &lt;em&gt;italicized&lt;/em&gt; section is the part that actually retrieves the property value,
you can replace the &lt;strong&gt;&lt;em&gt;PropertyName&lt;/em&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;em&gt;PropertyCategory&lt;/em&gt;&lt;/strong&gt; values
as you like and repeat this section multiple times to bring back multiple profile
properties.
&lt;/p&gt;
&lt;p&gt;
One of the planned future features for the module is to support user-specified parameters.
This means you could place a text box, drop down, calendar or other control on the
view page for the module and the value of this control would be used as a parameter
to the Report. At the moment you're limited to these four parameters, but there's
still a lot you can do with them!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=aeb6fab5-6926-45f9-9dbc-c606d2ec8cc8" /&gt;</description>
      <comments>http://blog.andrewnurse.net/CommentView,guid,aeb6fab5-6926-45f9-9dbc-c606d2ec8cc8.aspx</comments>
      <category>DNN</category>
      <category>Reports Module</category>
    </item>
    <item>
      <trackback:ping>http://blog.andrewnurse.net/Trackback.aspx?guid=615f5170-84bc-435c-ab99-a28ad5a792ce</trackback:ping>
      <pingback:server>http://blog.andrewnurse.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.andrewnurse.net/PermaLink,guid,615f5170-84bc-435c-ab99-a28ad5a792ce.aspx</pingback:target>
      <dc:creator>Andrew Nurse</dc:creator>
      <wfw:comment>http://blog.andrewnurse.net/CommentView,guid,615f5170-84bc-435c-ab99-a28ad5a792ce.aspx</wfw:comment>
      <wfw:commentRss>http://blog.andrewnurse.net/SyndicationService.asmx/GetEntryCommentsRss?guid=615f5170-84bc-435c-ab99-a28ad5a792ce</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
After a few delays, version 5.0 of the Reports Module has been released to the Module
Release Process. This means that it should be released shortly (though given the time
of year, it may take a couple of weeks). I'll be posting some How-To screencasts walking
through the new features (and some old ones too) in the next week or so. I'm also
working on a full User's Guide to be released shortly.
</p>
        <p>
          <strong>One important note regarding Reports 5.0:</strong> The module <strong>requires
at least v4.6 of the DotNetNuke core</strong>, it will <strong>NOT</strong> run on
a previous version of the core. This is because of the new Visualizer and Data Source
installers which use the Package Installer introduced in v4.6. I hope to release a
version of the module with the installer portions removed which will be referred to
as "Version 4.9".
</p>
        <p>
To give you an idea of what's coming, here's an excerpt from the release notes containing
a list of resolved issues in this version (The same list can be found here: <a title="http://support.dotnetnuke.com/project/RoadMap.aspx?PROJID=36" href="http://support.dotnetnuke.com/project/RoadMap.aspx?PROJID=36">http://support.dotnetnuke.com/project/RoadMap.aspx?PROJID=36</a>)
</p>
        <ul>
          <li>
            <strong>
              <em>RPT-5634</em> JavaScipt error when first configuring Reports DNN _04.05.01 
<br /></strong>    A JavaScript error was occuring on the main settings page,
this has been corrected 
</li>
          <li>
            <strong>
              <em>RPT-5676</em> HTML Decoding in XSL Visualizer 
<br /></strong>    Fix through RPT-6514 
</li>
          <li>
            <strong>
              <em>RPT-4698</em> Clean up interface for Reporting Services Visualizer 
<br /></strong>    Interface for Reporting Services Visualizer has been improved
significantly the Visualizer has also been renamed to the "Microsoft ReportViewer
Visualizer" 
</li>
          <li>
            <strong>
              <em>RPT-5715 </em>Include {databaseOwner} token in upgrade SQL scripts 
<br /></strong>    Scripts have been corrected 
</li>
          <li>
            <strong>
              <em>RPT-5791 </em>Run Reports on Demand 
<br /></strong>    Reports can now be run "on-demand" rather than
automatically on load 
</li>
          <li>
            <strong>
              <em>RPT-5806 </em>Support the EnableExternalImages property of ReportViewer
control 
<br /></strong>    The EnableExternalImages and EnableHyperlink properties
are now supported, along with many others (see RPT-4698) 
</li>
          <li>
            <strong>
              <em>RPT-3994 </em>Alternate Data Sources 
<br /></strong>    Data Sources Framework allows Reports to run queries against
other Databases (SQL Server, Access, Oracle, etc.) 
</li>
          <li>
            <strong>
              <em>RPT-6466 </em>Disable the Use of Parameters while Caching is enabled 
<br /></strong>    Paramaters are disabled when Caching is enabled due to
a serious privacy risk 
</li>
          <li>
            <strong>
              <em>RPT-6514 </em>HTML Decoding and Encoding of fields retrieved from database 
<br /></strong>    Fields can now be individually HTML Encoded and HTML Decoded
before being passed to the Visualizer 
</li>
          <li>
            <strong>
              <em>RPT-6516 </em>Report Info Pane 
<br /></strong>    An info pane displaying the title and description of the
report can now be displayed on the main screen 
</li>
          <li>
            <strong>
              <em>RPT-6454 </em>Allow Users to specify custom CSS Styles and Classes for
the Grid in the Grid Visualizer 
<br /></strong>    Users can use custom CSS to style the Grid Visualizer 
</li>
          <li>
            <strong>
              <em>RPT-6438 </em>Add a setting to enable/disable Grid Lines in Grid Visualizer 
<br /></strong>    Grid Lines can now be configured in the Grid Visualizer 
</li>
        </ul>
        <p>
Keep an eye on the blogs for more updates, I'll make sure to post here when the module
is released!
</p>
        <p>
        </p>
        <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:ddc7a729-54ea-4d20-9c15-6693fe547072" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati
Tags: <a href="http://technorati.com/tags/DotNetNuke" rel="tag">DotNetNuke</a>,<a href="http://technorati.com/tags/Reporting" rel="tag">Reporting</a>,<a href="http://technorati.com/tags/ASP.Net" rel="tag">ASP.Net</a></div>
        <img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=615f5170-84bc-435c-ab99-a28ad5a792ce" />
      </body>
      <title>Reports Module v5.0 Released to Tracker</title>
      <guid isPermaLink="false">http://blog.andrewnurse.net/PermaLink,guid,615f5170-84bc-435c-ab99-a28ad5a792ce.aspx</guid>
      <link>http://blog.andrewnurse.net/2007/12/19/ReportsModuleV50ReleasedToTracker.aspx</link>
      <pubDate>Wed, 19 Dec 2007 13:42:02 GMT</pubDate>
      <description>&lt;p&gt;
After a few delays, version 5.0 of the Reports Module has been released to the Module
Release Process. This means that it should be released shortly (though given the time
of year, it may take a couple of weeks). I'll be posting some How-To screencasts walking
through the new features (and some old ones too) in the next week or so. I'm also
working on a full User's Guide to be released shortly.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;One important note regarding Reports 5.0:&lt;/strong&gt; The module &lt;strong&gt;requires
at least v4.6 of the DotNetNuke core&lt;/strong&gt;, it will &lt;strong&gt;NOT&lt;/strong&gt; run on
a previous version of the core. This is because of the new Visualizer and Data Source
installers which use the Package Installer introduced in v4.6. I hope to release a
version of the module with the installer portions removed which will be referred to
as &amp;quot;Version 4.9&amp;quot;.
&lt;/p&gt;
&lt;p&gt;
To give you an idea of what's coming, here's an excerpt from the release notes containing
a list of resolved issues in this version (The same list can be found here: &lt;a title="http://support.dotnetnuke.com/project/RoadMap.aspx?PROJID=36" href="http://support.dotnetnuke.com/project/RoadMap.aspx?PROJID=36"&gt;http://support.dotnetnuke.com/project/RoadMap.aspx?PROJID=36&lt;/a&gt;)
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;RPT-5634&lt;/em&gt; JavaScipt error when first configuring Reports DNN _04.05.01 
&lt;br /&gt;
&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160; A JavaScript error was occuring on the main settings page,
this has been corrected 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;RPT-5676&lt;/em&gt; HTML Decoding in XSL Visualizer 
&lt;br /&gt;
&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160; Fix through RPT-6514 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;RPT-4698&lt;/em&gt; Clean up interface for Reporting Services Visualizer 
&lt;br /&gt;
&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160; Interface for Reporting Services Visualizer has been improved
significantly the Visualizer has also been renamed to the &amp;quot;Microsoft ReportViewer
Visualizer&amp;quot; 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;RPT-5715 &lt;/em&gt;Include {databaseOwner} token in upgrade SQL scripts 
&lt;br /&gt;
&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160; Scripts have been corrected 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;RPT-5791 &lt;/em&gt;Run Reports on Demand 
&lt;br /&gt;
&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160; Reports can now be run &amp;quot;on-demand&amp;quot; rather than
automatically on load 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;RPT-5806 &lt;/em&gt;Support the EnableExternalImages property of ReportViewer
control 
&lt;br /&gt;
&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160; The EnableExternalImages and EnableHyperlink properties
are now supported, along with many others (see RPT-4698) 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;RPT-3994 &lt;/em&gt;Alternate Data Sources 
&lt;br /&gt;
&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160; Data Sources Framework allows Reports to run queries against
other Databases (SQL Server, Access, Oracle, etc.) 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;RPT-6466 &lt;/em&gt;Disable the Use of Parameters while Caching is enabled 
&lt;br /&gt;
&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160; Paramaters are disabled when Caching is enabled due to
a serious privacy risk 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;RPT-6514 &lt;/em&gt;HTML Decoding and Encoding of fields retrieved from database 
&lt;br /&gt;
&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160; Fields can now be individually HTML Encoded and HTML Decoded
before being passed to the Visualizer 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;RPT-6516 &lt;/em&gt;Report Info Pane 
&lt;br /&gt;
&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160; An info pane displaying the title and description of the
report can now be displayed on the main screen 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;RPT-6454 &lt;/em&gt;Allow Users to specify custom CSS Styles and Classes for
the Grid in the Grid Visualizer 
&lt;br /&gt;
&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160; Users can use custom CSS to style the Grid Visualizer 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;RPT-6438 &lt;/em&gt;Add a setting to enable/disable Grid Lines in Grid Visualizer 
&lt;br /&gt;
&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160; Grid Lines can now be configured in the Grid Visualizer 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Keep an eye on the blogs for more updates, I'll make sure to post here when the module
is released!
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:ddc7a729-54ea-4d20-9c15-6693fe547072" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati
Tags: &lt;a href="http://technorati.com/tags/DotNetNuke" rel="tag"&gt;DotNetNuke&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Reporting" rel="tag"&gt;Reporting&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ASP.Net" rel="tag"&gt;ASP.Net&lt;/a&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=615f5170-84bc-435c-ab99-a28ad5a792ce" /&gt;</description>
      <comments>http://blog.andrewnurse.net/CommentView,guid,615f5170-84bc-435c-ab99-a28ad5a792ce.aspx</comments>
      <category>DNN</category>
      <category>Reports Module</category>
    </item>
  </channel>
</rss>