<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>My Views &#38; Thoughts</title>
	<atom:link href="http://nissankg.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nissankg.wordpress.com</link>
	<description>My web experiments</description>
	<lastBuildDate>Wed, 28 Oct 2009 05:16:43 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='nissankg.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/454349db6e2e38fe30cc8b6da53f08d7?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>My Views &#38; Thoughts</title>
		<link>http://nissankg.wordpress.com</link>
	</image>
			<item>
		<title>ASP.NET Performance Check List</title>
		<link>http://nissankg.wordpress.com/2009/10/27/asp-net-performance-tips/</link>
		<comments>http://nissankg.wordpress.com/2009/10/27/asp-net-performance-tips/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 07:10:20 +0000</pubDate>
		<dc:creator>nissankg</dc:creator>
				<category><![CDATA[ASP.net & SQL]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ASP.NET Performance Tips]]></category>
		<category><![CDATA[ASP.NET Performance check list]]></category>
		<category><![CDATA[Create your own Performance Tips]]></category>
		<category><![CDATA[SQL Server 2005 Performance Tips]]></category>

		<guid isPermaLink="false">http://nissankg.wordpress.com/?p=39</guid>
		<description><![CDATA[I found these articles very helpful improve the  Performance  of  our ASP.net  sites
find out from these articles
http://articles.sitepoint.com/article/aspnet-performance-tips/5
http://msdn.microsoft.com/en-us/magazine/cc163854.aspx
http://msdn.microsoft.com/en-us/library/ms973839.aspx
then  prepare check list like  as follows:



Check List
Status (Done/Not   Done)
Performance (in %)



Database Side
1.       Use   proper indexing
2.        Avoid joints for high density tables
3.       Use   SQL profiler to check work load
4.       Use   Database [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=39&subd=nissankg&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I found these articles very helpful improve the  Performance  of  our ASP.net  sites</p>
<p>find out from these articles</p>
<p>http://articles.sitepoint.com/article/aspnet-performance-tips/5</p>
<p>http://msdn.microsoft.com/en-us/magazine/cc163854.aspx</p>
<p>http://msdn.microsoft.com/en-us/library/ms973839.aspx</p>
<p>then  prepare check list like  as follows:</p>
<table style="height:856px;" border="1" cellspacing="0" cellpadding="0" width="441">
<tbody>
<tr>
<td width="307" valign="top"><strong>Check List</strong></td>
<td width="158" valign="top"><strong>Status (Done/Not   Done)</strong></td>
<td width="154" valign="top"><strong>Performance (in %)</strong></td>
</tr>
<tr>
<td width="307" valign="top">
<h5>Database Side</h5>
<h5>1.       Use   proper indexing</h5>
<h5>2.        Avoid joints for high density tables</h5>
<h5>3.       Use   SQL profiler to check work load</h5>
<h5>4.       Use   Database Tuning Advisor for analyzing database performance</h5>
<h5><code>5. </code><strong>Use <code>NOLOCK select Query for viewing   data </code></strong></h5>
<h5>6.       Select   proper Hardware for running SQL Server</h5>
<h5>7.       Dot   use Cursor</h5>
<h5>8.       Use   Custom Pagination in SQL2005 (Row Count)</h5>
<h5>9.       Add   your own check list</h5>
</td>
<td width="158" valign="top"></td>
<td width="154" valign="top"></td>
</tr>
<tr>
<td width="307" valign="top">
<h5>ASP.Net</h5>
<h5>1)       Use   Trace log to analyze performance of each function</h5>
<h5>2)       Turn   off View Sate if not required</h5>
<h5><strong>3) </strong><strong>Compressing the View State   (</strong>GZIP<strong>)</strong></h5>
<h5>4)       Minimize   use of <code>Session </code>object and don’t initialize large object like   data set to session</h5>
<h5><strong>5) </strong><strong>Enabling HTTP Compression Support in IIS   6</strong></h5>
<h5>6)       Use   proper ASP.NET cache mechanism according to situation</h5>
<h5>7)       Use   light weight controls like repeater replace with grid control and minimize   use of controls</h5>
<h5>8)       Use   StringBuilder for Complex String Manipulation</h5>
<h5>9)       Throw   Fewer Exceptions</h5>
<h5>10)   ValueTypes   are far less flexible than Objects  avoid   boxing and unboxing</h5>
<h5>11)   Use   generic list</h5>
<h5>12)   Use   proper architecture according to   situation (MVP, MVC, N-tire etc)</h5>
<h5>13)   Add   your own check list</h5>
<p><strong> </strong></td>
<td width="158" valign="top"></td>
<td width="154" valign="top"></td>
</tr>
</tbody>
</table>
<p><strong>then fill </strong><strong><strong>Performance column in the above table </strong><br />
</strong></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nissankg.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nissankg.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nissankg.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nissankg.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nissankg.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nissankg.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nissankg.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nissankg.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nissankg.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nissankg.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=39&subd=nissankg&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nissankg.wordpress.com/2009/10/27/asp-net-performance-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff96a7329e3176794447fadaaa3eb205?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nissankg</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting Started Tutorial for WCF</title>
		<link>http://nissankg.wordpress.com/2009/10/24/getting-started-tutorial-for-wcf/</link>
		<comments>http://nissankg.wordpress.com/2009/10/24/getting-started-tutorial-for-wcf/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 08:35:02 +0000</pubDate>
		<dc:creator>nissankg</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Getting Started Tutorial for WCF]]></category>

		<guid isPermaLink="false">http://nissankg.wordpress.com/?p=37</guid>
		<description><![CDATA[Hi all
I found following links are useful for learning  WCF

http://msdn.microsoft.com/en-us/library/ms734712.aspx
http://www.wcf-training-guide.com/
http://bloggingabout.net/blogs/dennis/archive/2007/04/20/wcf-simple-example.aspx

       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=37&subd=nissankg&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hi all</p>
<p>I found following links are useful for learning  WCF</p>
<ol>
<li>http://msdn.microsoft.com/en-us/library/ms734712.aspx</li>
<li>http://www.wcf-training-guide.com/</li>
<li>http://bloggingabout.net/blogs/dennis/archive/2007/04/20/wcf-simple-example.aspx</li>
</ol>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nissankg.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nissankg.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nissankg.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nissankg.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nissankg.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nissankg.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nissankg.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nissankg.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nissankg.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nissankg.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=37&subd=nissankg&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nissankg.wordpress.com/2009/10/24/getting-started-tutorial-for-wcf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff96a7329e3176794447fadaaa3eb205?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nissankg</media:title>
		</media:content>
	</item>
		<item>
		<title>Custom Paging User Control in ASP.NET 2.0 with SQL Server 2005</title>
		<link>http://nissankg.wordpress.com/2008/11/17/custom-paging-user-control-in-aspnet-20-with-sql-server-2005/</link>
		<comments>http://nissankg.wordpress.com/2008/11/17/custom-paging-user-control-in-aspnet-20-with-sql-server-2005/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 13:11:37 +0000</pubDate>
		<dc:creator>nissankg</dc:creator>
				<category><![CDATA[User Control]]></category>
		<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[Custom Paging]]></category>
		<category><![CDATA[Custom Paging  in ASP.NET 2.0]]></category>
		<category><![CDATA[Custom Paging  in SQL2005]]></category>
		<category><![CDATA[Custom Paging User Control]]></category>
		<category><![CDATA[ROW_NUMBER()]]></category>
		<category><![CDATA[ROW_NUMBER() using Custom Paging]]></category>
		<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[SQL2005 Custom Paging]]></category>

		<guid isPermaLink="false">http://nissankg.wordpress.com/?p=23</guid>
		<description><![CDATA[Read above Topic
http://www.codeproject.com/KB/aspnet/paginguc.aspx
Creating the Stored Procedure in SOL 2005
as like this
create procedure [dbo].[Usp_UISHKFindDistrict]
@startRowIndex int=0,
@pageSize int=0
As
BEGIN
declare    @RecordCount int
set @RecordCount=0
SET NOCOUNT ON;
SET @startRowIndex = @startRowIndex + 1
set @RecordCount=0
Select @RecordCount=count(*)  from
tHKDistrict A,
tHKLocality B
Select
tDistrictCode,
tDistrictName_Eng,
tDistrictName_Arb,
tLocalityId,
LocalityName_Eng,
IsActive,
tRecordCount
From
(Select
A.tDistrictCode,
A.tDistrictName_Eng,
A.tDistrictName_Arb,
A.tLocalityId,
B.LocalityName_Eng,
A.IsActive,
ROW_NUMBER() OVER(ORDER BY A.tDistrictCode) as RowNum,  @RecordCount  as tRecordCount
from
tHKDistrict A,
tHKLocality B
) as temp WHERE RowNum BETWEEN @startRowIndex  AND (@startRowIndex [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=23&subd=nissankg&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Read above Topic</p>
<p>http://www.codeproject.com/KB/aspnet/paginguc.aspx</p>
<p><span style="text-decoration:underline;"><strong>Creating the Stored Procedure in SOL 2005</strong></span></p>
<p>as like this<br />
create procedure [dbo].[Usp_UISHKFindDistrict]</p>
<p>@startRowIndex int=0,<br />
@pageSize int=0<br />
As<br />
BEGIN<br />
declare    @RecordCount int<br />
set @RecordCount=0<br />
SET NOCOUNT ON;</p>
<p>SET @startRowIndex = @startRowIndex + 1<br />
set @RecordCount=0</p>
<p>Select @RecordCount=count(*)  from<br />
tHKDistrict A,<br />
tHKLocality B</p>
<p>Select<br />
tDistrictCode,<br />
tDistrictName_Eng,<br />
tDistrictName_Arb,<br />
tLocalityId,<br />
LocalityName_Eng,<br />
IsActive,<br />
tRecordCount<br />
From</p>
<p>(Select<br />
A.tDistrictCode,<br />
A.tDistrictName_Eng,<br />
A.tDistrictName_Arb,<br />
A.tLocalityId,<br />
B.LocalityName_Eng,<br />
A.IsActive,<br />
ROW_NUMBER() OVER(ORDER BY A.tDistrictCode) as RowNum,  @RecordCount  as tRecordCount<br />
from<br />
tHKDistrict A,<br />
tHKLocality B<br />
) as temp WHERE RowNum BETWEEN @startRowIndex  AND (@startRowIndex + @pageSize &#8211; 1)</p>
<p>END</p>
<p><a href="http://nissankg.files.wordpress.com/2008/11/pagingdatagrid3.jpg"><img class="aligncenter size-full wp-image-34" title="pagingdatagrid3" src="http://nissankg.files.wordpress.com/2008/11/pagingdatagrid3.jpg?w=450&#038;h=193" alt="pagingdatagrid3" width="450" height="193" /></a></p>
<p><a href="http://cid-e94a174117926778.skydrive.live.com/self.aspx/Public/DataNavigatorTest1.rar">For Demo Code (source Code Download)</a></p>
<p>Any Queries Plz Contact Me : nissankg@yahoo.com</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nissankg.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nissankg.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nissankg.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nissankg.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nissankg.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nissankg.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nissankg.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nissankg.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nissankg.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nissankg.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=23&subd=nissankg&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nissankg.wordpress.com/2008/11/17/custom-paging-user-control-in-aspnet-20-with-sql-server-2005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff96a7329e3176794447fadaaa3eb205?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nissankg</media:title>
		</media:content>

		<media:content url="http://nissankg.files.wordpress.com/2008/11/pagingdatagrid3.jpg" medium="image">
			<media:title type="html">pagingdatagrid3</media:title>
		</media:content>
	</item>
		<item>
		<title>Using XML To Send Multiple Rows At Once Into A Stored Procedure</title>
		<link>http://nissankg.wordpress.com/2008/07/16/using-xml-to-send-multiple-rows-at-once-into-a-stored-procedure/</link>
		<comments>http://nissankg.wordpress.com/2008/07/16/using-xml-to-send-multiple-rows-at-once-into-a-stored-procedure/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 13:38:28 +0000</pubDate>
		<dc:creator>nissankg</dc:creator>
				<category><![CDATA[ASP.net & SQL]]></category>
		<category><![CDATA[Insert]]></category>
		<category><![CDATA[Multiple Rows]]></category>
		<category><![CDATA[Stored Procedure]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://nissankg.wordpress.com/?p=21</guid>
		<description><![CDATA[Please Go and Find out Stuff
http://weblogs.sqlteam.com/travisl/archive/2005/01/04/3931.aspx
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=21&subd=nissankg&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Please Go and Find out Stuff</p>
<p>http://weblogs.sqlteam.com/travisl/archive/2005/01/04/3931.aspx</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nissankg.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nissankg.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nissankg.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nissankg.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nissankg.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nissankg.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nissankg.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nissankg.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nissankg.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nissankg.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nissankg.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nissankg.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=21&subd=nissankg&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nissankg.wordpress.com/2008/07/16/using-xml-to-send-multiple-rows-at-once-into-a-stored-procedure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff96a7329e3176794447fadaaa3eb205?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nissankg</media:title>
		</media:content>
	</item>
		<item>
		<title>Report Viewer Control</title>
		<link>http://nissankg.wordpress.com/2008/03/18/report-viewer-control/</link>
		<comments>http://nissankg.wordpress.com/2008/03/18/report-viewer-control/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 11:33:13 +0000</pubDate>
		<dc:creator>nissankg</dc:creator>
				<category><![CDATA[Reports]]></category>
		<category><![CDATA[Reports View]]></category>

		<guid isPermaLink="false">http://nissankg.wordpress.com/?p=19</guid>
		<description><![CDATA[Steps for creating Web Control Library
from VS IDE Select FIle&#62;New&#62;Project&#62;WebControlLibrary
As in following Image :



Try this code for creating Report Viewer Control to cs file:
//Author:Nissan .K. George
//Web Developer
//nissankg@yahoo.com
using System;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Data;
using Microsoft.Reporting.WebForms;
namespace DBReportViewer
{
[DefaultProperty("DataTable"), ToolboxData("&#60;{0}:DBReportViewer       runat=server&#62;&#60;/{0}:DBReportViewer&#62;")]
public partial class DBReportViewer : Microsoft.Reporting.WebForms.ReportViewer
{
[Bindable(true)]
[Category("Appearance")]
[DefaultValue("")]
[Localizable(true)]
#region &#8220;Properties&#8221;
private string objectTypeName;
[Bindable(true),
DefaultValue("")]
public string ObjectTypeName
{
get { return [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=19&subd=nissankg&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><u><b>Steps for creating Web Control Library</b></u></p>
<p><u><b></b></u>from VS IDE Select FIle&gt;New&gt;Project&gt;<u><b>WebControlLibrary</b></u></p>
<p>As in following Image :</p>
<p><a href="http://nissankg.files.wordpress.com/2008/03/webcontrollib.png" title="Web Control Lib"><img src="http://nissankg.files.wordpress.com/2008/03/webcontrollib.thumbnail.png" alt="Web Control Lib" /></a></p>
<p><a href="http://nissankg.files.wordpress.com/2008/03/webcontrollib.png" title="Web Control Library"><br />
</a></p>
<p>Try this code for creating Report Viewer Control to cs file:</p>
<p>//Author:Nissan .K. George<br />
//Web Developer<br />
//nissankg@yahoo.com</p>
<p>using System;<br />
using System.ComponentModel;<br />
using System.Text;<br />
using System.Web;<br />
using System.Web.UI;<br />
using System.Data;<br />
using Microsoft.Reporting.WebForms;<br />
namespace DBReportViewer<br />
{<br />
[DefaultProperty("DataTable"), ToolboxData("&lt;{0}:DBReportViewer       runat=server&gt;&lt;/{0}:DBReportViewer&gt;")]</p>
<p>public partial class DBReportViewer : Microsoft.Reporting.WebForms.ReportViewer<br />
{<br />
[Bindable(true)]<br />
[Category("Appearance")]<br />
[DefaultValue("")]<br />
[Localizable(true)]</p>
<p>#region &#8220;Properties&#8221;</p>
<p>private string objectTypeName;<br />
[Bindable(true),<br />
DefaultValue("")]</p>
<p>public string ObjectTypeName<br />
{<br />
get { return objectTypeName; }<br />
set { objectTypeName = value; }<br />
}</p>
<p>private DataTable DatatableSource;<br />
public DataTable DataTableSource<br />
{<br />
get<br />
{<br />
return DatatableSource;<br />
}</p>
<p>set<br />
{<br />
DatatableSource = value;<br />
}<br />
}<br />
private Object objectSource;<br />
public Object ObjectSource<br />
{<br />
get<br />
{<br />
return objectSource;<br />
}</p>
<p>set<br />
{<br />
objectSource = value;<br />
}<br />
}</p>
<p>private string XmlDataSetName;</p>
<p>public string XMLDataSetName<br />
{<br />
get<br />
{<br />
return XmlDataSetName;<br />
}</p>
<p>set<br />
{<br />
XmlDataSetName = value;<br />
}<br />
}<br />
private string reportpath;</p>
<p>public string ReportPath<br />
{<br />
get<br />
{<br />
return reportpath;<br />
}</p>
<p>set<br />
{<br />
reportpath = value;<br />
base.LocalReport.ReportPath = value;</p>
<p>}<br />
}</p>
<p>#endregion</p>
<p>#region Members overrides<br />
//protected override void RenderContents(HtmlTextWriter output)<br />
//{</p>
<p>//    output.Write(Text);<br />
//}</p>
<p>// METHOD:: OnLoad<br />
protected override void OnLoad(EventArgs e)<br />
{<br />
base.OnLoad(e);</p>
<p>Type t = this.GetType();</p>
<p>}</p>
<p>// METHOD:: OnPreRender<br />
protected override void OnPreRender(EventArgs e)<br />
{<br />
// Do as usual<br />
base.OnPreRender(e);</p>
<p>}<br />
public override void DataBind()<br />
{</p>
<p>try<br />
{<br />
if ((XMLDataSetName == null) &amp;&amp; (DatatableSource == null) &amp;&amp; (objectSource == null))<br />
{</p>
<p>base.LocalReport.DataSources.Add(new ReportDataSource());</p>
<p>}<br />
else if ((XMLDataSetName == null) &amp;&amp; (DatatableSource != null))<br />
{</p>
<p>base.LocalReport.DataSources.Add(new ReportDataSource(&#8220;DB&#8221;, DatatableSource));</p>
<p>}<br />
else if ((XMLDataSetName != null) &amp;&amp; (DatatableSource != null))<br />
{</p>
<p>base.LocalReport.DataSources.Add(new ReportDataSource(XMLDataSetName, DatatableSource));<br />
}<br />
else if ((ObjectSource != null) &amp;&amp; (ObjectTypeName != null))<br />
{</p>
<p>base.LocalReport.DataSources.Add(new ReportDataSource(ObjectTypeName, ObjectSource));<br />
}</p>
<p>base.DataBind();</p>
<p>base.LocalReport.Refresh();<br />
}<br />
catch (Exception ex)<br />
{<br />
throw ex;<br />
}<br />
}</p>
<p>#endregion</p>
<p>}<br />
}<br />
after creating control add dll to toolkit then drag into page for use</p>
<p>use following code :</p>
<p>private void loadReports()<br />
{<br />
int allReopts = 1;<br />
DateTime startDate = new DateTime();<br />
DateTime endDate = new DateTime();</p>
<p>MarketingReportView.LocalReport.ReportEmbeddedResource = &#8220;DB.Portal.Maintenance.MarketingReports.ReportTemplates.ActiveTrialReport.rdl&#8221;;</p>
<p>startDate = DateTime.Now.Date;<br />
endDate = DateTime.Now.Date;<br />
MarketingReportView.LocalReport.DataSources.Clear();</p>
<p>Sherston.Portal.BusinessData.Common.DataList&lt;School&gt; obj = SchoolService.GetSchoolsSubscriptionReports(SchoolService.ReportType.ActiveTrialUsersReport, startDate, endDate, allReopts, 0, 0);<br />
MarketingReportView.ObjectSource = obj;</p>
<p>MarketingReportView.ObjectTypeName = &#8220;PortalDataSource&#8221;;<br />
MarketingReportView.DataBind();</p>
<p>}</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nissankg.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nissankg.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nissankg.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nissankg.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nissankg.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nissankg.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nissankg.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nissankg.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nissankg.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nissankg.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nissankg.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nissankg.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=19&subd=nissankg&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nissankg.wordpress.com/2008/03/18/report-viewer-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff96a7329e3176794447fadaaa3eb205?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nissankg</media:title>
		</media:content>

		<media:content url="http://nissankg.files.wordpress.com/2008/03/webcontrollib.thumbnail.png" medium="image">
			<media:title type="html">Web Control Lib</media:title>
		</media:content>
	</item>
		<item>
		<title>Row Clickable GridView</title>
		<link>http://nissankg.wordpress.com/2008/03/18/row-clickable-gridview/</link>
		<comments>http://nissankg.wordpress.com/2008/03/18/row-clickable-gridview/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 09:10:27 +0000</pubDate>
		<dc:creator>nissankg</dc:creator>
				<category><![CDATA[Web Control]]></category>
		<category><![CDATA[Row Clickable]]></category>
		<category><![CDATA[Row Clickable GridView]]></category>
		<category><![CDATA[Web Controls]]></category>

		<guid isPermaLink="false">http://nissankg.wordpress.com/?p=12</guid>
		<description><![CDATA[ Steps for creating Web Control Library
from VS IDE Select FIle&#62;New&#62; Project &#62;WebControlLibrary
As in following Image :



Try this code for creating Row Clickable GridView control to cs file:
//Author:Nissan .K. George
//Web Developer
//nissankg@yahoo.com
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
namespace RowClickableGridView
{
[ToolboxData("&#60;{0}:DBGridView runat=server&#62;&#60;/{0}:DBGridView&#62;")]
public partial class DBGridView : System.Web.UI.WebControls.GridView
{
#region &#8220;Properties&#8221;
[Bindable(true)]
[Category("Appearance")]
[DefaultValue("")]
[Localizable(true)]
public Color RowHoverColor
{
get
{
// look for hover color [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=12&subd=nissankg&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><u><b> Steps for creating Web Control Library</b></u></p>
<p>from VS IDE Select FIle&gt;New&gt; Project &gt;<u><b>WebControlLibrary</b></u></p>
<p>As in following Image :</p>
<p><a href="http://nissankg.files.wordpress.com/2008/03/webcontrollib.png" title="Web Control Lib"><img src="http://nissankg.files.wordpress.com/2008/03/webcontrollib.thumbnail.png" alt="Web Control Lib" /></a></p>
<p><a href="http://nissankg.files.wordpress.com/2008/03/webcontrollib.png" title="Web Control Library"><br />
</a></p>
<p>Try this code for creating Row Clickable GridView control to cs file:</p>
<p>//Author:Nissan .K. George<br />
//Web Developer<br />
//nissankg@yahoo.com<br />
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Text;<br />
using System.Web;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Data;<br />
using System.Data.SqlClient;<br />
using System.Drawing;<br />
namespace RowClickableGridView<br />
{</p>
<p>[ToolboxData("&lt;{0}:DBGridView runat=server&gt;&lt;/{0}:DBGridView&gt;")]<br />
public partial class DBGridView : System.Web.UI.WebControls.GridView<br />
{<br />
#region &#8220;Properties&#8221;</p>
<p>[Bindable(true)]<br />
[Category("Appearance")]<br />
[DefaultValue("")]<br />
[Localizable(true)]<br />
public Color RowHoverColor<br />
{<br />
get<br />
{<br />
// look for hover color in ViewState<br />
object o = ViewState["RowHoverColor"];<br />
if (o == null)<br />
return Color.Empty;<br />
else<br />
return (Color)o;<br />
}</p>
<p>set<br />
{<br />
ViewState["RowHoverColor"] = value;<br />
}<br />
}</p>
<p>#endregion</p>
<p>#region Members overrides</p>
<p>public DBGridView() : base() { }</p>
<p>protected override void PrepareControlHierarchy()<br />
{<br />
base.PrepareControlHierarchy();</p>
<p>// Add a click handler to each row<br />
for (int i = 0; i &lt; this.Rows.Count; i++)<br />
{<br />
string argument = &#8220;rowClicked:&#8221; + i;<br />
this.Rows[i].Attributes.Add(&#8220;onclick&#8221;, Page.ClientScript.GetPostBackEventReference(this, argument));</p>
<p>if (!(this.RowHoverColor.IsEmpty))<br />
{</p>
<p>Rows[i].Attributes.Add(&#8220;onmouseover&#8221;,<br />
(&#8220;this.style.backgroundColor=&#8217;&#8221; + String.Format(&#8220;#{0:x2}{1:x2}{2:x2}&#8221;, this.RowHoverColor.R, this.RowHoverColor.G, this.RowHoverColor.B) + &#8220;&#8216;;&#8221;));<br />
if (!(this.BackColor.IsEmpty))<br />
{<br />
Rows[i].Attributes.Add(&#8220;onmouseout&#8221;,<br />
(&#8220;this.style.backgroundColor=&#8217;&#8221; + String.Format(&#8220;#{0:x2}{1:x2}{2:x2}&#8221;, this.BackColor.R, this.BackColor.G, this.BackColor.B) + &#8220;&#8216;;&#8221;));<br />
}<br />
else { Rows[i].Attributes.Add(&#8220;onmouseout&#8221;, &#8220;this.style.backgroundColor=\&#8217;\';&#8221;); }<br />
}<br />
}<br />
if (this.SelectedIndex != -1)<br />
{<br />
string argument = &#8220;Edited:&#8221; + SelectedIndex.ToString();<br />
Rows[this.SelectedIndex].Attributes.Remove(&#8220;onmouseover&#8221;);<br />
Rows[this.SelectedIndex].Attributes.Remove(&#8220;onmouseout&#8221;);<br />
this.Rows[this.SelectedIndex].Attributes.Remove(&#8220;onclick&#8221;);<br />
this.Rows[this.SelectedIndex].Attributes.Add(&#8220;onblur&#8221;, Page.ClientScript.GetPostBackEventReference(this, argument));</p>
<p>}<br />
}</p>
<p>protected override void RaisePostBackEvent(string eventArgument)<br />
{<br />
// Only override &#8220;rowClicked&#8221; post-backs<br />
if (eventArgument.StartsWith(&#8220;rowClicked:&#8221;))<br />
{<br />
eventArgument = eventArgument.Remove(0, 11);<br />
int row = int.Parse(eventArgument);<br />
this.SelectedIndex = row;<br />
this.OnSelectedIndexChanged(new EventArgs());</p>
<p>this.EditIndex = row;</p>
<p>}</p>
<p>else<br />
{<br />
base.RaisePostBackEvent(eventArgument);<br />
}<br />
}</p>
<p>protected override void OnSelectedIndexChanged(EventArgs e)<br />
{<br />
this.Rows[this.SelectedIndex].Attributes.Remove(&#8220;rowClicked&#8221;);<br />
int row=-1;<br />
row  = this.SelectedIndex ;</p>
<p>}</p>
<p>protected override void OnInit(EventArgs e)<br />
{<br />
base.OnInit (e);</p>
<p>}<br />
#endregion</p>
<p>}<br />
}</p>
<p>after creating control add dll to toolkit then drag into page use following code  :</p>
<p>&lt;%@ Page Language=&#8221;C#&#8221; AutoEventWireup=&#8221;true&#8221;  CodeFile=&#8221;Default.aspx.cs&#8221; Inherits=&#8221;_Default&#8221; %&gt;</p>
<p>&lt;%@ Register Assembly=&#8221;RowClickableGridView&#8221; Namespace=&#8221;RowClickableGridView&#8221; TagPrefix=&#8221;cc2&#8243; %&gt;</p>
<p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;</p>
<p>&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221; &gt;<br />
&lt;head runat=&#8221;server&#8221;&gt;<br />
&lt;title&gt;Untitled Page&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;form id=&#8221;form1&#8243; runat=&#8221;server&#8221;&gt;</p>
<p>&lt;asp:SqlDataSource ID=&#8221;SqlDataSource1&#8243; runat=&#8221;server&#8221; ConnectionString=&#8221;&lt;%$ ConnectionStrings:GboxConnectionString %&gt;&#8221;<br />
SelectCommand=&#8221;SELECT [AssetTypeId], [AssetTypeName] FROM [AssetTypes]&#8221; UpdateCommand=&#8221;UPDATE AssetTypes SET AssetTypeName = @AssetTypeName where AssetTypeid=@AssetTypeId&#8221;&gt;<br />
&lt;UpdateParameters&gt;<br />
&lt;asp:ControlParameter ControlID=&#8221;DBGridView1&#8243; Name=&#8221;AssetTypeName&#8221; PropertyName=&#8221;SelectedValue&#8221; /&gt;<br />
&lt;asp:ControlParameter ControlID=&#8221;DBGridView1&#8243; Name=&#8221;AssetTypeId&#8221; PropertyName=&#8221;SelectedValue&#8221; /&gt;<br />
&lt;/UpdateParameters&gt;<br />
&lt;/asp:SqlDataSource&gt;</p>
<p>&lt;cc2:DBGridView ID=&#8221;DBGridView1&#8243; runat=&#8221;server&#8221; AutoGenerateColumns=&#8221;False&#8221; DataKeyNames=&#8221;AssetTypeId&#8221;<br />
DataSourceID=&#8221;SqlDataSource1&#8243; AutoGenerateDeleteButton=&#8221;True&#8221; AutoGenerateEditButton=&#8221;True&#8221; RowHoverColor=&#8221;255, 192, 192&#8243;&gt;<br />
&lt;Columns&gt;<br />
&lt;asp:BoundField DataField=&#8221;AssetTypeId&#8221; HeaderText=&#8221;AssetTypeId&#8221; InsertVisible=&#8221;False&#8221;<br />
ReadOnly=&#8221;True&#8221; SortExpression=&#8221;AssetTypeId&#8221; /&gt;<br />
&lt;asp:BoundField DataField=&#8221;AssetTypeName&#8221; HeaderText=&#8221;AssetTypeName&#8221; SortExpression=&#8221;AssetTypeName&#8221; /&gt;<br />
&lt;/Columns&gt;<br />
&lt;EditRowStyle BackColor=&#8221;Red&#8221; /&gt;<br />
&lt;/cc2:DBGridView&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
then run it and test it</p>
<p><a href="http://nissankg.files.wordpress.com/2008/03/rowclickablegridview.png" title="Row Clickable Grid"><img src="http://nissankg.files.wordpress.com/2008/03/rowclickablegridview.png" alt="Row Clickable Grid" /></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nissankg.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nissankg.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nissankg.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nissankg.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nissankg.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nissankg.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nissankg.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nissankg.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nissankg.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nissankg.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nissankg.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nissankg.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=12&subd=nissankg&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nissankg.wordpress.com/2008/03/18/row-clickable-gridview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff96a7329e3176794447fadaaa3eb205?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nissankg</media:title>
		</media:content>

		<media:content url="http://nissankg.files.wordpress.com/2008/03/webcontrollib.thumbnail.png" medium="image">
			<media:title type="html">Web Control Lib</media:title>
		</media:content>

		<media:content url="http://nissankg.files.wordpress.com/2008/03/rowclickablegridview.png" medium="image">
			<media:title type="html">Row Clickable Grid</media:title>
		</media:content>
	</item>
		<item>
		<title>Configuring Database Mail</title>
		<link>http://nissankg.wordpress.com/2008/03/13/configuring-database-mail/</link>
		<comments>http://nissankg.wordpress.com/2008/03/13/configuring-database-mail/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 06:28:07 +0000</pubDate>
		<dc:creator>nissankg</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://nissankg.wordpress.com/2008/03/13/configuring-database-mail/</guid>
		<description><![CDATA[Configuring Database Mail
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=11&subd=nissankg&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://nissankg.wordpress.com/2008/03/13/configuring-database-mail/configuring-database-mail/" rel="attachment wp-att-10" title="Configuring Database Mail"></a><a href="http://nissankg.wordpress.com/2008/03/13/configuring-database-mail/configuring-database-mail/" rel="attachment wp-att-10" title="Configuring Database Mail">Configuring Database Mail</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nissankg.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nissankg.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nissankg.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nissankg.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nissankg.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nissankg.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nissankg.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nissankg.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nissankg.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nissankg.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nissankg.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nissankg.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=11&subd=nissankg&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nissankg.wordpress.com/2008/03/13/configuring-database-mail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff96a7329e3176794447fadaaa3eb205?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nissankg</media:title>
		</media:content>
	</item>
		<item>
		<title>Export Reports into Diffrent File Formate using Crystal Reports Service</title>
		<link>http://nissankg.wordpress.com/2008/03/12/export-reports-into-diffrent-file-formate-using-crystal-reports-service/</link>
		<comments>http://nissankg.wordpress.com/2008/03/12/export-reports-into-diffrent-file-formate-using-crystal-reports-service/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 15:41:44 +0000</pubDate>
		<dc:creator>nissankg</dc:creator>
				<category><![CDATA[Reports]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[CrystalReports]]></category>
		<category><![CDATA[Diffrent File Formate]]></category>
		<category><![CDATA[Export Reports into Diffrent File Formate]]></category>

		<guid isPermaLink="false">http://nissankg.wordpress.com/?p=6</guid>
		<description><![CDATA[In this article I am going to explain , how to convert crystal reports to different  file  format  using crystal reports service  , The export file format that  supported by our Crystal Reports as follows :
1) PDF
2) MS Word
3) MS Excel
4) HTML
5) RTF
please do the following steps :
Creating a class [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=6&subd=nissankg&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In this article I am going to explain , how to convert crystal reports to different  file  format  using crystal reports service  , The export file format that  supported by our Crystal Reports as follows :</p>
<p>1) PDF</p>
<p>2) MS Word</p>
<p>3) MS Excel</p>
<p>4) HTML</p>
<p>5) RTF</p>
<p>please do the following steps :</p>
<p>Creating a class file ExportReports.cs</p>
<p><a title="Export" href="http://nissankg.files.wordpress.com/2008/03/export.png"><img src="http://nissankg.files.wordpress.com/2008/03/export.png" alt="Export" /></a></p>
<p>Please place the following code in that file</p>
<p>public ExportReports()<br />
{<br />
//<br />
// TODO: Add constructor logic here<br />
//<br />
}</p>
<p>public enum ReportFormats : int<br />
{<br />
None = 0,<br />
PDF = 1,<br />
MS_Word = 2,<br />
MS_Excel = 3,<br />
HTML = 4,<br />
RTF  = 5</p>
<p>}</p>
<p>public byte[] ExportReportsTo(DataList&lt;T&gt; dt, string fileName,</p>
<p>ReportFormats format)<br />
{</p>
<p>CrystalDecisions.CrystalReports.Engine.ReportDocument doc = new CrystalDecisions.CrystalReports.Engine.ReportDocument();<br />
//DataSet ds = (DataSet)context.Cache.Get(&#8220;ExportData&#8221;);<br />
doc.Load(fileName);<br />
doc.SetDataSource(dt);<br />
CrystalDecisions.Shared.ExportOptions exportOpts = doc.ExportOptions;<br />
if (format == ReportFormats.PDF)<br />
{<br />
exportOpts.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;<br />
}<br />
else if (format == ReportFormats.MS_Word)<br />
{<br />
exportOpts.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.WordForWindows;</p>
<p>}<br />
else if (format == ReportFormats.MS_Excel)<br />
{<br />
exportOpts.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.Excel;</p>
<p>}<br />
else if (format == ReportFormats.HTML)<br />
{<br />
exportOpts.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.HTML40;</p>
<p>}<br />
else if (format == ReportFormats.RTF)<br />
{<br />
exportOpts.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.RichText;</p>
<p>}<br />
exportOpts.ExportDestinationType = CrystalDecisions.Shared.</p>
<p>ExportDestinationType.NoDestination;<br />
exportOpts.DestinationOptions = new CrystalDecisions.Shared.</p>
<p>DiskFileDestinationOptions();</p>
<p>//  Response.Write(doc.ExportToStream(exportOpts.ExportFormatType));<br />
byte[] _stream = new byte[1024];<br />
MemoryStream _ms = new MemoryStream();</p>
<p>_ms = (MemoryStream)doc.ExportToStream(exportOpts.ExportFormatType);<br />
return _ms.ToArray();<br />
}</p>
<p>}</p>
<p>the parameter dt support  following format :</p>
<p>1)Data set</p>
<p>2) Data Table</p>
<p>3)Data Reader</p>
<p>4) <span>System.Collection.IEnumerable  (in this  example  we used)<br />
</span></p>
<p>you can change the parameter according to your wish</p>
<p>After creating class file we can you this service  in your web page (aspx)</p>
<p>before you should create  rpt file (eg: NewSubscriptionReports.rpt)</p>
<p><a title="Create Report" href="http://nissankg.files.wordpress.com/2008/03/rpt.png"><img src="http://nissankg.files.wordpress.com/2008/03/rpt.png" alt="Create Report" /></a></p>
<p>Use IDE to design crystal Report Templates :</p>
<p><a title="IDE" href="http://nissankg.files.wordpress.com/2008/03/idereport.png"><img src="http://nissankg.files.wordpress.com/2008/03/idereport.png" alt="IDE" /></a></p>
<p>Save  this rpt file to a web folder then use the following code in the page</p>
<p>protected void btnExport_Click(object sender, EventArgs e)<br />
{</p>
<p>yournamespace.ExportReports.ReportFormats format;<br />
format = ExportReports.ReportFormats.None;<br />
string strExt = &#8220;&#8221;;<br />
if (ddlFormat.SelectedValue.Equals(&#8220;1&#8243;))<br />
{<br />
format = ExportReports.ReportFormats.PDF;<br />
strExt = &#8220;Pdf&#8221;;<br />
}<br />
else if (ddlFormat.SelectedValue.Equals(&#8220;2&#8243;))<br />
{<br />
format = ExportReports.ReportFormats.MS_Word;<br />
strExt = &#8220;Doc&#8221;;<br />
}<br />
else if (ddlFormat.SelectedValue.Equals(&#8220;3&#8243;))<br />
{<br />
strExt = &#8220;xls&#8221;;<br />
format = ExportReports.ReportFormats.MS_Excel;</p>
<p>}<br />
else if (ddlFormat.SelectedValue.Equals(&#8220;4&#8243;))<br />
{<br />
format = ExportReports.ReportFormats.HTML;<br />
strExt = &#8220;HTML&#8221;;<br />
}<br />
else if (ddlFormat.SelectedValue.Equals(&#8220;5&#8243;))<br />
{<br />
strExt = &#8220;RTF&#8221;;<br />
format = ExportReports.ReportFormats.RTF;<br />
}</p>
<p>ExportReports exportReports = new ExportReports();<br />
// System.IO.MemoryStream _ms = new System.IO.MemoryStream();<br />
HttpContext.Current.Response.Clear();<br />
HttpContext.Current.Response.ClearContent();<br />
HttpContext.Current.Response.ClearHeaders();<br />
HttpContext.Current.Response.ContentType = &#8220;application/&#8221; + strExt;<br />
HttpContext.Current.Response.AddHeader(&#8220;Content-Disposition&#8221;, &#8220;inline; filename=NewSubscriptionReports.&#8221; + strExt);</p>
<p>HttpContext.Current.Response.BinaryWrite(exportReports.ExportReportsTo</p>
<p>(SchoolService.GetSchoolsSubscriptionReports</p>
<p>(SchoolService.ReportType.NewSubscriptionReport, startDate, endDate, allReopts, 0, 0), Server.MapPath(&#8220;~/Maintenance/SubscriptionReports</p>
<p>/ReportTemplates/NewSubscriptionReports.rpt&#8221;), format));<br />
HttpContext.Current.Response.End();</p>
<p>}</p>
<p>please specify the .rpt file path in calling function:</p>
<p>Server.MapPath(&#8220;~/Maintenance/SubscriptionReports/ReportTemplates/NewSubscriptionReports.rpt&#8221;),</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nissankg.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nissankg.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nissankg.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nissankg.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nissankg.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nissankg.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nissankg.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nissankg.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nissankg.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nissankg.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nissankg.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nissankg.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=6&subd=nissankg&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nissankg.wordpress.com/2008/03/12/export-reports-into-diffrent-file-formate-using-crystal-reports-service/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff96a7329e3176794447fadaaa3eb205?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nissankg</media:title>
		</media:content>

		<media:content url="http://nissankg.files.wordpress.com/2008/03/export.png" medium="image">
			<media:title type="html">Export</media:title>
		</media:content>

		<media:content url="http://nissankg.files.wordpress.com/2008/03/rpt.png" medium="image">
			<media:title type="html">Create Report</media:title>
		</media:content>

		<media:content url="http://nissankg.files.wordpress.com/2008/03/idereport.png" medium="image">
			<media:title type="html">IDE</media:title>
		</media:content>
	</item>
		<item>
		<title>Photo Resize Handler in ASP.net</title>
		<link>http://nissankg.wordpress.com/2008/03/12/photo-resize-handler-in-aspnet/</link>
		<comments>http://nissankg.wordpress.com/2008/03/12/photo-resize-handler-in-aspnet/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 11:26:12 +0000</pubDate>
		<dc:creator>nissankg</dc:creator>
				<category><![CDATA[Modules and Handlers]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[HTTP Modules and Handlers]]></category>
		<category><![CDATA[Photo Resize]]></category>

		<guid isPermaLink="false">http://nissankg.wordpress.com/?p=3</guid>
		<description><![CDATA[Introduction to ASP.NET HTTP Modules and Handlers
All requests to IIS are handled through Internet Server Application Programming Interface (ISAPI) extensions. ASP.NET has its own filter to ensure pages are processed appropriately. By default, the ASP.NET ISAPI filter (aspnet_isapi.dll) only handles ASPX, ASMX, and all other non-display file formats used by .NET and Visual Studio. However, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=3&subd=nissankg&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>Introduction to ASP.NET HTTP Modules and Handlers</strong></p>
<p>All requests to IIS are handled through Internet Server Application Programming Interface (ISAPI) extensions. ASP.NET has its own filter to ensure pages are processed appropriately. By default, the ASP.NET ISAPI filter (aspnet_isapi.dll) only handles ASPX, ASMX, and all other non-display file formats used by .NET and Visual Studio. However, this filter can be registered with other extensions in order to handle requests to those file types, too, but that will be covered later.</p>
<p>Every request flows through a number of HTTP modules, which cover various areas of the application (i.e. authentication and session intofmation). After passing through each module, the request is assigned to a single HTTP handler, which determines how the system will respond to the request. Upon completion of the request handler, the response flows back through the HTTP modules to the user.</p>
<h3>The HTTP Pipeline</h3>
<p>To understand the role of HTTP modules within ASP.NET, you need to understand how the HTTP pipeline works. Once an HTTP request comes in over port 80 (the regular HTTP port or port 443 for HTTPS and the secure sockets layer), the request passes through a number of stages making up the HTTP pipeline before it&#8217;s actually fielded by your application.</p>
<p>Microsoft® Internet Information Services (IIS) is the first participant in the chain. IIS is still used to route the request to the ASP.NET runtime. IIS maps the ASP.NET file extensions to ASPNET_ISAPI.DLL, an ISAPI extension provided with ASP.NET. The job of ASPNET_ISAPI.DLL is to forward the request to the ASP.NET worker process, ASPNET_WP.EXE. From that point on, the request is wrapped up into an instance of HttpContext and piped through a number of ASP.NET classes. The HttpContext class includes members representing such things as the Response and the Request and also includes security information along with anything else you might want to know about the request.</p>
<p>The next step for the request is to pass through an instance of HttpApplication.After the HttpApplication object massages the request, it pushes the request through one or more HttpModule objects. There are a number of system-level HTTP modules.The final piece of the chain is the HttpHandler</p>
<p><strong>HTTP Module</strong></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">In order to insure that your HttpHandler is hooked up to the HTTP pipeline requires an entry in the application&#8217;s web config. or the machine.config file. The same holds true for HTTP modules. When an HTTP Module is added to the pipeline, the ASP.NET runtime will call the methods of the IHttpModule interface at the appropriate times. When the module is first created by the runtime, the Init method is called. As illustrated above, the parameter passed into the Init method allows your code to tie into the HttpApplication object.</span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">The following table lists the key events exposed by the HttpApplication object. Note that all these events are implemented as multicast delegates so that numerous modules can register for each one. </span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">Event<br />
When It&#8217;s Called </span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">BeginRequest<br />
Before request processing starts </span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">AuthenticateRequest<br />
To authenticate client </span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">AuthorizeRequest<br />
To perform access check </span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">ResolveRequestCache<br />
To get response from cache </span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">AcquireRequestState<br />
To load session state </span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">PreRequestHandlerExecute<br />
Before request sent to handler </span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">PostRequestHandlerExecute<br />
After request sent to handler </span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">ReleaseRequestState<br />
To store session state </span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">UpdateRequestCache<br />
To update response cache </span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">EndRequest<br />
After processing ends </span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">PreSendRequestHeaders<br />
Before buffered response headers sent </span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;">PreSendRequestContent<br />
Before buffered response body sent </span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;"><br />
<span style="font-family:Verdana,Arial,Helvetica,sans-serif;">In addition to the above methods, we can also respond to the methods in the global.asax file for the HttpApplication object. These events include the session start and end events, as well as the start and end events for the application. </span></span></span></p>
<p><strong>HTTP Handlers</strong></p>
<p><strong></strong><span class="clsBlurb"> HTTP handlers are the .NET components that implement the System.Web.IHttpHandler interface. Any class that implements the IHttpHandler interface can act as a target for the incoming HTTP requests. HTTP handlers are somewhat similar to ISAPI extensions. One difference between HTTP handlers and ISAPI extensions is that HTTP handlers can be called directly by using their file name in the URL, similar to ISAPI extensions.</span></p>
<p>HTTP modules are classes that have access to the incoming request.  These modules can inspect the incoming request and make decisions that affect the internal flow of the request.  After passing through the specified HTTP modules, the request reaches an HTTP handler, whose job it is to generate the output that will be sent back to the requesting browser. The following diagram illustrates the pipeline an ASP.NET request flows through.</p>
<p><strong>Photo Resize Handler </strong></p>
<p>In this article we&#8217;ll create a HTTP Handler in ASP.NET to resize an image as per parameters that user passes.</p>
<h5>Creating the Handler</h5>
<p>please go and find topic from that site <a href="http://www.dotnetic.com/dnet/?q=node/5" target="_blank">http://www.dotnetic.com/dnet/?q=node/5</a></p>
<p>please use following code to PhotoResizeHandler.ashx.cs ( Append)</p>
<p>define a method for resize image in same file  :</p>
<p>private static byte[] ResizeImageFile(byte[] imageFile, int height, int width)<br />
{<br />
using (Image oldImage = System.Drawing.Image.FromStream(new MemoryStream(imageFile)))<br />
{<br />
int newwidth = 0;<br />
int newheight = 0;<br />
float oldwidth = oldImage.Width;<br />
float oldheight = oldImage.Height;<br />
float imgratio = oldwidth / oldheight;<br />
if (imgratio &gt; 1)<br />
{<br />
newwidth = width;<br />
newheight = Convert.ToInt32 ( height / imgratio);<br />
}<br />
else<br />
{<br />
newheight = height;<br />
newwidth = Convert.ToInt32(width * imgratio);<br />
}<br />
Size newSize = new Size(newwidth, newheight);<br />
using (Bitmap newImage = new Bitmap(newSize.Width, newSize.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb))<br />
{<br />
using (Graphics canvas = Graphics.FromImage(newImage))<br />
{<br />
//canvas.SmoothingMode = SmoothingMode.AntiAlias;<br />
//canvas.InterpolationMode = InterpolationMode.HighQualityBicubic;<br />
//canvas.PixelOffsetMode = PixelOffsetMode.HighQuality;<br />
canvas.DrawImage(oldImage, new Rectangle(new Point(0, 0), newSize));<br />
MemoryStream m = new MemoryStream();<br />
newImage.Save(m, System.Drawing.Imaging.ImageFormat.Jpeg);<br />
return m.GetBuffer();<br />
}<br />
}<br />
}<br />
}</p>
<h5>Invoking Handler from aspx page</h5>
<p>You would invoke the handler from aspx page just like you call any other aspx page.<br />
Following Image control invokes the handler:</p>
<p>&lt;asp:Image ID=&#8221;Image1&#8243; ImageUrl=&#8221;~/PhotoResizeHandler.ashx?imageFile=images/Leaves.jpg&amp;height=200&amp;width=200&#8243;<br />
runat=&#8221;server&#8221; /&gt;</p>
<p>or like this :</p>
<p>ImageButton lnkPhotoThumb = ( (ImageButton)( e.Item.FindControl( &#8220;PhotoThumb&#8221; ) ) );</p>
<p>lnkPhotoThumb.ImageUrl = Page.ResolveUrl( &#8220;~/Handlers/PhotoResizeHandler.ashx?imageFile=&#8221; + Page.ResolveUrl( &#8220;~/UploadedFiles/Resources/&#8221;)Leaves.jpg + &#8220;&amp;height=120&amp;width=120&#8243; );</p>
<p>ref: http://www.dotnetic.com/dnet/?q=node/5</p>
<p>Also , a big thanks to Shelly (my colleague) who provide me the logic of maintaining the aspect ratio of images <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nissankg.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nissankg.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nissankg.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nissankg.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nissankg.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nissankg.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nissankg.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nissankg.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nissankg.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nissankg.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nissankg.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nissankg.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nissankg.wordpress.com&blog=3134784&post=3&subd=nissankg&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nissankg.wordpress.com/2008/03/12/photo-resize-handler-in-aspnet/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff96a7329e3176794447fadaaa3eb205?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nissankg</media:title>
		</media:content>
	</item>
	</channel>
</rss>