<?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>Crystal Reports Archives - Dragonsoft Technology View</title>
	<atom:link href="https://blog.dragonsoft.us/category/technology/crystal-reports/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.dragonsoft.us/category/technology/crystal-reports/</link>
	<description>Talk about Technologies, Software Architecture and Management</description>
	<lastBuildDate>Fri, 02 Dec 2011 19:56:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog.dragonsoft.us/wp-content/uploads/2022/04/logo-main-bw-150x150.png</url>
	<title>Crystal Reports Archives - Dragonsoft Technology View</title>
	<link>https://blog.dragonsoft.us/category/technology/crystal-reports/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">2577970</site>	<item>
		<title>Crystal Reports 2010 &#8211; rumors are out</title>
		<link>https://blog.dragonsoft.us/2010/03/01/crystal-reports-2010-rumors-are-out/</link>
					<comments>https://blog.dragonsoft.us/2010/03/01/crystal-reports-2010-rumors-are-out/#respond</comments>
		
		<dc:creator><![CDATA[Serguei Dosyukov]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 13:18:16 +0000</pubDate>
				<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[.net 3.5]]></category>
		<category><![CDATA[64 bit runtime]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[crystal reports 2010]]></category>
		<category><![CDATA[excel 2007 export]]></category>
		<category><![CDATA[new features]]></category>
		<category><![CDATA[sap]]></category>
		<category><![CDATA[visual studio 2010]]></category>
		<category><![CDATA[wpf]]></category>
		<category><![CDATA[wpf viewer]]></category>
		<category><![CDATA[xlsx support]]></category>
		<guid isPermaLink="false">http://blog.dragonsoft.us/?p=1121</guid>

					<description><![CDATA[<p>It has been two years since Crystal Reports 2008 was released. It feels old now &#8211; no support for new .Net technologies, no support for new export formats, etc. So question is &#8211; when we would see any of this? Accordingly to Blair Wheadon,  Product Manager in the Volume Business Unit<a class="moretag" href="https://blog.dragonsoft.us/2010/03/01/crystal-reports-2010-rumors-are-out/"> Read more</a></p>
<p>The post <a href="https://blog.dragonsoft.us/2010/03/01/crystal-reports-2010-rumors-are-out/">Crystal Reports 2010 &#8211; rumors are out</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>It has been two years since Crystal Reports 2008 was released. It feels old now &#8211; no support for new .Net technologies, no support for new export formats, etc.</p>
<p>So question is &#8211; when we would see any of this?</p>
<p>Accordingly to <a onclick="this.href='http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/u/251930783';" href="http://weblogs.sdn.sap.com/pub/u/251930783" target="_top">Blair Wheadon</a>,  Product Manager in the Volume Business Unit at SAP, our <a href="http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/14514" target="_blank">cries may be answered relatively soon</a>.</p>
<p>Post is a nice summary and I hope features discussed would be in the final product.</p>
<p>Few highlights I pick for myself and with comments:</p>
<ul>
<li><em>Crystal Reports Basic will no longer be included in Visual Studio 2010<br />
</em>Finally! Every time I have to set-up Visual Studio environment, I have to make sure I do not bring CR Basic along since I have a full version instead.<br />
Do not worry &#8220;<em>Crystal Reports for Visual Studio 2010 will be provided by SAP as a free download, no registration required</em>&#8220;.<br />
<em>We are committed to have a beta version at the time that Visual Studio 2010 goes GA. A production release will be no later than Q3 2010</em></li>
<li>There are slight changes in Licensing&#8230; as usual, read it through.</li>
<li><em>64-bit run-time support.<br />
</em>Good! Platform independent code for .Net applications.</li>
<li><em>New WPF Viewer<br />
</em>Even better! No more .Net 2.0 assemblies (I hope)</li>
<li><em>New XLSX export to take advantage of the big grid for data-only Excel exports<br />
</em>Finally! 64K page limit is inconvenient, to say the least.</li>
</ul>
<p>You can read about other more or less important improvements in Blair&#8217;s post, but these are answers for questions I was looking for.</p>
<hr/><span style="font-size: 7pt">Copyright &copy; 2026 <strong><a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a></strong>. This Feed is for personal non-commercial use only.</span><p>The post <a href="https://blog.dragonsoft.us/2010/03/01/crystal-reports-2010-rumors-are-out/">Crystal Reports 2010 &#8211; rumors are out</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.dragonsoft.us/2010/03/01/crystal-reports-2010-rumors-are-out/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1121</post-id>	</item>
		<item>
		<title>Crystal Reports 2008 and ASP.Net : speed up the first session</title>
		<link>https://blog.dragonsoft.us/2009/09/23/crystal-reports-2008-and-asp-net-speed-up-first-session/</link>
					<comments>https://blog.dragonsoft.us/2009/09/23/crystal-reports-2008-and-asp-net-speed-up-first-session/#comments</comments>
		
		<dc:creator><![CDATA[Serguei Dosyukov]]></dc:creator>
		<pubDate>Wed, 23 Sep 2009 12:21:04 +0000</pubDate>
				<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[Fun stuff with C#]]></category>
		<category><![CDATA[Web-design]]></category>
		<category><![CDATA[.net 2.0]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[certificate revocation List]]></category>
		<category><![CDATA[code access security]]></category>
		<category><![CDATA[crl]]></category>
		<category><![CDATA[crl.verisign.net]]></category>
		<category><![CDATA[crystal reports viewer]]></category>
		<category><![CDATA[generatePublisherEvidence]]></category>
		<category><![CDATA[Slow start up]]></category>
		<guid isPermaLink="false">http://blog.dragonsoft.us/?p=1010</guid>

					<description><![CDATA[<p>Did you ever noticed that after restart of the IIS ASP.Net page which has Crystal Reports Viewer would take much longer to come up? Some of it is expected since on initial start up, a number of Crystal assemblies and objects need to be created and this does take time. I<a class="moretag" href="https://blog.dragonsoft.us/2009/09/23/crystal-reports-2008-and-asp-net-speed-up-first-session/"> Read more</a></p>
<p>The post <a href="https://blog.dragonsoft.us/2009/09/23/crystal-reports-2008-and-asp-net-speed-up-first-session/">Crystal Reports 2008 and ASP.Net : speed up the first session</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Did you ever noticed that after restart of the IIS ASP.Net page which has Crystal Reports Viewer would take much longer to come up?</p>
<p>Some of it is expected since on initial start up, a number of Crystal assemblies and objects need to be created and this does take time.<br />
I want to emphasize that discussion below is related to the first run of any reports. We have to actually restart/reset IIS to see problem again.</p>
<blockquote><p>Note: There was a question about IIS&#8217; Application Pools recycling which could cause similar effect. Make sure your application pool <a href="http://support.microsoft.com/kb/332088" target="_blank">is set properly</a>.</p></blockquote>
<p><strong>Setting up a playground</strong></p>
<p>Let&#8217;s assume ASP.Net pages were already migrated to use .Net 3.x and look at what happen behind the scene.</p>
<p>Remember that after restart IIS starts from ground up. This means several things in respect to our page content:</p>
<ul>
<li>.Net assemblies need to be preloaded and validated if necessary.<br />
Since Crystal Reports 2008 comes as .Net 2.0-based core and we may already moved to .Net 3.x, CR2008 Engine and some additional files need to be loaded and validated aside from one which already used by any previously loaded pages.</li>
<li>For each session engine would create a cached version of RPT file in temp folder.</li>
<li>Some code would have to be brought to the client machine for Viewer to operate properly.</li>
<li>Database connection established, data retrieved, processed, paged and sent to the client Viewer.</li>
</ul>
<p>That about it, now we ready to work with reports. Please notice that after that initial load, any other reports would come up faster. We could even close the browser or use another browser (ex. go from IE to FF) and it would be still faster than the first time, so there is something important about the first step above&#8230;</p>
<p><strong>Combing the sand</strong></p>
<p>Let&#8217;s try to break the IIS initialization process to get more detailed view.</p>
<p>Since we already had some ASP.Net pages loaded before coming to CR related page, we could disregard .Net core initialization procedure. It is there on IIS side: used and ready.</p>
<p>Ok, next thing is CR engine related stuff. There is some 5Mb of files in <strong>crystalreportviewers12</strong> folder to support CR Viewer in ASP.Net and we need to send some of them over the network. In addition to that there is Crystal Reports Engine assemblies which need to be loaded by IIS at the time of the first use. And this is our spot to dig.</p>
<p>If we try and trace what exactly going on we would notice that aside from IIS loading a few dozen assemblies, there is also process associated with trying connect to CRL.VERISIGN.NET.</p>
<p><strong>What is it?</strong></p>
<p>&#8220;Problem&#8221; is that assemblies are Authenticode signed and therefore need to be verified or it technical terms they need to be checked against <a href="http://technet.microsoft.com/en-us/library/bb457027.aspx" target="_blank">Certificate Revocation List (CRL)</a> by <a href="http://msdn.microsoft.com/en-us/library/system.security.policy.publisher.aspx" target="_blank">Publisher</a> for <a href="http://msdn.microsoft.com/en-us/library/930b76w0.aspx" target="_blank">Code Access Security (CAS)</a>.</p>
<p>Default behavior is that they need to be verified by the certificate authority. If certificate is not present on the same machine (I have my doubts that SAP doing anything about that, but I could be wrong), validation need to be done via central repository mentioned above, or if machine does not have network/internet access the .NET thread might timeout waiting to connect.</p>
<blockquote><p>Yes, by performing strong name signing of assemblies or placing the CA certificate on the same machine issue would be avoided, but it seems not being a case.</p></blockquote>
<p><strong>Building the castle</strong></p>
<p>Since assemblies are provided by SAP, we cannot remove digital signature and it is a hassle to keep certificates current by obtaining them from CA every time they expire. Let&#8217;s concentrate on the Publisher mentioned above and turn it off.</p>
<blockquote><p><em>It is all-or-nothing solution since it would require turning off CRC for the entire IIS.</em></p></blockquote>
<p>When working with regular .Net apps, it can be done on the app level (assuming <a href="http://support.microsoft.com/kb/936707" target="_blank">we already have fix for .Net 2.0</a>) by adding the following section in &lt;Application&gt;.exe.config</p>
<pre class="brush: xml; title: ; notranslate">&lt;configuration&gt;
  &lt;runtime&gt;
    &lt;generatePublisherEvidence enabled=&quot;false&quot;/&gt;
  &lt;/runtime&gt;
&lt;/configuration&gt;</pre>
<p>This new element described in <a href="http://msdn.microsoft.com/en-us/library/bb629393.aspx" target="_blank">this MSDN article</a>. Interesting note there (why not to turn it then by default? Oh, security concerns&#8230; UAC anyone?):</p>
<blockquote><p>We recommend that services use the <span><span>&lt;generatePublisherEvidence&gt;</span></span> element to improve startup performance. Using this element can also help avoid delays that can cause a time-out and the cancellation of the service startup.</p></blockquote>
<p>Since there is no such config file for our ASP.Net app (web.config would not work here, because it defines settings that are only AppDomain wide and we need process wide for aspnet_isapi.dll being the hosting environment for the runtime), we would have to turn code access security (CAS) publisher policy off for the entire IIS.<br />
There are two options:</p>
<ul>
<li>Create a file called w3wp.exe.config (for IIS6, or aspnet_wp.exe.config for IIS5). This will affect all .NET based web applications on the system.</li>
<li>Or to specify this in machine.config, but then this affects every .NET application on the machine and is not available for override in individual Apps.</li>
</ul>
<p><strong>Adding the summer cabin</strong></p>
<p>There is one more step which could be taken to improve performance by preloading some of the core assemblies while site visitor is doing something else.<br />
I wouldn&#8217;t go into much details here, since it is implementation/application environment specific, but just give a hint:</p>
<ul>
<li>some other place in application, create a background process which would create CR document object, load some not essential report file, retrieve some data and then disapear without the trace. This would allow Crystal Reports Engine being initialized in the background offsetting time needed for the actual CR related page load. Don&#8217;t force garbage collection though, this may cancel desired effect.</li>
</ul>
<p><strong>Results</strong></p>
<p>In some situation I observed 50% to 70% drop in start-up time&#8230;<br />
Have fun!</p>
<hr/><span style="font-size: 7pt">Copyright &copy; 2026 <strong><a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a></strong>. This Feed is for personal non-commercial use only.</span><p>The post <a href="https://blog.dragonsoft.us/2009/09/23/crystal-reports-2008-and-asp-net-speed-up-first-session/">Crystal Reports 2008 and ASP.Net : speed up the first session</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.dragonsoft.us/2009/09/23/crystal-reports-2008-and-asp-net-speed-up-first-session/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1010</post-id>	</item>
		<item>
		<title>Expiration of CrystalReport Viewer pages with long running queries</title>
		<link>https://blog.dragonsoft.us/2009/06/23/expiration-of-crystalreport-viewer-pages-with-long-running-queries/</link>
					<comments>https://blog.dragonsoft.us/2009/06/23/expiration-of-crystalreport-viewer-pages-with-long-running-queries/#comments</comments>
		
		<dc:creator><![CDATA[Serguei Dosyukov]]></dc:creator>
		<pubDate>Tue, 23 Jun 2009 19:58:14 +0000</pubDate>
				<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[crystal reports viewer]]></category>
		<category><![CDATA[crystalreportviewer]]></category>
		<category><![CDATA[long running query]]></category>
		<category><![CDATA[page expired]]></category>
		<category><![CDATA[timeout]]></category>
		<guid isPermaLink="false">http://blog.dragonsoft.us/?p=988</guid>

					<description><![CDATA[<p>Wow! It worked&#8230; I continue my journey with Crystal Reports Viewer (CRV) inside ASP.Net pages. Topic of this post is to discuss problems and solutions related to long running queries in CRV. I would like to thank Daniel Paulsen from SAP team for his help resolving the issue discussed below.<a class="moretag" href="https://blog.dragonsoft.us/2009/06/23/expiration-of-crystalreport-viewer-pages-with-long-running-queries/"> Read more</a></p>
<p>The post <a href="https://blog.dragonsoft.us/2009/06/23/expiration-of-crystalreport-viewer-pages-with-long-running-queries/">Expiration of CrystalReport Viewer pages with long running queries</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Wow! It worked&#8230;</p>
<p>I continue my journey with Crystal Reports Viewer (CRV) inside ASP.Net pages.<br />
Topic of this post is to discuss problems and solutions related to long running queries in CRV.</p>
<p>I would like to thank Daniel Paulsen from SAP team for his help resolving the issue discussed below.</p>
<p><strong>What are we talking about here?</strong></p>
<p>As it usually happens at some point there is to much data/not optimal query/broken indexes/etc and it is takes significant time to return a result for CR report. As a result ASP.Net page with CRV start to throw errors, acts erratically, and overall strange.</p>
<p>Since we know that it is ASP.net and CRV uses page state and session information then we have usual suspects &#8211; <a href="http://msdn.microsoft.com/en-us/library/system.web.sessionstate.httpsessionstate.timeout.aspx" target="_blank">session timeout</a> and <a href="http://msdn.microsoft.com/en-us/library/e1f13641.aspx" target="_blank">execution timeout</a>.</p>
<p>Easy? Not so fast&#8230; Lets time our query &#8211; if it is more then 10 but less then 20 minutes then reason is not an ASP.Net timeout, but CR Engine timeouts.</p>
<p><strong>Crystal Reports Engine Timeouts</strong></p>
<p>Aside from timeouts imposed by .net infrastructure, there are two others which are introduced by Crystal Report itself.</p>
<p><strong>Symptoms:</strong></p>
<ul>
<li>Error similar to &#8216;Request timed out because there has been no reply from the server in N ms&#8217;</li>
<li>First Page of the report is displayed but attempt to go to the next page gives JS error related to invalid object ID</li>
<li>If report require parameter entry, they are requested again</li>
</ul>
<p><strong>Cause:</strong></p>
<p>Crystal Reports by default has a timeout of 10 minutes (600,000 ms) before deciding that no data is returned by the query.<br />
Depend on how code behind is implemented for the report page, timeout error may cause different problems and be hidden.</p>
<p><strong>Solution:</strong></p>
<p>Per Daniel&#8217;s suggestion I have changed the following settings to a bigger number and it did solve the problem for me</p>
<pre class="brush: plain; title: ; notranslate">HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Report Application Server\Client SDK\CorbaAdapter\WaitReplyTimeout = 600000

and

HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Report Application Server\InprocServer\EnterpriseRequestTimeout = 600000</pre>
<p><strong>Final Note:</strong></p>
<p>There are other settings which are allowed to be set for the CR engine as described in <a href="http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_dg_12_en.chm" target="_blank">Developer&#8217;s Guide for CR 2008</a> under &#8220;<strong>Configuring your Web.Config file</strong>&#8220;. It worth to know about some of them.</p>
<hr/><span style="font-size: 7pt">Copyright &copy; 2026 <strong><a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a></strong>. This Feed is for personal non-commercial use only.</span><p>The post <a href="https://blog.dragonsoft.us/2009/06/23/expiration-of-crystalreport-viewer-pages-with-long-running-queries/">Expiration of CrystalReport Viewer pages with long running queries</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.dragonsoft.us/2009/06/23/expiration-of-crystalreport-viewer-pages-with-long-running-queries/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">988</post-id>	</item>
		<item>
		<title>How to set default file name for export from CrystalReportViewer in ASP.Net</title>
		<link>https://blog.dragonsoft.us/2009/04/07/how-to-set-default-file-name-for-export-from-crystalreportviewer-in-aspnet/</link>
					<comments>https://blog.dragonsoft.us/2009/04/07/how-to-set-default-file-name-for-export-from-crystalreportviewer-in-aspnet/#comments</comments>
		
		<dc:creator><![CDATA[Serguei Dosyukov]]></dc:creator>
		<pubDate>Tue, 07 Apr 2009 20:20:57 +0000</pubDate>
				<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[crystalreportviewer]]></category>
		<category><![CDATA[set default export file name]]></category>
		<guid isPermaLink="false">http://blog.dragonsoft.us/?p=921</guid>

					<description><![CDATA[<p>I have had nice discussion about a new Crystal Reports based web-site today. And everything seems to be fine&#8230; Except users want to see a proper default name for the exported files&#8230; Environment: Crystal Reports 2008 engine IIS 7 ASP.Net 3.0 page with CrystalReportViewer (CRV) being used to show report<a class="moretag" href="https://blog.dragonsoft.us/2009/04/07/how-to-set-default-file-name-for-export-from-crystalreportviewer-in-aspnet/"> Read more</a></p>
<p>The post <a href="https://blog.dragonsoft.us/2009/04/07/how-to-set-default-file-name-for-export-from-crystalreportviewer-in-aspnet/">How to set default file name for export from CrystalReportViewer in ASP.Net</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I have had nice discussion about a new Crystal Reports based web-site today. And everything seems to be fine&#8230; Except users want to see a proper default name for the exported files&#8230;</p>
<p>Environment:</p>
<ul>
<li>Crystal Reports 2008 engine</li>
<li>IIS 7</li>
<li>ASP.Net 3.0 page with CrystalReportViewer (CRV) being used to show report passed by parameter</li>
</ul>
<p>When trying export as PDF (just an example), CRV defaults the name of the file to <em>CrystalReportViewer1.pdf.<br />
</em>Not very nice since associated RPT name is <em>MyVeryOwnReport.rpt</em> and I have many other which I would expect export file at least inherit.</p>
<p>One would expect that Viewer would have a property allowing specify default export name. Not so fast&#8230; there is no such thing today exists.</p>
<p>After some head scratching and research, it just happen that Default Export File Name is actually based of the ID property value of the CRV which is still named as CrystalReportViewer1.</p>
<p>Options?</p>
<ol>
<li>Rename ID value of the control as something else. Still, if we use just one page and load reports dynamically, then it would not help much.
<pre class="brush: csharp; title: ; notranslate">// ReportPreview.aspx file
&lt;CR:CrystalReportViewer ID=&quot;MyVeryOwnExportFile&quot; /&gt;</pre>
</li>
<li>Another option is to populate Default Export file name in the code
<pre class="brush: csharp; title: ; notranslate">// ReportPreview.aspx.cs file
protected void Page_Init(object sender, EventArgs e)
{
     ...
    // Load report here
    ...
    CrystalReportViewer1.ID = &quot;MyVeryOwnExportFile&quot;;
}</pre>
<p>It is important to have it set before any code would use it to manipulate a page view state and create references.</p>
</li>
<li>Trying <a href="http://msdn.microsoft.com/en-us/library/aa288404(VS.71).aspx" target="_blank">manually set export options</a> for the Report instance, would not help much unfortunately since viewer would disregard it.</li>
<li>Off course there is always an option of coding export functionality yourself and bypass built-in logic&#8230;</li>
</ol>
<p>This concludes another Crystal Reports dance session.</p>
<hr/><span style="font-size: 7pt">Copyright &copy; 2026 <strong><a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a></strong>. This Feed is for personal non-commercial use only.</span><p>The post <a href="https://blog.dragonsoft.us/2009/04/07/how-to-set-default-file-name-for-export-from-crystalreportviewer-in-aspnet/">How to set default file name for export from CrystalReportViewer in ASP.Net</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.dragonsoft.us/2009/04/07/how-to-set-default-file-name-for-export-from-crystalreportviewer-in-aspnet/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">921</post-id>	</item>
		<item>
		<title>CrystalReports: getting engine version</title>
		<link>https://blog.dragonsoft.us/2009/03/13/crystalreports-getting-engine-version/</link>
					<comments>https://blog.dragonsoft.us/2009/03/13/crystalreports-getting-engine-version/#respond</comments>
		
		<dc:creator><![CDATA[Serguei Dosyukov]]></dc:creator>
		<pubDate>Fri, 13 Mar 2009 12:34:02 +0000</pubDate>
				<category><![CDATA[Crystal Reports]]></category>
		<guid isPermaLink="false">http://blog.dragonsoft.us/?p=860</guid>

					<description><![CDATA[<p>When working on the new web-site which uses CrystalReports engine to display some reports, it is useful to know what version is used. Yes, we usually know what version of engine we have on development machine because of the level of the control we have. With production environment, it may<a class="moretag" href="https://blog.dragonsoft.us/2009/03/13/crystalreports-getting-engine-version/"> Read more</a></p>
<p>The post <a href="https://blog.dragonsoft.us/2009/03/13/crystalreports-getting-engine-version/">CrystalReports: getting engine version</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>When working on the new web-site which uses CrystalReports engine to display some reports, it is useful to know what version is used.</p>
<p>Yes, we usually know what version of engine we have on development machine because of the level of the control we have. With production environment, it may be not so obvious because it can be deployed by others. And at some point something may happen to the machine and environment was restored from the backup.</p>
<p>In all cases considered, to know what Run-time do we have at the moment without actually go and look at assemblies, may be very useful and quick check to determine the problem.</p>
<p>Since we are using .Net, it can be done easily by including version info into our ASP.Net page.<br />
Lets assume we have lbCrystalVersion Label control on the page, then in the Page_Load() the following code can be added to populate information needed:</p>
<pre class="brush: csharp; title: ; notranslate">lbCrystalVersion.Text = &quot;Crystal Reports: &quot; + typeof(CrystalDecisions.CrystalReports.Engine.ReportObject).Assembly.GetName().Version.ToString();</pre>
<p>As you can see, I am using ReportObject to determine current version.</p>
<p>In case of CrystalReports 2008 version displayed would be 12.0.2000.0</p>
<hr/><span style="font-size: 7pt">Copyright &copy; 2026 <strong><a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a></strong>. This Feed is for personal non-commercial use only.</span><p>The post <a href="https://blog.dragonsoft.us/2009/03/13/crystalreports-getting-engine-version/">CrystalReports: getting engine version</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.dragonsoft.us/2009/03/13/crystalreports-getting-engine-version/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">860</post-id>	</item>
		<item>
		<title>Crystal Reports Extension Methods Library</title>
		<link>https://blog.dragonsoft.us/2009/03/03/crystal-reports-extension-methods-library/</link>
					<comments>https://blog.dragonsoft.us/2009/03/03/crystal-reports-extension-methods-library/#respond</comments>
		
		<dc:creator><![CDATA[Serguei Dosyukov]]></dc:creator>
		<pubDate>Tue, 03 Mar 2009 12:05:04 +0000</pubDate>
				<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[check for parameter]]></category>
		<category><![CDATA[export into file]]></category>
		<category><![CDATA[extension methods]]></category>
		<category><![CDATA[get parameters as text]]></category>
		<category><![CDATA[set new database connection]]></category>
		<category><![CDATA[Set parameter]]></category>
		<guid isPermaLink="false">http://blog.dragonsoft.us/?p=838</guid>

					<description><![CDATA[<p>After using Crystal Reports for many years what always strikes me is that some of the methods available via API are not generic enough and require unnecessary repeated coding for simple things. Lately all my development, when in comes to reports, is based on Crystal Reports 2008  engine within ASP.Net/C# environment. While<a class="moretag" href="https://blog.dragonsoft.us/2009/03/03/crystal-reports-extension-methods-library/"> Read more</a></p>
<p>The post <a href="https://blog.dragonsoft.us/2009/03/03/crystal-reports-extension-methods-library/">Crystal Reports Extension Methods Library</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>After using Crystal Reports for many years what always strikes me is that some of the methods available via API are not generic enough and require unnecessary repeated coding for simple things.</p>
<p>Lately all my development, when in comes to reports, is based on Crystal Reports 2008  engine within ASP.Net/C# environment. While there are many improvements in the functionality available to developers, there are still things which could be done easier. So what do we do to make our job easier? We develop set of special classes, wrappers and libraries which would simplify work with Crystal Reports API.</p>
<p>But disadvantage of introducing yet another helper class, is that it is another helper class. We are loosing simple inheritance of the new functionality in API and make code even more complex.<br />
But there is a nice feature in .Net which helps avoid problem above &#8211; <a href="http://blogs.msdn.com/abhinaba/archive/2005/09/15/467926.aspx" target="_blank">Extension Methods</a> &#8211; it allows attach additional functionalities to an existing type/class even if you do not have access to the source for it.</p>
<p>Idea is then to keep using Crystal Report&#8217;s <em>ReportDocument</em> class and build on top of it by providing extra methods that can be useful when you want to integrate Crystal Reports in your .Net application.</p>
<blockquote><p><strong>Note #1.</strong> If you have ideas or suggestions for new methods, please let me know.<br />
<strong>Note #2.</strong>This is work in progress and new versions would be available in the future. You can always download the <a title="CrystalReportExtensions" href="http://www.dragonsoft.us/lib/crystal/CrystalReportExtensions.zip" target="_blank"><strong>latest version here</strong></a>.<br />
<strong>Note #3.</strong> Library is developed and tested for Visual Studio 2008 and Crystal Reports 2008 with SP1.<br />
<strong>Note #4</strong>. Code is self-documented using XMLDoc.</p></blockquote>
<p>In order to introduce new methods into your code, simply compile a provided assembly and add reference in your code. After that you should see new methods listed below available for each ReportDocument instance.</p>
<p>Currently included:</p>
<pre class="brush: csharp; title: ; notranslate">// Assign the connection info to all tables in the report
public static void AssignTableConnections(this ReportDocument reportDocument, ConnectionInfo  connectionInfo)

// Close opened report, otherwise throw exception
public static void CloseReport(this ReportDocument reportDocument)

// Export report into file of specified format
public static void Export(this ReportDocument reportDocument, string fileName,  CrystalDecisions.Shared.ExportFormatType exportFormatType)

// Checks if specified parameter is present in the report
public static bool HasReportParameter(this ReportDocument reportDocument, string paramName)

// Function returns list of parameters descriptions with associated
// values for specified report instance in the form of HTML code block
//  which then can be used in the report to display current parameter
public static string GetReportParamsAsText(this ReportDocument reportDocument)

// Set specified report parameter
public static void SetReportParameter(this ReportDocument reportDocument, string paramName, object paramValue)

// Load report and prepare database connection using provided Server, Database Names, and login info
public static void OpenReport(this ReportDocument reportDocument, string reportFile,  ConnectionInfoType type, string serverName, string databaseName,  bool integratedSecurity, string userName, string password)

public static void OpenReport(this ReportDocument reportDocument, string reportFile, ConnectionInfoType type, string serverName, string databaseName, string userName, string password)

public static void OpenReport(this ReportDocument reportDocument, string reportFile, ConnectionInfoType type, string serverName, string databaseName)

// Purge saved report data if present
public static void PurgeSavedData(this ReportDocument reportDocument)</pre>
<hr/><span style="font-size: 7pt">Copyright &copy; 2026 <strong><a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a></strong>. This Feed is for personal non-commercial use only.</span><p>The post <a href="https://blog.dragonsoft.us/2009/03/03/crystal-reports-extension-methods-library/">Crystal Reports Extension Methods Library</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.dragonsoft.us/2009/03/03/crystal-reports-extension-methods-library/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">838</post-id>	</item>
		<item>
		<title>Crystal Reports 2008 : hacking datetime parameter format &#8211; reloaded</title>
		<link>https://blog.dragonsoft.us/2008/12/31/crystal-reports-2008-hacking-datetime-parameter-format-reloaded/</link>
					<comments>https://blog.dragonsoft.us/2008/12/31/crystal-reports-2008-hacking-datetime-parameter-format-reloaded/#respond</comments>
		
		<dc:creator><![CDATA[Serguei Dosyukov]]></dc:creator>
		<pubDate>Wed, 31 Dec 2008 19:59:53 +0000</pubDate>
				<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[change datetime parameter format]]></category>
		<category><![CDATA[crystal reports 2008]]></category>
		<category><![CDATA[crystal reports viewer]]></category>
		<category><![CDATA[datetime as date]]></category>
		<category><![CDATA[datetime entry format]]></category>
		<guid isPermaLink="false">http://blog.dragonsoft.us/?p=713</guid>

					<description><![CDATA[<p>Few weeks ago I have wrote on how to hack Crystal Reports 2008 ASP.Net Viewer control to suppress time part in the parameter calendar control. With release of Service Pack 1 for Crystal Reports 2008, suggested solution no longer works since structure of the files has been changed. So I went<a class="moretag" href="https://blog.dragonsoft.us/2008/12/31/crystal-reports-2008-hacking-datetime-parameter-format-reloaded/"> Read more</a></p>
<p>The post <a href="https://blog.dragonsoft.us/2008/12/31/crystal-reports-2008-hacking-datetime-parameter-format-reloaded/">Crystal Reports 2008 : hacking datetime parameter format &#8211; reloaded</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="http://blog.dragonsoft.us/wp-content/uploads/2008/12/step1.png"></a>Few weeks ago I have wrote on <a href="http://blog.dragonsoft.us/2008/12/16/crystal-report…rameter-formatcrystal/" target="_self">how to hack Crystal Reports 2008 ASP.Net Viewer control to suppress time part</a> in the parameter calendar control.</p>
<p>With release of Service Pack 1 for Crystal Reports 2008, suggested solution no longer works since structure of the files has been changed.</p>
<p>So I went digging around again. Forgot to mention last time, but in situations like this, scripting debugging supported in Visual Studio really helps (if you are not familiar with JS debugging check following links <a href="http://weblogs.asp.net/scottgu/archive/2007/07/19/vs-2008-javascript-debugging.aspx" target="_blank">[1]</a> <a href="http://www.asp.net/learn/3.5-videos/video-219.aspx" target="_blank">[2]</a> for more info.</p>
<blockquote><p>Note. It is interesting to observe how code is changing over time. And after some analisys, I would say that SAP development team is one click away from adding ability to suppress time parts for datetime parameters: only one thing missing &#8211; new property on parameter level which would allow specify how to treat it (date, time or datetime). Question is if they will decide to do so.</p></blockquote>
<p>I will be using Visual Studio 2008 and run against my WebDev.WebServer.</p>
<p>After creating simple CrystalReports ASP.Net application with report which has datetime parameter, lets see what exactly is happening here.</p>
<p><a href="http://blog.dragonsoft.us/wp-content/uploads/2008/12/step1.png" target="_blank"><img decoding="async" class="size-thumbnail wp-image-715" style="margin-right: 10px;" title="Step 1" src="http://blog.dragonsoft.us/wp-content/uploads/2008/12/step1-150x150.png" alt="Step 1" width="150" height="150" /></a> <a href="http://blog.dragonsoft.us/wp-content/uploads/2008/12/step2.png" target="_blank"><img decoding="async" class="size-thumbnail wp-image-720" style="margin-right: 10px;" title="Step 2" src="http://blog.dragonsoft.us/wp-content/uploads/2008/12/step2-150x150.png" alt="Step 2" width="150" height="150" /></a></p>
<p>Let&#8217;s run an application up to the point when engine would request parameter values being entered (<a href="http://blog.dragonsoft.us/wp-content/uploads/2008/12/step1.png" target="_blank">Img 1</a>).</p>
<p>And then let&#8217;s open Solution Explorer in Visual Studio (<a href="http://blog.dragonsoft.us/wp-content/uploads/2008/12/step2.png" target="_blank">Img 2</a>).<br />
You would notice a few JavaScript files, where one we were looking for &#8211; <strong>promptengine_calendar2.js</strong>.</p>
<p>While having page open, dbl-click on the file in Solution Explorer and look around. (In my case actual file location is <em>C:\Windows\Microsoft.NET\Framework\v2.0.50727\ASP.NETClientFiles\crystalreportviewers12\prompting\js\</em>, but may vary.)</p>
<p>Internal Calendar control (which reside in Calendar.js file) relay on setShowTime method to manage visibility and behaviour of the calendar and this is where we will &#8220;hack&#8221; our way in.</p>
<p>As usual code below only highlights changes to the code in <em>promptengine_calendar2.js</em> file.<br />
This time I am making no changes to the data, only how it is displayed and extracted from the calendar control. And it seems to work much better then prior solution.<br />
Make sure you have the copy of original file backed up.</p>
<pre class="brush: jscript; title: ; notranslate">/** First, lets add one more variable to control data flow **/
    bobj.prompt.Calendar = function
    ...
       this.isDateTimeData = false;
    }
...
    /** While suppressing DateTime format we still need to know original type of the data **/
    setIsDateTime : function(isDateTime) {
       // this.isDateTime = isDateTime;
       this.isDateTimeData = isDateTime;
       this.isDateTime = false;
    },
...
    /** while suppressing time part, it is still need to be returned back in to parameter form **/
    _getStringValue : function(dateValue) {
        var format = this.isDateTime ? this.dateTimeFormat : this.dateFormat;

        if ((!this.isDateTime) &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp; this.isDateTimeData) {
                format = format + &#039; 00:00:00&#039;;
        }

        return  bobj.external.date.formatDate(dateValue, format);     
       
    },</pre>
<p>Changes are very isolated and allows a) hide time entry box and b) properly return data back into parameter form.</p>
<p>This solution is generic and applies to all datetime parameters visible. As a result, calendar control become for date entry only, while resetting time portion. User can still enter time part if necessary, but on the page level.</p>
<p>Again, make sure that file with changes we just made is replaced everywhere. Depend on your development and production environment you may have few other locations for it.</p>
<hr/><span style="font-size: 7pt">Copyright &copy; 2026 <strong><a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a></strong>. This Feed is for personal non-commercial use only.</span><p>The post <a href="https://blog.dragonsoft.us/2008/12/31/crystal-reports-2008-hacking-datetime-parameter-format-reloaded/">Crystal Reports 2008 : hacking datetime parameter format &#8211; reloaded</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.dragonsoft.us/2008/12/31/crystal-reports-2008-hacking-datetime-parameter-format-reloaded/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">713</post-id>	</item>
		<item>
		<title>Crystal Reports 2008, ASP.Net and impersonation</title>
		<link>https://blog.dragonsoft.us/2008/12/23/crystal-reports-2008-aspnet-and-impersonation/</link>
					<comments>https://blog.dragonsoft.us/2008/12/23/crystal-reports-2008-aspnet-and-impersonation/#comments</comments>
		
		<dc:creator><![CDATA[Serguei Dosyukov]]></dc:creator>
		<pubDate>Tue, 23 Dec 2008 14:28:17 +0000</pubDate>
				<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[access denied]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[broken images]]></category>
		<category><![CDATA[crystal reports 2008]]></category>
		<category><![CDATA[iis temp folder access]]></category>
		<category><![CDATA[iis temp folder failures]]></category>
		<category><![CDATA[impersonation]]></category>
		<category><![CDATA[load report failed]]></category>
		<category><![CDATA[reportclientdocumentclass]]></category>
		<category><![CDATA[temp folder]]></category>
		<guid isPermaLink="false">http://blog.dragonsoft.us/?p=677</guid>

					<description><![CDATA[<p>We have created our perfect reporting solution using Crystal Reports 2008 viewer control, tested everything, and  deployed it into production environment&#8230; and it is working&#8230; until Friday night&#8230; 🙁 Information below is provided for both IIS 6 and IIS 7 along with 32 and 64 bit Windows environment. Make sure<a class="moretag" href="https://blog.dragonsoft.us/2008/12/23/crystal-reports-2008-aspnet-and-impersonation/"> Read more</a></p>
<p>The post <a href="https://blog.dragonsoft.us/2008/12/23/crystal-reports-2008-aspnet-and-impersonation/">Crystal Reports 2008, ASP.Net and impersonation</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We have created our perfect reporting solution using Crystal Reports 2008 viewer control, tested everything, and  <a href="http://blog.dragonsoft.us/2008/10/29/how-to-deploy-crystal-reports-2008-project-part-2/" target="_self">deployed it into production environment</a>&#8230; and it is working&#8230; until Friday night&#8230; <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f641.png" alt="🙁" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<blockquote><p>Information below is provided for both IIS 6 and IIS 7 along with 32 and 64 bit Windows environment. Make sure that proper reference is used.</p></blockquote>
<p>For some strange reasons, things usually happen when nobody anticipate it anymore (usually about a week after an initial deployment).<br />
In addition, <a href="http://en.wikipedia.org/wiki/Creep_(project_management)" target="_blank">Project creep</a> situation may occurs: after usual management meeting, requirements are changed and some security measures are to be introduced.</p>
<p>Easy! &lt;IMPERSONATE&gt; option of ASP.Net&#8230; and this is where it become interesting.</p>
<p>There is slight small issue, locally developer is usually an administrator of the machine, where in production, s/he just regular user.</p>
<p>More testing&#8230; everything would be fine in development infrastructure and not cause any problems. But being released some strange errors may occur.</p>
<p><strong>Examples:</strong></p>
<ul>
<li>&#8220;Load Report Failed&#8221;</li>
<li>&#8220;System.Runtime.InteropServices.COMException: Invalid file name&#8221;</li>
<li>&#8220;Exception Details: System.Runtime.InteropServices.COMException: <span class="searchTerm">Access</span> is <span class="searchTerm">denied</span>.&#8221;</li>
</ul>
<p><strong>Hint: </strong>When reviewing ASP.Net Stack Trace (debug/trace mode needs to be enabled), first line may contain the following text &#8220;CrystalDecisions &#8230; ReportClientDocumentClass.Open&#8221;.</p>
<p><em>What is going on here?</em></p>
<h3>ASP.Net impersonation</h3>
<p>In default situation, ASP.NET impersonation is turned off and the resources can be accessed using a &#8220;local system process&#8221; account. Nothing needs to be done here, since initial installation of the IIS would have addressed it.<br />
But when impersonation is turned on, ASP.NET executes every resource using the account of a specified user who is authenticated when the user makes the request. If you specify the IUSR_machinename account to be used as the user account, then ASP.NET will behave like previous versions of ASP, in providing access to the resources (<a href="http://msdn.microsoft.com/en-us/library/ms998351.aspx" target="_blank">more</a>).</p>
<p>IIS impersonates users with its own IUSR account.<br />
In the case of ASP.NET, impersonation is used to decide whether the user&#8217;s request should be executed using the account of the requested user, or that of a local system-process account that ASP.NET uses for anonymous requests.</p>
<p>There are some rules applied when combination of impersonation and anonymous access is used in ASP.Net application:</p>
<ol>
<li>Impersonation is enabled:
<ul>
<li>Anonymous access is enabled in IIS &#8211; the request is made using the IUSR_machinename account.</li>
<li>Anonymous access is disabled in IIS &#8211; the request is made using the account of the authenticated user.</li>
</ul>
</li>
<li>Impersonation is disabled:
<ul>
<li>Anonymous access is enabled in IIS &#8211; the request is made using the system-level process account.</li>
<li>Anonymous access is disabled in IIS &#8211; the request is made using the account of the authenticated user.</li>
</ul>
</li>
<li>In either case &#8211; permissions for the account are checked in the Windows Access Control List (ACL) for the resource(s) that a user requests, and a resource is only available if the account they are running under is valid for that resource.</li>
</ol>
<p>Lets assume that the following settings are used</p>
<pre class="brush: xml; title: ; notranslate">&lt;system.web&gt;
  &lt;identity impersonate=&quot;true&quot; /&gt;
 &lt;!-- WS: Allow only Authenticated users --&gt;
 &lt;authorization&gt;
 &lt;!-- allow users=&quot;*&quot;/ --&gt;
    &lt;deny users=&quot;?&quot; /&gt;
  &lt;/authorization&gt;
&lt;/system.web&gt;</pre>
<p>In this mode ASP.NET impersonates the current Web user. It gets this token from IIS which passes this account token on the ISAPI thread that originally fires off this request.</p>
<p>We can go further and impersonate the process directly by specifying its identity:</p>
<pre class="brush: xml; title: ; notranslate">&lt;identity impersonate=&quot;true&quot; password=&quot;password&quot; userName=&quot;username&quot; /&gt;</pre>
<p>In this case access to any resource would be performed in the context of the user specified, instead of user associated with the session.<br />
To ensure the proper context, it can be verified with the following code:</p>
<pre class="brush: csharp; title: ; notranslate">// Returns the security identity of the current running thread
System.Security.Principal.WindowsIdentity.GetCurrent().Name

// Returns the identity of the user which session is belong to
WindowsIdentity.GetCurrent().Name</pre>
<p>As you can see, we need to ensure that all accounts involved have sufficient rights to access resources involved.</p>
<blockquote><p>Before going further, check if including an impersonation account in the default <a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/12a3d96c-65ea-4210-96ad-86a801f6a88c.mspx?mfr=true" target="_blank">IIS_WPG</a> user group would be sufficient before setting more complex scenario.</p></blockquote>
<h3>Crystal Reports effect</h3>
<p>Being an insight process, Crystal Reports engine would also require access to some additional file resources:</p>
<ol>
<li>Location of the report files</li>
<li>Local TEMP folder as described below</li>
</ol>
<p>Why User TEMP folders is involved? Why would Crystal Reports control in IIS need to access it?</p>
<p>Short answer &#8211; because CR engine keeps cache of report files for the session.<br />
Do a little experiment, without impersonation enabled, check Temp folders when report is visible in the Viewer.<br />
You would notice files appear and disappear there:</p>
<ul>
<li><em><strong>&lt;Report Name&gt; {GUID}.rpt</strong></em> is a cache of the report file for the session</li>
<li><strong>~cpe{GUID}.rpt</strong> is a cache of the report data view</li>
</ul>
<p>The location of TEMP folder may vary: <em>C:\WINDOWS\Temp</em> for older versions of Windows, or more elaborate &#8220;<em>C:\Documents and Settings\&#8230;</em>&#8221; and &#8220;<em>C:\Users\&#8230;</em>&#8221; in latest versions.<br />
And in case of user account specific variation, one would have to guess which user related folder has to checked.  With impersonation enabled and finding context of the call, we can now properly determine the location and required access level:</p>
<ul>
<li>Associated account should be allowed create/modify/delete files in TEMP folder.</li>
<li>For IIS 7.0, Temp folder location would be different.<br />
Proper default location would be %windir%\serviceprofiles\networkservice\AppData\Local\Temp as described <a href="http://blogs.iis.net/bills/archive/2006/10/18/loadUserProfile-and-IIS7-_2D00_-understanding-temporary-directory-failures.aspx" target="_blank">here</a>.</li>
</ul>
<h3>Limit CR Engine access to TEMP folder</h3>
<p> Described is default behavior, which could be adjusted to limit access to more relevant location.</p>
<p>Visit the following location:</p>
<blockquote><p><strong>HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Report Application Server\</strong><strong>InprocServer</strong></p>
<p>or in case of 64 bit Vista (not being familiar at first with new registry structure you may be surprised about this)</p>
<p><strong>HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Business Objects\Suite 12.0\Report Application Server\InprocServer</strong></p>
<p>then add/update the following value</p>
<p><strong>TempDir</strong>: String = &#8220;your folder&#8221;</p></blockquote>
<p>This will tell engine which folder to use. And then by granting proper permissions as discussed above it would solve the grand problem. Restart your web server and you should be good to go.</p>
<p>To validate that account has proper permissions for the folder specified, the following command can be used</p>
<blockquote><p>CACLS * /T &gt; output.txt<br />
being executed from command prompt it will create output.txt which contains list of permissions for the current folder</p></blockquote>
<h3>Notes:</h3>
<ol>
<li>Solution above can be used for any prior version of Crystal Reports, but may require minor adjustments.</li>
<li>Problem with permissions could also cause broken image links in the Viewer</li>
<li>Depend on configuration, permissions could be required for NETWORK SERVICE account and/or IIS_WPG group.</li>
</ol>
<hr/><span style="font-size: 7pt">Copyright &copy; 2026 <strong><a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a></strong>. This Feed is for personal non-commercial use only.</span><p>The post <a href="https://blog.dragonsoft.us/2008/12/23/crystal-reports-2008-aspnet-and-impersonation/">Crystal Reports 2008, ASP.Net and impersonation</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.dragonsoft.us/2008/12/23/crystal-reports-2008-aspnet-and-impersonation/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">677</post-id>	</item>
		<item>
		<title>Crystal Reports 2008 : hacking datetime parameter format</title>
		<link>https://blog.dragonsoft.us/2008/12/16/crystal-reports-2008-hacking-datetime-parameter-format/</link>
					<comments>https://blog.dragonsoft.us/2008/12/16/crystal-reports-2008-hacking-datetime-parameter-format/#respond</comments>
		
		<dc:creator><![CDATA[Serguei Dosyukov]]></dc:creator>
		<pubDate>Tue, 16 Dec 2008 16:27:43 +0000</pubDate>
				<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[change datetime parameter format]]></category>
		<category><![CDATA[crystal reports 2008]]></category>
		<category><![CDATA[crystal reports viewer]]></category>
		<category><![CDATA[datetime as date parameter]]></category>
		<category><![CDATA[datetime entry format]]></category>
		<guid isPermaLink="false">http://blog.dragonsoft.us/?p=668</guid>

					<description><![CDATA[<p>One would think that this should be a no-brainer : ability to specify an edit format for date/time parameter in Crystal Reports. Not so fast&#8230; Problem is as following: ASP.Net Web client with Crystal Reports Viewer control is used. When our report is based of some stored procedure which uses<a class="moretag" href="https://blog.dragonsoft.us/2008/12/16/crystal-reports-2008-hacking-datetime-parameter-format/"> Read more</a></p>
<p>The post <a href="https://blog.dragonsoft.us/2008/12/16/crystal-reports-2008-hacking-datetime-parameter-format/">Crystal Reports 2008 : hacking datetime parameter format</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>One would think that this should be a no-brainer : ability to specify an edit format for date/time parameter in Crystal Reports. Not so fast&#8230;</p>
<p>Problem is as following:</p>
<blockquote><p>ASP.Net Web client with Crystal Reports Viewer control is used.</p>
<p>When our report is based of some stored procedure which uses datetime parameter, it will inherit it as is and when report parameter entry form is displayed we would be asked to enter both date and time portion.</p></blockquote>
<p>While, in general, it is OK, some reports are really interested only in date part being entered and time should be always set to 00:00:00. So we are forced to type time every time because if it is not provided calendar control would try to set time part initially to current time.</p>
<p>After some research off the Internet, visiting SAP forums, it is appear to be engine limitation. But we would want to overcome it somehow.</p>
<p><em><strong>DISCLAIMER: solution below could only be used as a last resort and only if your business logic requires using date only params. And while it is only applies to calendar control, it is not per se a generic solution. This is a first &#8220;rough&#8221; attempt of achieving desired result and may lack some features otherwise expected.</strong></em></p>
<p><strong><em>It has been reported that solution above only works for current month. Since we are now using Crystal Reports 2008 with SP1, I would address this issue </em></strong><strong><em>in my new post below</em></strong><strong><em>.</em></strong></p>
<p><strong><em><span style="color: #ff0000;">IMPORTANT! With release of Service Pack 1 for Crystal Reports 2008, method blow is no longer applicable since structure of the files has changed. Please refer <a href="http://blog.dragonsoft.us/2008/12/31/crystal-report…ormat-reloadedcrystal-reports-2008-hacking-datetime-parameter-format-reloaded/" target="_self">to this new post for more information</a>.</span></em></strong></p>
<p>Otherwise, Where there is a will, there is a way&#8230;</p>
<p>Fortunately we have access to internals behind the parameter handlers in Crystal Report Viewer web control.</p>
<p>Navigate to one of following locations:</p>
<ul>
<li>C:\Inetpub\wwwroot\aspnet_client\system_web\2_0_50727\crystalreportviewers12\</li>
<li>C:\windows\Microsoft.NET\Framework\v2.0.50727\ASP.NETClientFiles\crystalreportviewers12\</li>
<li>C:\Program Files\Business Objects\Common\4.0\crystalreportviewers12\</li>
</ul>
<p>and locate the file called <strong>allInOne.js</strong> &#8211; this is our victim. This file contains all JS code behind for CRV control which would be used by your web-site.</p>
<p><em><strong>IMPORTANT: always create a backup copy before making any modifications.</strong></em></p>
<p><span id="more-668"></span></p>
<p>Remember that our objective is to ensure that when calendar control is used time part of date/time value is always set as 00:00:00. Let&#8217;s add a new function to <strong>bobj.crv.Calendar</strong> object</p>
<pre class="brush: jscript; title: ; notranslate">/**
 * Reset time part of datetime to 00:00:00
 */
bobj.crv.Calendar._resetTime = function(date) {
    var newdate = this._copyDate(date);
    newdate.setHours(0);
    newdate.setMinutes(0);
    newdate.setSeconds(0);
    newdate.setMilliseconds(0);
    return newdate;
}</pre>
<p>In my case I have put it just before bobj.crv.Calendar.justInTimeInit = function()  (line 39792).</p>
<p>As you can see the main purpose of the function is create a copy of date value with time portion being reset to desired time.</p>
<p>Now we would be looking for any instance in the code where the following substring is present</p>
<blockquote><p><strong>_timeField.setValue</strong></p></blockquote>
<p>We would find 3 functions where the following adjustment would be made:</p>
<pre class="brush: jscript; title: ; notranslate">bobj.crv.Calendar.justInTimeInit = function() {
...
    // mod: reset time
    this.date = this._resetTime(this.date);
    // mod
    this._timeField.setValue(bobj.external.date.formatDate(this.date, this._curTimeFormat));
...
}
...
bobj.crv.Calendar.justInTimeInit = function(){
...
    // mod: reset time
    this.date = this._resetTime(this.date);
    // mod
    this._timeField.setValue(bobj.external.date.formatDate(this.date, this._curTimeFormat));
...
}
...
bobj.crv.Calendar._onTimeChange = function() {
...
    if (date) {
        this._curTimeFormat = format;
        // mod: reset time
        date = this._resetTime(date);
        // mod
        this.date.setHours(date.getHours());
...
    else {
        // mod: reset time
        this.date = this._resetTime(this.date);
        // mod
...
}
...
bobj.crv.Calendar.setDate = function(date) {
    // mod: assign and reset time
    this.date = this._resetTime(date);
...
}</pre>
<p>After all changes above are done, we would get a calendar control which &#8220;keeps time at bay&#8221;. This only affects calendar itself and not an edit control associated with the parameter. As a result we can still adjust time if choose to do so.</p>
<p>Last step would be to ensure that all allInOne.js file instances are in sync and we got desired functionality.</p>
<hr/><span style="font-size: 7pt">Copyright &copy; 2026 <strong><a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a></strong>. This Feed is for personal non-commercial use only.</span><p>The post <a href="https://blog.dragonsoft.us/2008/12/16/crystal-reports-2008-hacking-datetime-parameter-format/">Crystal Reports 2008 : hacking datetime parameter format</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.dragonsoft.us/2008/12/16/crystal-reports-2008-hacking-datetime-parameter-format/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">668</post-id>	</item>
		<item>
		<title>Tip: Get report parameters as text from Crystal Reports in C#</title>
		<link>https://blog.dragonsoft.us/2008/10/31/tip-get-report-parameters-as-text-from-crystal-reports-in-c/</link>
					<comments>https://blog.dragonsoft.us/2008/10/31/tip-get-report-parameters-as-text-from-crystal-reports-in-c/#respond</comments>
		
		<dc:creator><![CDATA[Serguei Dosyukov]]></dc:creator>
		<pubDate>Fri, 31 Oct 2008 15:12:36 +0000</pubDate>
				<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[get parameters as text]]></category>
		<guid isPermaLink="false">http://blog.dragonsoft.us/?p=563</guid>

					<description><![CDATA[<p>I am starting a new set of posts presenting small code snippets in C# you could use when working with Crystal Reports in Visual Studio. And the first one is &#8220;GetReportParamsAsText&#8220;. Very simple but very handy function which allows to include report parameters values in your ASP.Net page without actually<a class="moretag" href="https://blog.dragonsoft.us/2008/10/31/tip-get-report-parameters-as-text-from-crystal-reports-in-c/"> Read more</a></p>
<p>The post <a href="https://blog.dragonsoft.us/2008/10/31/tip-get-report-parameters-as-text-from-crystal-reports-in-c/">Tip: Get report parameters as text from Crystal Reports in C#</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I am starting a new set of posts presenting small code snippets in C# you could use when working with Crystal Reports in Visual Studio.</p>
<p>And the first one is &#8220;<strong>GetReportParamsAsText</strong>&#8220;. Very simple but very handy function which allows to include report parameters values in your ASP.Net page without actually displaying the report.<br />
This version works only with Discrete Value parameters. </p>
<pre class="brush: csharp; title: ; notranslate">/// Function returns list of paramaters descriptions with
/// associated values for specified report
public string GetReportParamsAsText(ReportDocument reportDocument)
{
    if (reportDocument == null) return &quot;Report not specified&quot;;

    string result = &quot;&quot;;
    string description;
    string valueText;
    ParameterDiscreteValue value;

    foreach (ParameterFieldDefinition prm
                  in reportDocument.DataDefinition.ParameterFields)
    {
        try
        {
            if (prm.CurrentValues.IsNoValue) continue;

            if (prm.CurrentValues&#x5B;0] is ParameterDiscreteValue)
            {
                value = (ParameterDiscreteValue)prm.CurrentValues&#x5B;0];
                if (description.StartsWith(&quot;Enter &quot;))
                {
                    description = description.Remove(0, 6);
                }
                valueText = value.Value.ToString();
            }
            else
            {
                valueText = &quot;&#x5B;not supported param type]&quot;;
            }

            result += &quot;&lt;strong&gt;&quot; + description + &quot;&lt;/strong&gt; &quot; + valueText + &quot;
&quot;;
        }
        catch
        {
            // Ignore any errors
        }
    }
    return result;
}</pre>
<hr/><span style="font-size: 7pt">Copyright &copy; 2026 <strong><a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a></strong>. This Feed is for personal non-commercial use only.</span><p>The post <a href="https://blog.dragonsoft.us/2008/10/31/tip-get-report-parameters-as-text-from-crystal-reports-in-c/">Tip: Get report parameters as text from Crystal Reports in C#</a> appeared first on <a href="https://blog.dragonsoft.us">Dragonsoft Technology View</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.dragonsoft.us/2008/10/31/tip-get-report-parameters-as-text-from-crystal-reports-in-c/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">563</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Minified using Disk
Database Caching 16/89 queries in 0.076 seconds using Disk

Served from: blog.dragonsoft.us @ 2026-04-22 11:41:29 by W3 Total Cache
-->