<?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/"
	>

<channel>
	<title>Techie Gyaaan &#187; Reporting</title>
	<atom:link href="http://techie.gyaaan.com/category/reporting/feed/" rel="self" type="application/rss+xml" />
	<link>http://techie.gyaaan.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 15 May 2009 15:19:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Export Query resultset to Excel Using Interop</title>
		<link>http://techie.gyaaan.com/export-query-resultset-to-excel-using-interop/</link>
		<comments>http://techie.gyaaan.com/export-query-resultset-to-excel-using-interop/#comments</comments>
		<pubDate>Sun, 22 Jun 2008 19:14:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Reporting]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Query]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://techie.gyaaan.com/?p=58</guid>
		<description><![CDATA[Just a well documented Code Program to Export the result set to Excel]]></description>
			<content:encoded><![CDATA[<p>Just a well documented Code <img src='http://techie.gyaaan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href='http://techie.gyaaan.com/wp-content/uploads/2008/06/program.cs'>Program to Export the result set to Excel</a></p>
]]></content:encoded>
			<wfw:commentRss>http://techie.gyaaan.com/export-query-resultset-to-excel-using-interop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connect PHP with Jasper Reports</title>
		<link>http://techie.gyaaan.com/connect-php-with-jasper-reports/</link>
		<comments>http://techie.gyaaan.com/connect-php-with-jasper-reports/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 17:28:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reporting]]></category>
		<category><![CDATA[Jasper]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP_Java]]></category>

		<guid isPermaLink="false">http://techie.gyaaan.com/?p=37</guid>
		<description><![CDATA[This is an interesting piece of code that I found on the web. I&#8217;ve not yet tested this but it sure does look promising. compileReport($reportsPath .$reportFileName.&#8221;.jrxml&#8221;); // Remplir le modèle avec les données $sJfm = new JavaClass(&#8220;net.sf.jasperreports.engine.JasperFillManager&#8221;); $print = $sJfm->fillReport( $report, new Java(&#8220;java.util.HashMap&#8221;), $Conn->getConnection() ); // Export du fichier au format pdf $sJem = new [...]]]></description>
			<content:encoded><![CDATA[<p>This is an interesting piece of code that I found on the web. I&#8217;ve not yet tested this but it sure does look promising.</p>
<blockquote><p>
<?php<br />
       $reportsPath ="/home/ccharly/publichtml/utils/reports/";<br />
       $reportFileName = "CommandesClients1";<br />
       $jasperReportsLib = "/home/ccharly/publichtml/utils/jasperlib";</p>
<p>        if(extension_loaded('java')) {</p>
<p>           // lecture du répertoire où sont rengés les librairies utiles à JasperReports<br />
           $handle = @opendir($jasperReportsLib);</p>
<p>           // ajout de tous les fichier jar au chemin de classe (Class Path)<br />
           while(($new_item = readdir($handle))!==false) {</p>
<p>               $java_library_path .= 'file:'.$jasperReportsLib.'/'.$new_item .';';<br />
           }</p>
<p>           try {<br />
               // chargement des librairies au classpath<br />
               java_require($java_library_path);</p>
<p>               // création de la connexion JDBC<br />
               $Conn = new Java("org.altic.jasperReports.JdbcConnection");<br />
               // driver<br />
               $Conn->setDriver(&#8220;com.mysql.jdbc.Driver&#8221;);<br />
               // url de connexion<br />
               $Conn->setConnectString(&#8220;jdbc:mysql://localhost/erpmart&#8221;);<br />
               // utilisateur<br />
               $Conn->setUser(&#8220;root&#8221;);<br />
               // mot de passe<br />
               $Conn->setPassword(null);</p>
<p>               // Compilation du fichier JRXML en fichier Jasper<br />
               $sJcm = new JavaClass(&#8220;net.sf.jasperreports.engine.JasperCompileManager&#8221;);<br />
               $report = $sJcm->compileReport($reportsPath .$reportFileName.&#8221;.jrxml&#8221;);</p>
<p>               // Remplir le modèle avec les données<br />
               $sJfm = new JavaClass(&#8220;net.sf.jasperreports.engine.JasperFillManager&#8221;);<br />
               $print = $sJfm->fillReport(<br />
               $report,<br />
               new Java(&#8220;java.util.HashMap&#8221;),<br />
               $Conn->getConnection()<br />
               );</p>
<p>               // Export du fichier au format pdf<br />
               $sJem = new JavaClass(&#8220;net.sf.jasperreports.engine.JasperExportManager&#8221;);<br />
               $sJem->exportReportToPdfFile($print, $reportsPath .$reportFileName.&#8221;.pdf&#8221;);</p>
<p>               if (file_exists($reportsPath .$reportFileName.&#8221;.pdf&#8221;)){<br />
                    header(&#8216;Content-disposition: attachment; filename=&#8221;&#8216;.$reportFileName.&#8217;.pdf&#8221;&#8216;);<br />
                    header(&#8216;Content-Type: application/pdf&#8217;);<br />
                    header(&#8216;Content-Transfer-Encoding: binary&#8217;);<br />
                    header(&#8216;Content-Length: &#8216;. @filesize($reportsPath . $reportFileName.&#8221;.pdf&#8221;));<br />
                    header(&#8216;Pragma: no-cache&#8217;);<br />
                    header(&#8216;Cache-Control: must-revalidate, post-check=0, pre-check=0&#8242;);<br />
                    header(&#8216;Expires: 0&#8242;);<br />
                    set_time_limit(0);<br />
                    @readfile($reportsPath .$reportFileName.&#8221;.pdf&#8221;) or die(&#8220;problem occurs.&#8221;);<br />
                }</p>
<p>           } catch (JavaException $ex) {<br />
                $trace = new Java(&#8220;java.io.ByteArrayOutputStream&#8221;);<br />
               $ex->printStackTrace(new Java(&#8220;java.io.PrintStream&#8221;, $trace));<br />
               print &#8220;java stack trace: $trace\n&#8221;;<br />
           }<br />
       }</p>
<p>   ?>
</p></blockquote>
<p><a href="http://charly-clairmont.developpez.com/tutoriels/php-jasper-reports">Source:</a></p>
]]></content:encoded>
			<wfw:commentRss>http://techie.gyaaan.com/connect-php-with-jasper-reports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

