Rod's profileRod StaggPhotosBlogListsMore Tools Help

Blog


    March 21

    Content Rating Part III-adding a customized sort expression

     
    In the case of the content rating site template I wanted to sort the list by rating with the highest rated items rolling to the top:
     
    Here is the expression I used:

    format-number(sum(../../../Content_Ratings/Rows/Row[@BPID=@ID]/@Rating)div (@Ratings), '###0.0;-###0.0')
     
    Notice it's similiar to the rating expression itself.  pretty cool.
     
    To do your own you can add directly to your DVWP's sort/grouping.
     
    Go to your DVWP, select sort and group, remove any prior sort expressions, add a new custom sort expression using the handy x-path editor (hand tweak as necessary for you own needs) and whaaa laaa-
     
    Rod.

    Comments (3)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.
    Rod Stagg has turned off comments on this page.
    No namewrote:
    http://www.batteryfast.co.uk/asus/al23901.htm asus al23901 battery
    http://www.batteryfast.co.uk/asus/al241000.htm asus al241000 battery
    http://www.batteryfast.co.uk/samsung/nc10.htm samsung nc10 battery
    http://www.batteryfast.co.uk/samsung/aa-pb6nc6w.htm samsung aa-pb6nc6w battery
    http://www.batteryfast.co.uk/samsung/nc10-14gb.htm samsung nc10-14gb battery
    http://www.batteryfast.co.uk/samsung/nc10-ka05.htm samsung nc10-ka05 battery
    http://www.batteryfast.co.uk/samsung/aa-pb8nc6b.htm samsung aa-pb8nc6b battery
    http://www.batteryfast.co.uk/samsung/nc10-14gw.htm samsung nc10-14gw battery
    http://www.batteryfast.co.uk/samsung/nc10-ka01us.htm samsung nc10-ka01us battery
    http://www.batteryfast.co.uk/samsung/aa-pb8nc6m.htm samsung aa-pb8nc6m battery
    http://www.batteryfast.co.uk/samsung/nc10-ka03.htm samsung nc10-ka03 battery
    http://www.batteryfast.co.uk/samsung/nc10-ka04.htm samsung nc10-ka04 battery
    http://www.batteryfast.co.uk/samsung/nc10-ka05.htm samsung nc10-ka05 battery
    http://www.batteryfast.co.uk/samsung/nd10.htm samsung nd10 battery
    http://www.batteryfast.co.uk/asus/a31-f9.htm asus a31-f9 battery
    http://www.batteryfast.co.uk/asus/a32-f9.htm asus a32-f9 battery
    http://www.batteryfast.co.uk/asus/eee-pc-s101.htm asus eee pc s101 battery
    http://www.batteryfast.co.uk/asus/ap22-u1001.htm asus ap22-u1001 battery
    http://www.batteryfast.co.uk/benq/u101.htm benq u101 battery
    http://www.batteryfast.co.uk/benq/squ-812.htm benq squ-812 battery
    http://www.batteryfast.co.uk/clevo/d400.htm clevo d400 battery
    http://www.batteryfast.co.uk/clevo/d400s.htm clevo d400s battery
    http://www.batteryfast.co.uk/clevo/d410.htm clevo d410 battery
    http://www.batteryfast.co.uk/clevo/d470w.htm clevo d470w battery
    http://www.batteryfast.co.uk/clevo/87-d408s-4c5.htm clevo 87-d408s-4c5 battery
    http://www.batteryfast.co.uk/samsung/np-r50.htm samsung np-r50 battery
    http://www.batteryfast.co.uk/samsung/r55-cv02.htm samsung r55-cv02 battery
    http://www.batteryfast.co.uk/samsung/r50-1800.htm samsung r50-1800 battery
    http://www.batteryfast.co.uk/samsung/m55-t003.htm samsung m55-t003 battery
    http://www.batteryfast.co.uk/hp/hstnn-db63.htm hp hstnn-db63 battery
    http://www.batteryfast.co.uk/hp/hstnn-db64.htm hp hstnn-db64 battery
    http://www.batteryfast.co.uk/hp/482262-001.htm hp 482262-001 battery
    http://www.batteryfast.co.uk/hp/2133.htm hp 2133 battery
    http://www.batteryfast.co.uk/clevo/87-22s8s-4ec.htm clevo 87-22s8s-4ec battery
    http://www.batteryfast.co.uk/clevo/m22bat-8.htm clevo m22bat-8 battery
    http://www.batteryfast.co.uk/acer/2420.php acer BTP-ARJ1 2420 series
    http://www.batteryfast.co.uk/acer/as07b72-battery.php Battery Fit Aspire 5520 5920 Series AS07B72
    http://www.batteryfast.co.uk/acer/batcl50l.php acer travelmate 290 291 29x 292 batcl50l
    http://www.batteryfast.co.uk/acer/batecq60.php acer 1800 series batecq60
    http://www.batteryfast.co.uk/acer/batefl50l6c40-battery.php Battery For Aspire 5030 5050 5500 5550 5570 5580
    http://www.batteryfast.co.uk/acer/btp-39d1.php acer btp-620 btp-39d1 btp-39sn ms2103
    http://www.batteryfast.co.uk/acer/btp-43d1.php acer travelmate 22x 23x 26x 28x btp-43d1
    http://www.batteryfast.co.uk/acer/btp-550.php acer btp-550p btp-550 bat30n3l batby27l
    http://www.batteryfast.co.uk/acer/btp-agd1.php acer btp-63d1 btp-agd1 3020 3610
    May 5
    Rod Staggwrote:
    Hey, I think I sent in email awhile back right?  Customizing DVWPs and such in SP Designer and packaging up as a site template is one way.  This works fine if you can over-write the entire site or create new ones for test/UAT is an option.  If you are going to be developing and deploying web parts in a traditional software development methodology and deployment process and have access to the server environments then you should consider developing this web-part in Visual Studio/C# and deploying as either a site feature or dropping the assembly files and artifacts as part of a deployment process.  I recommend using the smart-part template for simplying developing the web part in VS.  Check out MSDN for tons of info on web part development in MOSS 2007/WSS 3.0.  For deployment scenarios you might want to quickly read Team Based Development on MOSS 2007...  Search the web for smart part info-it's out there in spades. 
    Aug. 6
    Arulwrote:
    Hi Rod,
     
     
    Its very nice, I am facing some problem while deploying that particular XSLT view from development server to Testing/Production server.
     
    Please help/suggest me, how we can deploy these XSLT views to Testing/Production Server.
     
    Thank You.
     
    May 21

    Trackbacks (2)

    The trackback URL for this entry is:
    http://rodstagg.spaces.live.com/blog/cns!11725DEB07615960!244.trak
    Weblogs that reference this entry