<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>*****## R.MARAN. ## *****</title>
	<atom:link href="http://rmanimaran.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://rmanimaran.wordpress.com</link>
	<description>Winners don't do different things.They do things Differently.</description>
	<lastBuildDate>Wed, 03 Jun 2009 11:14:01 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='rmanimaran.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/6d5bc6f624043886a772348d90b8bc88?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>*****## R.MARAN. ## *****</title>
		<link>http://rmanimaran.wordpress.com</link>
	</image>
			<item>
		<title>Delete all the Oracle tables data’s in the database</title>
		<link>http://rmanimaran.wordpress.com/2009/06/03/delete-all-the-oracle-tables-data%e2%80%99s-in-the-database/</link>
		<comments>http://rmanimaran.wordpress.com/2009/06/03/delete-all-the-oracle-tables-data%e2%80%99s-in-the-database/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 11:14:01 +0000</pubDate>
		<dc:creator>R Manimaran</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://rmanimaran.wordpress.com/?p=185</guid>
		<description><![CDATA[Procedure:
 
create or replace FUNCTION TRUNC_SCHEMA RETURN NUMBER AS
CURSOR SELECT_TABLE IS SELECT TABLE_NAME AS TNAME FROM USER_TABLES ORDER BY 1;
sTableName varchar2(128);
sUser VARCHAR2(128);
sConstraintName varchar2(128);
plsql_block VARCHAR2(128);
BEGIN
  SELECT USER INTO suser FROM Dual;
  IF((suser=&#8217;SYSTEM&#8217;) or (suser=&#8217;SYS&#8217;)) then
     RETURN 1;
  END IF;
 
&#8211;EXECUTE IMMEDIATE &#8216;PURGE RECYLCLEBIN&#8217;;
 
&#8211;Disalbe Table&#8217;s Constraints
FOR C1 IN (SELECT CONSTRAINT_NAME,TABLE_NAME FROM user_constraints where STATUS=
&#8216;ENABLED&#8217; AND constraint_type in (&#8216;P&#8217;,'R&#8217;) ORDER [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=185&subd=rmanimaran&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>Procedure:</strong></p>
<p><strong> </strong></p>
<p>create or replace FUNCTION TRUNC_SCHEMA RETURN NUMBER AS</p>
<p>CURSOR SELECT_TABLE IS SELECT TABLE_NAME AS TNAME FROM USER_TABLES ORDER BY 1;</p>
<p>sTableName varchar2(128);</p>
<p>sUser VARCHAR2(128);</p>
<p>sConstraintName varchar2(128);</p>
<p>plsql_block VARCHAR2(128);</p>
<p>BEGIN</p>
<p>  SELECT USER INTO suser FROM Dual;</p>
<p>  IF((suser=&#8217;SYSTEM&#8217;) or (suser=&#8217;SYS&#8217;)) then</p>
<p>     RETURN 1;</p>
<p>  END IF;</p>
<p> </p>
<p>&#8211;EXECUTE IMMEDIATE &#8216;PURGE RECYLCLEBIN&#8217;;</p>
<p> </p>
<p>&#8211;Disalbe Table&#8217;s Constraints</p>
<p>FOR C1 IN (SELECT CONSTRAINT_NAME,TABLE_NAME FROM user_constraints where STATUS=</p>
<p>&#8216;ENABLED&#8217; AND constraint_type in (&#8216;P&#8217;,'R&#8217;) ORDER BY R_CONSTRAINT_NAME)</p>
<p>LOOP</p>
<p>sConstraintName := C1.CONSTRAINT_NAME;</p>
<p>sTableName := C1.TABLE_NAME;</p>
<p>plsql_block :=&#8217;ALTER TABLE &#8216;|| sTableName ||&#8217;DISABLE CONSTRAINT&#8217;||sConstraintName;</p>
<p>EXECUTE IMMEDIATE plsql_block;</p>
<p>END LOOP;</p>
<p> </p>
<p>FOR D in SELECT_TABLE LOOP</p>
<p>&#8211;get the table name</p>
<p>sTableName:=D.TNAME;</p>
<p>&#8211;clear Table</p>
<p>plsql_block := &#8216;TRUNCATE TABLE &#8216;||sTableName;</p>
<p>EXECUTE IMMEDIATE plsql_block;</p>
<p>END LOOP;</p>
<p> </p>
<p>&#8211;Enable Table CONSTRAINTS</p>
<p>FOR C2 IN (SELECT CONSTRAINT_NAME,TABLE_NAME FROM user_constraints where STATUS=</p>
<p>&#8216;ENABLED&#8217; AND constraint_type in (&#8216;P&#8217;,'R&#8217;) ORDER BY R_CONSTRAINT_NAME)</p>
<p>LOOP</p>
<p>sConstraintName := C2.CONSTRAINT_NAME;</p>
<p>sTableName := C2.TABLE_NAME;</p>
<p>plsql_block :=&#8217;ALTER TABLE &#8216;|| sTableName ||&#8217;ENABLE CONSTRAINT &#8216;||sConstraintName;</p>
<p>EXECUTE IMMEDIATE plsql_block;</p>
<p>END LOOP;</p>
<p> </p>
<p>RETURN 0;</p>
<p>EXCEPTION WHEN OTHERS THEN</p>
<p>dbms_output.put_line(&#8216;ERROR:&#8217;||SQLERRM);</p>
<p>RETURN 1;</p>
<p>END TRUNC_SCHEMA;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rmanimaran.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rmanimaran.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rmanimaran.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rmanimaran.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rmanimaran.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rmanimaran.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rmanimaran.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rmanimaran.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rmanimaran.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rmanimaran.wordpress.com/185/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=185&subd=rmanimaran&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rmanimaran.wordpress.com/2009/06/03/delete-all-the-oracle-tables-data%e2%80%99s-in-the-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5fdd8f9f4db44940b9471da982804e2b?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">rmanimaran</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Order by based on the Field values</title>
		<link>http://rmanimaran.wordpress.com/2009/06/03/sql-order-by-based-on-the-field-values/</link>
		<comments>http://rmanimaran.wordpress.com/2009/06/03/sql-order-by-based-on-the-field-values/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 11:12:02 +0000</pubDate>
		<dc:creator>R Manimaran</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://rmanimaran.wordpress.com/?p=183</guid>
		<description><![CDATA[SQL Order by based on the Field values
 In the SQL query, we use Order By clause to order the data in the output. In the Order by we use the Fieldname with Ascending or descending option. But suppose we need to override the Order By to order the output based on the values a Field.
 
Normal [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=183&subd=rmanimaran&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong><span style="text-decoration:underline;">SQL Order by based on the Field values</span></strong></p>
<p> In the SQL query, we use Order By clause to order the data in the output. In the Order by we use the Fieldname with Ascending or descending option. But suppose we need to override the Order By to order the output based on the values a Field.</p>
<p> </p>
<p><strong>Normal Order By clause</strong></p>
<p><strong> <img class="alignnone size-full wp-image-179" title="NormalOrderBy" src="http://rmanimaran.files.wordpress.com/2009/06/normalorderby.png?w=500&#038;h=122" alt="NormalOrderBy" width="500" height="122" /></strong></p>
<p><strong>Normal Order By Output</strong></p>
<p><strong> <img class="alignnone size-full wp-image-180" title="Order By Output" src="http://rmanimaran.files.wordpress.com/2009/06/normalorderbyoutput.png?w=265&#038;h=155" alt="Order By Output" width="265" height="155" /></strong></p>
<p><strong>Order By using Case</strong></p>
<p><strong> <img class="alignnone size-full wp-image-182" title="OrderByQuery" src="http://rmanimaran.files.wordpress.com/2009/06/orderbyquery.png?w=500&#038;h=221" alt="OrderByQuery" width="500" height="221" /></strong></p>
<p><strong>Order By Output using Case</strong></p>
<p><strong> <img class="alignnone size-full wp-image-181" title="OrderByOutput" src="http://rmanimaran.files.wordpress.com/2009/06/orderbyoutput.png?w=267&#038;h=158" alt="OrderByOutput" width="267" height="158" /></strong></p>
<p><strong> </strong></p>
<p><strong><span style="color:#ff0000;">SP_MSFOREACHTABLE stored Procedure in SQL SERVER</span></strong></p>
<p><strong> </strong></p>
<p><strong>i.                    </strong><strong>Print all table names with owner</strong></p>
<p><strong> </strong></p>
<p><span style="color:#0000ff;">EXEC</span> <span style="color:#ff0000;">SP_MSFOREACHTABLE </span>@command1 =&#8221;PRINT &#8216;?&#8217;&#8221;<strong></strong></p>
<p><strong> </strong></p>
<p><strong>ii.                  </strong><strong>Drop all the tables </strong></p>
<p><strong> </strong></p>
<p><span style="color:#0000ff;">EXEC</span> <span style="color:#ff0000;">SP_MSFOREACHTABLE </span>@command1 =&#8221;DELETE FROM &#8216;?&#8217;&#8221;</p>
<p><strong> </strong></p>
<p><strong>iii.                </strong><strong>Delete all the tables</strong></p>
<p><strong> </strong></p>
<p><span style="color:#0000ff;">EXEC</span> <span style="color:#800000;">SP_MSFOREACHTABLE</span> @command1 =&#8221;DROP TABLE &#8216;?&#8217;&#8221;</p>
<p><strong> </strong></p>
<p><strong>iv.                </strong><strong>Delete all the data’s inside all the tables in a Database</strong></p>
<p>In a table, we may have some referential Constraint to tables. So when deleting values it will show the error message that it has reference to other table. In that situation it is difficult to search each and every reference.</p>
<p> </p>
<p>Here is the list of Query which will delete all the table data’s</p>
<p> </p>
<p><span style="color:#339966;">&#8211;List all the tables</span></p>
<p><span style="color:#3366ff;">EXEC</span> <span style="color:#800000;">SP_MSFOREACHTABLE</span> @command1=&#8221;PRINT &#8216;?&#8217;&#8221;</p>
<p> </p>
<p><span style="color:#339966;">&#8211;Disable all the Reference Integrity in all tables</span></p>
<p><span style="color:#3366ff;">EXEC </span><span style="color:#800000;">SP_MSFOREACHTABLE</span> <span style="color:#ff0000;">&#8216;ALTER TABLE ? NO CHECK CONSTRAINT ALL&#8217;</span></p>
<p>GO</p>
<p><span style="color:#339966;">&#8211;Delete the data&#8217;s</span></p>
<p><span style="color:#0000ff;">EXEC</span> <span style="color:#800000;">SP_MSFOREACHTABLE</span></p>
<p>     <span style="color:#0000ff;">IF </span><span style="color:#ff00ff;">OBJECTPROPERTY(object_id</span>(&#8220;?&#8221;),&#8221;TABLEHASFOREIGNREF&#8221;)=1</p>
<p>        <span style="color:#0000ff;"> DELETE FROM ?</span></p>
<p><span style="color:#0000ff;">    ELSE</span></p>
<p><span style="color:#0000ff;">         TRUNCATE TABLE ?</span></p>
<p>GO</p>
<p><span style="color:#339966;">&#8211;Now enable reference integrity</span></p>
<p><span style="color:#0000ff;">EXEC </span><span style="color:#800000;">SP_MSFOREACHTABLE</span> <span style="color:#ff0000;">&#8216;ALTER TABLE ? CHECK CONSTRAINT ALL&#8217;</span></p>
<p>GO</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rmanimaran.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rmanimaran.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rmanimaran.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rmanimaran.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rmanimaran.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rmanimaran.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rmanimaran.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rmanimaran.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rmanimaran.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rmanimaran.wordpress.com/183/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=183&subd=rmanimaran&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rmanimaran.wordpress.com/2009/06/03/sql-order-by-based-on-the-field-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5fdd8f9f4db44940b9471da982804e2b?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">rmanimaran</media:title>
		</media:content>

		<media:content url="http://rmanimaran.files.wordpress.com/2009/06/normalorderby.png" medium="image">
			<media:title type="html">NormalOrderBy</media:title>
		</media:content>

		<media:content url="http://rmanimaran.files.wordpress.com/2009/06/normalorderbyoutput.png" medium="image">
			<media:title type="html">Order By Output</media:title>
		</media:content>

		<media:content url="http://rmanimaran.files.wordpress.com/2009/06/orderbyquery.png" medium="image">
			<media:title type="html">OrderByQuery</media:title>
		</media:content>

		<media:content url="http://rmanimaran.files.wordpress.com/2009/06/orderbyoutput.png" medium="image">
			<media:title type="html">OrderByOutput</media:title>
		</media:content>
	</item>
		<item>
		<title>Comma separated Column value in Crystal Report</title>
		<link>http://rmanimaran.wordpress.com/2009/04/20/comma-separated-column-value-in-crystal-report/</link>
		<comments>http://rmanimaran.wordpress.com/2009/04/20/comma-separated-column-value-in-crystal-report/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 06:28:52 +0000</pubDate>
		<dc:creator>R Manimaran</dc:creator>
				<category><![CDATA[Crystal Report]]></category>

		<guid isPermaLink="false">http://rmanimaran.wordpress.com/?p=173</guid>
		<description><![CDATA[I have come across a situation in Crystal Report. Suppose for example I have two tables Employees and Departments.
An Employee can be belonged to two departments. In the report I need some thing like this
 

 

 I don’t want to insert any group. Just a list of employees with their corresponding Departments
 

Solution:
To achieve this in crystal report [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=173&subd=rmanimaran&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size:10pt;font-family:Verdana;">I have come across a situation in Crystal Report. Suppose for example I have two tables <strong>Employees</strong> and <strong>Departments</strong>.</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size:10pt;font-family:Verdana;">An Employee can be belonged to two departments. In the report I need some thing like this</span></p>
<p> </p>
<p><span style="font-size:10pt;font-family:Verdana;"></p>
<div id="attachment_174" class="wp-caption alignnone" style="width: 359px"><img class="size-full wp-image-174" title="reportoutput" src="http://rmanimaran.files.wordpress.com/2009/04/reportoutput.png?w=349&#038;h=141" alt="Report Output" width="349" height="141" /><p class="wp-caption-text">Report Output</p></div>
<p> </p>
<p></span></p>
<p> <span style="font-size:10pt;font-family:Verdana;">I don’t want to insert any group. Just a list of employees with their corresponding Departments</span></p>
<p> </p>
<p><span style="font-size:10pt;font-family:Verdana;"></p>
<p class="MsoNormal" style="margin:0;"><strong><span style="font-size:10pt;color:blue;font-family:Verdana;">Solution:</span></strong></p>
<p class="MsoNormal" style="margin:0;"><strong><span style="font-size:10pt;font-family:Verdana;">To achieve this in crystal report we need to write some formula.</span></strong></p>
<p class="MsoNormal" style="margin:0;"><strong><span style="font-size:small;font-family:Times New Roman;"> </span></strong></p>
<p class="MsoNormal" style="margin:0;"><strong><span style="font-size:small;"><span style="font-family:Times New Roman;">Formula 1: @Department</span></span></strong></p>
<p class="MsoNormal" style="margin:0;"><strong><span style="font-size:small;font-family:Times New Roman;"> </span></strong></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:Tahoma;">WhilePrintingRecords;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:Tahoma;">Shared StringVar</span><span style="font-size:10pt;color:#3366ff;font-family:Tahoma;"> </span><span style="font-size:10pt;font-family:Tahoma;">Result<span style="color:#3366ff;">;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:Tahoma;">if(NextIsNull</span><span style="font-size:10pt;font-family:Tahoma;">({Employees.EMPID})=<span style="color:blue;">true or</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Tahoma;"><span>  </span>{Employees.EMPID }&lt;&gt;<span style="color:blue;">Next</span>({Employees.EMPID })) <span style="color:blue;">then</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Tahoma;"><span>   </span>Result:={Departments.Name}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Tahoma;">else</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Tahoma;"><span>   </span>Result:={Departments.Name }&amp; &#8220;,&#8221; &amp; chr(13)&amp; <span style="color:blue;">Next</span>({Departments.Name })</span></p>
<p class="MsoNormal" style="margin:0;"><strong><span style="font-size:small;font-family:Times New Roman;"> </span></strong></p>
<p class="MsoNormal" style="margin:0;"><strong></strong><span style="font-size:10pt;font-family:Verdana;">Place the <strong>@Departments</strong> formula in the details section. Now you will get the output like this.</span></p>
<p> </p>
<p></span></p>
<p> </p>
<p> </p>
<p> </p>
<p><span style="font-size:10pt;font-family:Verdana;"></p>
<div id="attachment_175" class="wp-caption alignnone" style="width: 374px"><img class="size-full wp-image-175" title="reportoutput1" src="http://rmanimaran.files.wordpress.com/2009/04/reportoutput1.png?w=364&#038;h=206" alt="Report Output" width="364" height="206" /><p class="wp-caption-text">Report Output</p></div>
<p> </p>
<p></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:Verdana;">We need to eliminate the second row and fourth row.<span>  </span>For that we need to do</span></p>
<ol style="margin-top:0;" type="1">
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">Right click the EMP.ID field in the details section and select <strong>Suppress if duplicated </strong>option.</span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">Now select the EMP.Name and <strong>@Departments</strong> fields. Right click and select Format Field . In the common tab check <strong>Suppress.</strong></span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">In the <span style="color:red;">X2</span> formula section of the Suppress write this formula.</span></li>
</ol>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;color:blue;font-family:Tahoma;">WhilePrintingRecords;</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;color:blue;font-family:Tahoma;">if(PreviousIsNull</span><span style="font-size:10pt;font-family:Tahoma;">({Employees.EMPID})=<span style="color:blue;">true or</span> {Employees.EMPID}&lt;&gt;</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;font-family:Tahoma;"><span style="color:blue;">Previous(</span>{Employees.EMPID})) <span style="color:blue;">then</span></span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;color:blue;font-family:Tahoma;"><span>   </span>false</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;color:blue;font-family:Tahoma;">else</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:10pt;color:blue;font-family:Tahoma;"><span>   </span>true</span></p>
<ol style="margin-top:0;" type="1">
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">Now whole second row and fourth row are appearing blank.</span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">To eliminate that space, Right click details section and select Section Expert.</span></li>
<li class="MsoNormal"><span style="font-size:10pt;font-family:Verdana;">Check the <strong>Suppress blank section</strong> option.</span></li>
</ol>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:Verdana;">If anybody founds any other way achieve this, can post the things here.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:Verdana;">Happy Coding!!</span></p>
<p class="MsoNormal" style="margin:0;"> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rmanimaran.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rmanimaran.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rmanimaran.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rmanimaran.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rmanimaran.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rmanimaran.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rmanimaran.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rmanimaran.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rmanimaran.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rmanimaran.wordpress.com/173/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=173&subd=rmanimaran&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rmanimaran.wordpress.com/2009/04/20/comma-separated-column-value-in-crystal-report/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5fdd8f9f4db44940b9471da982804e2b?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">rmanimaran</media:title>
		</media:content>

		<media:content url="http://rmanimaran.files.wordpress.com/2009/04/reportoutput.png" medium="image">
			<media:title type="html">reportoutput</media:title>
		</media:content>

		<media:content url="http://rmanimaran.files.wordpress.com/2009/04/reportoutput1.png" medium="image">
			<media:title type="html">reportoutput1</media:title>
		</media:content>
	</item>
		<item>
		<title>Showing “Open with” Option on clicking any drive in the Explorer</title>
		<link>http://rmanimaran.wordpress.com/2009/03/30/showing-%e2%80%9copen-with%e2%80%9d-option-on-clicking-any-drive-in-the-explorer/</link>
		<comments>http://rmanimaran.wordpress.com/2009/03/30/showing-%e2%80%9copen-with%e2%80%9d-option-on-clicking-any-drive-in-the-explorer/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 16:28:10 +0000</pubDate>
		<dc:creator>R Manimaran</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://rmanimaran.wordpress.com/?p=170</guid>
		<description><![CDATA[Showing “Open with” Option on clicking any drive in the Explorer
Sometimes when we click the drive in the explorer it will show the “Open with” option. This is due to the some virus which creates the autorun.inf file.
For this follow these steps.
1.    Open cmd prompt.
2.    Select the drive that is showing the “Open with” box. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=170&subd=rmanimaran&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p class="MsoNormal"><strong><span style="color:#ff0000;">Showing “Open with” Option on clicking any drive in the Explorer</span></strong></p>
<p class="MsoNormal">Sometimes when we click the drive in the explorer it will show the “Open with” option. This is due to the some virus which creates the autorun.inf file.</p>
<p class="MsoNormal"><span style="color:#00ccff;"><strong>For this follow these steps.</strong></span></p>
<p class="MsoListParagraphCxSpFirst">1.    Open cmd prompt.</p>
<p class="MsoListParagraphCxSpMiddle">2.    Select the drive that is showing the “Open with” box. (Move to the root)</p>
<p class="MsoListParagraphCxSpMiddle">3.    Suppose if C drive shows open with means you have to be in the root path as</p>
<p class="MsoListParagraphCxSpMiddle" style="padding-left:30px;">a.    C:\&gt;</p>
<p class="MsoListParagraphCxSpMiddle">4.    Type “attrib –r –h –s autorun.inf”</p>
<p class="MsoListParagraphCxSpMiddle">5.    Then type “del autorun.inf”</p>
<p class="MsoListParagraphCxSpMiddle">6.    Open Task Manager and Select Explorer in the running processes.</p>
<p class="MsoListParagraphCxSpMiddle">7.    Click End Task.</p>
<p class="MsoListParagraphCxSpMiddle">8.    Under the Application tab click “New Task” button.</p>
<p class="MsoListParagraphCxSpMiddle">9.    Type Explorer and click ok.</p>
<p class="MsoListParagraphCxSpLast">10. Now the explorer is restarted. Now Click the C drive. Is it works ?</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rmanimaran.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rmanimaran.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rmanimaran.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rmanimaran.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rmanimaran.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rmanimaran.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rmanimaran.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rmanimaran.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rmanimaran.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rmanimaran.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=170&subd=rmanimaran&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rmanimaran.wordpress.com/2009/03/30/showing-%e2%80%9copen-with%e2%80%9d-option-on-clicking-any-drive-in-the-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5fdd8f9f4db44940b9471da982804e2b?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">rmanimaran</media:title>
		</media:content>
	</item>
		<item>
		<title>Show Hidden files and Folders Problem in Windows XP</title>
		<link>http://rmanimaran.wordpress.com/2009/03/30/show-hidden-files-and-folders-problem-in-windows-xp/</link>
		<comments>http://rmanimaran.wordpress.com/2009/03/30/show-hidden-files-and-folders-problem-in-windows-xp/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 16:25:54 +0000</pubDate>
		<dc:creator>R Manimaran</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://rmanimaran.wordpress.com/?p=167</guid>
		<description><![CDATA[Show Hidden files and Folders Problem in Windows XP.
In Windows XP we have a option to hide or show the hidden files. In the Windows explorer click Toolsà Folder option.
On the opened dialog box Select View Tab.
Under Hidden Files and Folders you have two option box

Do not show Hidden files and Folders
Show Hidden files and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=167&subd=rmanimaran&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p class="MsoNormal"><strong><span style="color:#339966;">Show Hidden files and Folders Problem in Windows XP.</span></strong></p>
<p class="MsoNormal">In Windows XP we have a option to hide or show the hidden files. In the Windows explorer click Toolsà Folder option.</p>
<p class="MsoNormal">On the opened dialog box Select View Tab.</p>
<p class="MsoNormal">Under <span style="color:#339966;">Hidden Files and Folders</span> you have two option box</p>
<ul>
<li><span style="color:#339966;">Do not show Hidden files and Folders</span></li>
<li><span style="color:#339966;">Show Hidden files and folders</span></li>
</ul>
<p class="MsoNormal"> </p>
<p class="MsoNormal">In Windows XP sometimes if we set the Show Hidden Files and Folders option it automatically reset to Do not show Hidden files and Folders.</p>
<p class="MsoNormal"><strong><span style="color:#3366ff;">Resolution:</span></strong></p>
<p class="MsoNormal">To fix this, we need to do some modification in the registry.</p>
<p class="MsoNormal">Type “regedit” in the Run Dialog box.</p>
<p class="MsoNormal">Search the following path.</p>
<p class="MsoNormal">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL</p>
<p class="MsoNormal">On the Right side delete the KeyWord “CheckedValue” and add a new DWORD “<span style="color:#339966;">CheckedValue</span>” with the value “1”.</p>
<p class="MsoNormal">Close the Regedit and log off the system and log-in.</p>
<p class="MsoNormal">Now Change the option in the Toolsà Folder option.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rmanimaran.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rmanimaran.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rmanimaran.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rmanimaran.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rmanimaran.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rmanimaran.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rmanimaran.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rmanimaran.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rmanimaran.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rmanimaran.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=167&subd=rmanimaran&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rmanimaran.wordpress.com/2009/03/30/show-hidden-files-and-folders-problem-in-windows-xp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5fdd8f9f4db44940b9471da982804e2b?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">rmanimaran</media:title>
		</media:content>
	</item>
		<item>
		<title>“RESTORE MY DESKTOP” error in Windows XP System</title>
		<link>http://rmanimaran.wordpress.com/2009/03/30/%e2%80%9crestore-my-desktop%e2%80%9d-error-in-windows-xp-system/</link>
		<comments>http://rmanimaran.wordpress.com/2009/03/30/%e2%80%9crestore-my-desktop%e2%80%9d-error-in-windows-xp-system/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 16:23:08 +0000</pubDate>
		<dc:creator>R Manimaran</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://rmanimaran.wordpress.com/?p=164</guid>
		<description><![CDATA[“RESTORE MY DESKTOP” error in Windows XP System
Sometimes when working in Windows XP we may come with this Problem. A button will be showed in the desktop with a Text “Restore My Desktop”. On Clicking the button you will get the script error message
Error:
file:///C:/Documents%20and%20Settings/My%20Name/Application%20Data/Microsoft/Internet%20Explorer/Desktop.htt&#8220;
Resolution:
For this we need to do some change in the Registry.
Note: Extra [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=164&subd=rmanimaran&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p class="MsoNormal"><strong><span style="color:#ff6600;">“RESTORE MY DESKTOP” error in Windows XP System</span></strong></p>
<p class="MsoNormal">Sometimes when working in Windows XP we may come with this Problem. A button will be showed in the desktop with a Text “Restore My Desktop”. On Clicking the button you will get the script error message</p>
<p class="MsoNormal"><strong>Error:</strong></p>
<p class="MsoNormal"><a href="\Documents%20and%20Settings\My%20Name\Application%20Data\Microsoft\Internet%20Explorer\Desktop.htt">file:///C:/Documents%20and%20Settings/My%20Name/Application%20Data/Microsoft/Internet%20Explorer/Desktop.htt</a>&#8220;</p>
<p class="MsoNormal">Resolution:</p>
<p class="MsoNormal">For this we need to do some change in the Registry.</p>
<p class="MsoNormal"><strong>Note: Extra Care should be taken while working with Registry. </strong></p>
<p class="MsoNormal">Type “regedit” in the RUN dialog box.</p>
<p class="MsoNormal">Search for the following Key</p>
<p class="MsoNormal">HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\SafeMode\Components</p>
<p class="MsoNormal">Change the Keyvalue of the right side of the pane as follows</p>
<p class="MsoNormal">DeskHtmlVersion REG_DWORD 0&#215;00000110(272) to decimal zero</p>
<p class="MsoNormal">Close Regedit and logoff the system and log on.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rmanimaran.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rmanimaran.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rmanimaran.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rmanimaran.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rmanimaran.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rmanimaran.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rmanimaran.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rmanimaran.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rmanimaran.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rmanimaran.wordpress.com/164/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=164&subd=rmanimaran&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rmanimaran.wordpress.com/2009/03/30/%e2%80%9crestore-my-desktop%e2%80%9d-error-in-windows-xp-system/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5fdd8f9f4db44940b9471da982804e2b?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">rmanimaran</media:title>
		</media:content>
	</item>
		<item>
		<title>Debug a Windows Service in Visual Studio 2005</title>
		<link>http://rmanimaran.wordpress.com/2008/10/02/debug-a-windows-service-in-visual-studio-2005/</link>
		<comments>http://rmanimaran.wordpress.com/2008/10/02/debug-a-windows-service-in-visual-studio-2005/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 16:53:47 +0000</pubDate>
		<dc:creator>R Manimaran</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Windows Services]]></category>

		<guid isPermaLink="false">http://rmanimaran.wordpress.com/?p=155</guid>
		<description><![CDATA[Debug a Windows Service application in Visual studio 2005
For normal application we can set the breakpoint in Visual studio and start debugging by pressing F10 or F11. But for the Windows services application we can’t directly debug the application. Following steps will help to debug the windows service application.
1.	Create the setup project for the Windows [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=155&subd=rmanimaran&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Debug a Windows Service application in Visual studio 2005<br />
For normal application we can set the breakpoint in Visual studio and start debugging by pressing F10 or F11. But for the Windows services application we can’t directly debug the application. Following steps will help to debug the windows service application.</p>
<p>1.	Create the setup project for the Windows Service application.<br />
2.	If the Solution contain more than one Project, select the Windows Service project as the Start up project by right-click the project and select Set as Startup project<br />
3.	In the Solution configuration select Debug mode. In the release mode we can’t debug the application.<br />
4.	Install the Windows service setup in the system<br />
5.	Go to the services and start your windows services. Once it successfully started proceed to next step.<br />
6.	Set Breakpoint on your application( press F9 for breakpoint)<br />
7.	Go to Tools&#8211;&gt;Options menu in the VS 2005<br />
8.	Select Debugging &#8211;&gt;Symbols</p>
<p><a href="http://rmanimaran.files.wordpress.com/2008/10/options.png"><img src="http://rmanimaran.files.wordpress.com/2008/10/options.png?w=300&#038;h=177" alt="" title="options" width="300" height="177" class="aligncenter size-medium wp-image-156" /></a></p>
<p>9.	In the Symbol file(.pdb) locations add the path of the pdb file path.(should include the pdb file name also)<br />
i.e \Debug\</p>
<p>10.	The Pdb file is located in the application Debug directory.<br />
11.	In the Cache symbols servers to this directory browse the path where the Pdb file is located.(no pdb file name required here. Only path up to Debug folder)<br />
12.	Click ok to set your setting. After finishing this again to this window and double check that your options are still available.<br />
13.	Select Debug&#8211;&gt;Attach to Process option as shown in fig</p>
<p><a href="http://rmanimaran.files.wordpress.com/2008/10/debug.png"><img src="http://rmanimaran.files.wordpress.com/2008/10/debug.png?w=233&#038;h=273" alt="" title="debug" width="233" height="273" class="aligncenter size-full wp-image-158" /></a></p>
<p>14.	Select your running windows service in the Available processes</p>
<p><a href="http://rmanimaran.files.wordpress.com/2008/10/attachprocess.png"><img src="http://rmanimaran.files.wordpress.com/2008/10/attachprocess.png?w=300&#038;h=213" alt="" title="attachprocess" width="300" height="213" class="aligncenter size-medium wp-image-157" /></a></p>
<p>15.	 Click Attach button to attach the Windows service to your application.<br />
16.	Now you can see the application is starts running.<br />
17.	Please wait until the flow reaches your breakpoint.<br />
18.	Once it reaches your breakpoint then you can use your normal F10 or F11 keys to debug the application.</p>
<p>happy Coding!!!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rmanimaran.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rmanimaran.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rmanimaran.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rmanimaran.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rmanimaran.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rmanimaran.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rmanimaran.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rmanimaran.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rmanimaran.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rmanimaran.wordpress.com/155/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=155&subd=rmanimaran&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rmanimaran.wordpress.com/2008/10/02/debug-a-windows-service-in-visual-studio-2005/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5fdd8f9f4db44940b9471da982804e2b?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">rmanimaran</media:title>
		</media:content>

		<media:content url="http://rmanimaran.files.wordpress.com/2008/10/options.png?w=300" medium="image">
			<media:title type="html">options</media:title>
		</media:content>

		<media:content url="http://rmanimaran.files.wordpress.com/2008/10/debug.png" medium="image">
			<media:title type="html">debug</media:title>
		</media:content>

		<media:content url="http://rmanimaran.files.wordpress.com/2008/10/attachprocess.png?w=300" medium="image">
			<media:title type="html">attachprocess</media:title>
		</media:content>
	</item>
		<item>
		<title>DataTable to Excel File</title>
		<link>http://rmanimaran.wordpress.com/2008/09/26/datatable-to-excel-file/</link>
		<comments>http://rmanimaran.wordpress.com/2008/09/26/datatable-to-excel-file/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 21:03:30 +0000</pubDate>
		<dc:creator>R Manimaran</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://rmanimaran.wordpress.com/?p=152</guid>
		<description><![CDATA[ADD REFERENCE
• Interop.Excel
• Interop.Office
• Microsoft.Vbe.Interop
private static Excel.Application app = null;
private static Excel.Workbook workbook = null;
private static Excel.Worksheet worksheet = null;
private static Excel.Range worksheet_range = null;
public static void CreateExcelDoc()
{
try
{
app = new Excel.Application();
app.Visible = true;
workbook = app.Workbooks.Add(1);
worksheet = (Excel.Worksheet)workbook.Sheets[1];
}
catch (Exception ex)
{
throw new ApplicationException(&#8220;Error while creating the Excel
file.Message:&#8221; + ex.Message);
}
}
public static void CloseDoc(string Path)
{
workbook.Close(true, Path, false);
app.Quit();
if (worksheet != [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=152&subd=rmanimaran&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>ADD REFERENCE<br />
• Interop.Excel<br />
• Interop.Office<br />
• Microsoft.Vbe.Interop</p>
<p>private static Excel.Application app = null;<br />
private static Excel.Workbook workbook = null;<br />
private static Excel.Worksheet worksheet = null;<br />
private static Excel.Range worksheet_range = null;</p>
<p>public static void CreateExcelDoc()<br />
{<br />
try<br />
{<br />
app = new Excel.Application();<br />
app.Visible = true;<br />
workbook = app.Workbooks.Add(1);<br />
worksheet = (Excel.Worksheet)workbook.Sheets[1];<br />
}<br />
catch (Exception ex)<br />
{<br />
throw new ApplicationException(&#8220;Error while creating the Excel<br />
file.Message:&#8221; + ex.Message);<br />
}<br />
}<br />
public static void CloseDoc(string Path)<br />
{<br />
workbook.Close(true, Path, false);<br />
app.Quit();<br />
if (worksheet != null)<br />
Marshal.ReleaseComObject(worksheet);<br />
if (workbook != null)<br />
Marshal.ReleaseComObject(workbook);<br />
if (app != null)<br />
Marshal.ReleaseComObject(app);<br />
}</p>
<p>private static void InsertSummaryDataToExcel(DataTable dtResult, ref int row)<br />
{<br />
int col=0;<br />
string WorksheetRangeSt = string.Empty;<br />
string WorksheetRangeEnd = string.Empty;<br />
foreach (DataRow dtRow in dtResult.Rows)<br />
{<br />
col=1;<br />
WorksheetRangeSt = &#8220;A&#8221; + row.ToString();<br />
foreach (DataColumn dtCol in dtResult.Columns)<br />
{<br />
worksheet.Cells[row, col] = dtRow[dtCol.ColumnName].ToString();<br />
col = col + 1;<br />
}<br />
row = row + 1;<br />
}<br />
WorksheetRangeEnd = &#8220;E&#8221; + row.ToString();<br />
worksheet_range = worksheet.get_Range(WorksheetRangeSt,<br />
WorksheetRangeEnd);<br />
worksheet_range.Borders.Color = System.Drawing.Color.Black.ToArgb();<br />
worksheet_range.Interior.Color = System.Drawing.Color.Ivory.ToArgb();<br />
row = row + 1;<br />
}</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rmanimaran.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rmanimaran.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rmanimaran.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rmanimaran.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rmanimaran.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rmanimaran.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rmanimaran.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rmanimaran.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rmanimaran.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rmanimaran.wordpress.com/152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=152&subd=rmanimaran&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rmanimaran.wordpress.com/2008/09/26/datatable-to-excel-file/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5fdd8f9f4db44940b9471da982804e2b?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">rmanimaran</media:title>
		</media:content>
	</item>
		<item>
		<title>Convert DataTable to CSV File</title>
		<link>http://rmanimaran.wordpress.com/2008/09/26/convert-datatable-to-csv-file/</link>
		<comments>http://rmanimaran.wordpress.com/2008/09/26/convert-datatable-to-csv-file/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 20:55:43 +0000</pubDate>
		<dc:creator>R Manimaran</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://rmanimaran.wordpress.com/?p=149</guid>
		<description><![CDATA[Get the DataTable from Sql
private DataTable GetQueryOutput(string Sql)
{
DataTable dtResult = null;
if (con.State != ConnectionState.Open)
con.Open();
OleDbDataAdapter da = new OleDbDataAdapter(Sql, con);
dtResult = new DataTable(&#8220;Output&#8221;);
dtResult.BeginLoadData();
da.Fill(dtResult);
dtResult.EndLoadData();
return dtResult;
}
//Declare a StreamWriter
System.IO.StreamWriter writer=null;
string SepChar=”,”;
try
{
writer = new StreamWriter(FileName);
string sep = &#8220;&#8221;;
StringBuilder builder = new StringBuilder();
string Sql=string.Empty;
//Writing the Column Heading
foreach (DataColumn col in dt.Columns)
{
   builder.Append(sep).Append(col.ColumnName);
    sep = SepChar;
}
writer.WriteLine(builder.ToString());
//write the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=149&subd=rmanimaran&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Get the DataTable from Sql<br />
private DataTable GetQueryOutput(string Sql)<br />
{<br />
DataTable dtResult = null;<br />
if (con.State != ConnectionState.Open)<br />
con.Open();<br />
OleDbDataAdapter da = new OleDbDataAdapter(Sql, con);<br />
dtResult = new DataTable(&#8220;Output&#8221;);<br />
dtResult.BeginLoadData();<br />
da.Fill(dtResult);<br />
dtResult.EndLoadData();<br />
return dtResult;<br />
}</p>
<p>//Declare a StreamWriter<br />
System.IO.StreamWriter writer=null;<br />
string SepChar=”,”;<br />
try<br />
{<br />
writer = new StreamWriter(FileName);<br />
string sep = &#8220;&#8221;;<br />
StringBuilder builder = new StringBuilder();<br />
string Sql=string.Empty;<br />
//Writing the Column Heading<br />
foreach (DataColumn col in dt.Columns)<br />
{<br />
   builder.Append(sep).Append(col.ColumnName);<br />
    sep = SepChar;<br />
}<br />
writer.WriteLine(builder.ToString());</p>
<p>//write the Rows<br />
foreach (DataRow row in dt.Rows)<br />
{<br />
sep = &#8220;&#8221;;<br />
builder = new StringBuilder();<br />
foreach (DataColumn col in dt.Columns)<br />
{<br />
builder.Append(sep).Append(row[col.ColumnName]);<br />
      sep = SepChar;<br />
}<br />
writer.WriteLine(builder.ToString());</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rmanimaran.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rmanimaran.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rmanimaran.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rmanimaran.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rmanimaran.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rmanimaran.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rmanimaran.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rmanimaran.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rmanimaran.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rmanimaran.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=149&subd=rmanimaran&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rmanimaran.wordpress.com/2008/09/26/convert-datatable-to-csv-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5fdd8f9f4db44940b9471da982804e2b?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">rmanimaran</media:title>
		</media:content>
	</item>
		<item>
		<title>Changing the Display string of Column in Crystal Report Cross – Tab</title>
		<link>http://rmanimaran.wordpress.com/2008/09/15/changing-the-display-string-of-column-in-crystal-report-cross-%e2%80%93-tab/</link>
		<comments>http://rmanimaran.wordpress.com/2008/09/15/changing-the-display-string-of-column-in-crystal-report-cross-%e2%80%93-tab/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 14:51:12 +0000</pubDate>
		<dc:creator>R Manimaran</dc:creator>
				<category><![CDATA[Crystal Report]]></category>

		<guid isPermaLink="false">http://rmanimaran.wordpress.com/?p=143</guid>
		<description><![CDATA[There may be a situation where we need to modify the Column Title display string.
We can change the Column title using the Display string in the Format Field option.
Select the Column Title in the Cross-tab. Right click and select Format Field option. Under the Common Tab select the Display string x-2 button.
Use the GridRowColumnValue function [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=143&subd=rmanimaran&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>There may be a situation where we need to modify the Column Title display string.<br />
We can change the Column title using the Display string in the Format Field option.</p>
<p>Select the Column Title in the Cross-tab. Right click and select Format Field option. Under the Common Tab select the Display string x-2 button.</p>
<p>Use the GridRowColumnValue function in the condition statement<br />
i.e.<br />
if GridRowColumnValue(&#8220;TableName.ColumnName&#8221;)=&#8221;string to Check&#8221; then<br />
&#8220;New Disp String&#8221;<br />
Else if GridRowColumnValue(&#8220;TableName.ColumnName&#8221;)=&#8221;string to Check&#8221; then<br />
&#8220;New Disp String2&#8243;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/rmanimaran.wordpress.com/143/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/rmanimaran.wordpress.com/143/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rmanimaran.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rmanimaran.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rmanimaran.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rmanimaran.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rmanimaran.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rmanimaran.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rmanimaran.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rmanimaran.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rmanimaran.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rmanimaran.wordpress.com/143/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rmanimaran.wordpress.com&blog=444329&post=143&subd=rmanimaran&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rmanimaran.wordpress.com/2008/09/15/changing-the-display-string-of-column-in-crystal-report-cross-%e2%80%93-tab/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5fdd8f9f4db44940b9471da982804e2b?s=96&#38;d=wavatar" medium="image">
			<media:title type="html">rmanimaran</media:title>
		</media:content>
	</item>
	</channel>
</rss>