Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

The best choice for your web site host, email hosting, and domain registration.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
WebHostForAsp.net
 


  Sponsors  

Meet Our Sponsors

Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Reports Module ...  What's New Script for Reports Module
Previous Previous
 
Next Next
New Post 5/2/2008 10:24 AM
User is offline Steven Lundahl
8 posts
www.LundahlCorp.com
10th Ranked


What's New Script for Reports Module 

I was in need of the What's New module which I soon discovered was no longer supported so I whipped up my own, rather quickly.  You can use this as a starting point to build your own for your own needs without having to reinvent the wheel too much.

I have used a stored procedure because of a size restriction on the field for the report SQL statement.

In addition to the stored procedure, you will need the following settings at a minimum in the report module:

Query:  exec myprefix_WhatsNew

HtmlDecode: Content

The formatting of this report is rather crude but there are options in the reporting module to clean that up if you want.

You will want to look at each of the queries in this script to customize them for your needs.  In the portal that I wrote this for, there is only one tab with a blog module and only one tab with the forums module so I hard-coded those tab IDs.  You may need to make those dynamic.

This What's New? report will work (with modifications for your portal) with the following "out-of-the-box" DNN modules:

  • Text/HTML
  • Announcements
  • Wiki
  • Blog
  • Discussions

You can expand/contract it as needed to work with modules of your choice.

Stored Procedure (Name it to what you want, of course):

create procedure myprefix_WhatsNew
as
select top 50
	'Link' as LinkTo,
	substring(wt.Content, 1, 150) as [Content],
	substring(tb.Title, 1, 30) as [Page Title],
	wt.UpdateDate as Date
from 
	wiki_topic wt,
	tabmodules tm,
	Tabs tb
where 
	wt.moduleid = tm.moduleid and
	tm.tabid = tb.tabid

union all

select top 50
	'Link' as LinkTo,
	substring(ht.desktophtml, 1, 100)  as [Content],
	substring(tb.Title, 1, 30) as [Page Title],
	ht.CreatedDate as Date
	
from 
	htmltext ht,
	tabmodules tm,
	Tabs tb
where 
	ht.moduleid = tm.moduleid and
	tm.tabid = tb.tabid

union all

select top 50
	'Link' as LinkTo,
	substring(an.Title, 1, 100)  as [Content],
	substring(tb.Title, 1, 30) as [Page Title],
	an.PublishDate as Date
	
from 
	Announcements an,
	tabmodules tm,
	Tabs tb
where 
	an.moduleid = tm.moduleid and
	tm.tabid = tb.tabid

union all

select top 50
	'Link' as LinkTo,
	substring(be.Entry, 1, 100)  as [Content],
	substring(bb.Title, 1, 30) as [Page Title],
	be.AddedDate as Date
from 
	Blog_Entries be,
	Blog_Blogs bb,
	Tabs tb
where 
	be.blogid = bb.blogid and
	tb.tabid = 55

union all

select top 50
	'Link' as LinkTo,
	substring(fp.Subject, 1, 100)  as [Content],
	'Discussion Forum - ' + substring(ff.Name, 1, 30) as [Page Title],
	fp.UpdatedDate as [Date]
from 
	Forum_Posts fp,
	Forum_Threads ft,
	Forum_Forums ff
where 
	fp.ThreadID = ft.ThreadID and
	ft.ForumID = ff.ForumID

order by Date desc
 
New Post 5/3/2008 5:22 AM
User is offline Dean Craft
50 posts
10th Ranked


Re: What's New Script for Reports Module 

Thanks Steven i do a reply to a searched post only to find out that someone posted about it 4 hours previous.

For a complete n00b, are you meaning that with it being a stored proceedure, i can't paste it into the SQL Query area of the Reports module? OR do the SQL query area allow for "stored Procedures"?

Thanks in advance,

Dean

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Reports Module ...  What's New Script for Reports Module
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Customer Connect
Customer Connect provides cutting edge solutions that deliver sales, marketing and customer service results.
www.customer-connect.com
TechNexxus
Business process and technology sourcing solutions delivering superior people, process and value. We have used, and continue to use, DNN successfully in numerous client projects to deliver exceptional value. We are proud to support the DNN team and community.
www.technexxus.com
PartnerPoint | Community of Microsoft Partners
PartnerPoint is one of the largest and most active online communities of Microsoft Partners worlwide with over 8,000 members.
www.PartnerPoint.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP