<?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>Cogniza &#187; Business Objects Enterprise</title>
	<atom:link href="http://cogniza.com/wordpress/category/business-objects-enterprise/feed/" rel="self" type="application/rss+xml" />
	<link>http://cogniza.com/wordpress</link>
	<description>Business-Intelligence Specialists</description>
	<lastBuildDate>Sat, 30 Apr 2011 13:22:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>BusinessObjects SDK: Change a Universe&#039;s Data Connection</title>
		<link>http://cogniza.com/wordpress/2009/11/12/businessobjects-sdk-change-a-universes-data-connection/</link>
		<comments>http://cogniza.com/wordpress/2009/11/12/businessobjects-sdk-change-a-universes-data-connection/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 15:47:11 +0000</pubDate>
		<dc:creator>Craig Buchanan</dc:creator>
				<category><![CDATA[Business Objects Enterprise]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[VB.Net]]></category>
		<category><![CDATA[BusinessObjects-SDK]]></category>

		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=128</guid>
		<description><![CDATA[Change a Universe&#8217;s Data Connection without using the Universe COM SDK.

'get the Universe infoObjects
Dim universeInfoObject As InfoObject = infoStore.Query("SELECT SI_ID, SI_NAME, SI_DATACONNECTION FROM CI_APPOBJECTS WHERE SI_ID=" &#038; )(1)
'cast InfoObject into a Universe
Dim universe As BusinessObjects.Enterprise.Desktop.Universe = CType(universeInfoObject, Universe)
With universe
    'clear all data connections
    .DataConnections.Clear()
    'add new [...]]]></description>
			<content:encoded><![CDATA[<p>Change a Universe&#8217;s Data Connection without using the Universe COM SDK.<span id="more-128"></span></p>
<p><code><br />
'get the Universe infoObjects<br />
Dim universeInfoObject As InfoObject = infoStore.Query("SELECT SI_ID, SI_NAME, SI_DATACONNECTION FROM CI_APPOBJECTS WHERE SI_ID=" &#038; <info Object Id>)(1)</p>
<p>'cast InfoObject into a Universe<br />
Dim universe As BusinessObjects.Enterprise.Desktop.Universe = CType(universeInfoObject, Universe)</p>
<p>With universe<br />
    'clear all data connections<br />
    .DataConnections.Clear()</p>
<p>    'add new data connection<br />
    .DataConnections.Add(<data Connection Id>)</p>
<p>    'save to repository<br />
    .Save()<br />
End With</p>
<p></data></info></code></p>
]]></content:encoded>
			<wfw:commentRss>http://cogniza.com/wordpress/2009/11/12/businessobjects-sdk-change-a-universes-data-connection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BusinessObjects SDK: Copy one InfoObject&#039;s File to Another InfoObject</title>
		<link>http://cogniza.com/wordpress/2009/11/12/businessobjects-sdk-copy-one-infoobjects-file-to-another-infoobject/</link>
		<comments>http://cogniza.com/wordpress/2009/11/12/businessobjects-sdk-copy-one-infoobjects-file-to-another-infoobject/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 15:32:55 +0000</pubDate>
		<dc:creator>Craig Buchanan</dc:creator>
				<category><![CDATA[Business Objects Enterprise]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[VB.Net]]></category>
		<category><![CDATA[BusinessObjects-SDK]]></category>

		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=123</guid>
		<description><![CDATA[Use the BusinessObjects SDK to copy files between two InfoObjects.  This is useful when the source is a 'template' object (e.g. Crystal Report) that will be deployed to one or more targets.]]></description>
			<content:encoded><![CDATA[<p>Use the BusinessObjects SDK to copy files between two InfoObjects.  This is useful when the source is a &#8216;template&#8217; object (e.g. Crystal Report) that will be deployed to one or more targets.<span id="more-123"></span></p>
<p><code><br />
'get the source and target infoObjects<br />
Dim sourceInfoObject As InfoObject = infoStore.Query("SELECT SI_ID, SI_NAME, SI_FILES FROM CI_INFOOBJECTS WHERE SI_ID=" &#038; sourceId)(1)</p>
<p>Dim targetInfoObject As InfoObject =  infoStore.Query("SELECT SI_ID, SI_NAME, SI_FILES FROM CI_INFOOBJECTS WHERE SI_ID=" &#038; targetId)(1)</p>
<p>'get the desired file from FRS<br />
Dim sourceFile As File = sourceInfoObject.Files(1)</p>
<p>'create buffer and size appropriately<br />
Dim buffer As Byte() = new Byte(sourceFile.Size) {}</p>
<p>'copy file to buffer<br />
sourceFile.CopyTo(buffer)</p>
<p>'get the target file from the FRS, using the same index as the source<br />
Dim targetFile As File = targetInfoObject.Files(sourceFile.NthFile)</p>
<p>'copy buffer to target file<br />
targetFile.Overwrite(buffer)</p>
<p>'save to repository<br />
targetInfoObject.Save<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://cogniza.com/wordpress/2009/11/12/businessobjects-sdk-copy-one-infoobjects-file-to-another-infoobject/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crystal Reports: Strategy to Localize a Report (labels)</title>
		<link>http://cogniza.com/wordpress/2009/07/09/crystal-reports-strategy-to-localize-a-report-labels/</link>
		<comments>http://cogniza.com/wordpress/2009/07/09/crystal-reports-strategy-to-localize-a-report-labels/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 15:05:06 +0000</pubDate>
		<dc:creator>Craig Buchanan</dc:creator>
				<category><![CDATA[Business Objects Enterprise]]></category>
		<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Localization]]></category>

		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=55</guid>
		<description><![CDATA[Create a Crystal Report that dynamically recalculate its labels based on the Workstation&#8217;s localization settings.

ContentLocale
Crystal Reports XI introduced a keyword named &#8216;ContentLocale&#8217;. This keyword returns the machine&#8217;s locale setting (e.g. &#8216;en_US&#8217; for English (US)).  This value is set in Windows&#8217; Regional Settings Control Panel.
However, this keyword can only be used in formulae that are executed [...]]]></description>
			<content:encoded><![CDATA[<p>Create a Crystal Report that dynamically recalculate its labels based on the Workstation&#8217;s localization settings.</p>
<p><span id="more-55"></span></p>
<h3>ContentLocale</h3>
<p>Crystal Reports XI introduced a keyword named &#8216;ContentLocale&#8217;. This keyword returns the machine&#8217;s locale setting (e.g. &#8216;en_US&#8217; for English (US)).  This value is set in Windows&#8217; Regional Settings Control Panel.</p>
<p>However, this keyword can only be used in formulae that are executed during the report&#8217;s <a href="http://www.cogniza.com/blog/?p=12">Second Pass</a>. The following Record Selection Formula, for example, will generate an error:</p>
<p><code>{my_table.localeName}=ContentLocale </code></p>
<h3>Custom Functions</h3>
<p>This keyword, however, can be used in combination with a Report Custom Function to dynamically and transparently apply localization settings when a report is viewed, even reports that have been saved with data or have been scheduled using Business Objects Enterprise.</p>
<p>//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
// Return a localized string for a given Key and Language.<br />
//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Function (Stringvar Key, Stringvar Language)</p>
<p>//define array of keys that are used by Formula fields<br />
Stringvar Array Keys:=["COUNTRY","REGION","CITY"];</p>
<p>//define an array of localized strings for each required language; ensure localized strings are same position as the Key array (correlated arrays).</p>
<p>//determine which array to use<br />
Stringvar Array Values;<br />
Select Language<br />
Case &#8220;en_US&#8221;: Values:=["Country","State","City"]<br />
Case &#8220;it_IT&#8221;: Values:=["Paese","Dichiari","Citta"]<br />
Case &#8220;fr_FR&#8221;: Values:=["Pays","S","C"]<br />
Default: Values:=["Country","State","City"]<br />
;</p>
<p>//set value&#8217;s default value to the Key; useful for debugging purposes.<br />
Stringvar value:=Key;</p>
<p>//iterate through Key array&#8230;<br />
Numbervar i;<br />
for i := 1 To Ubound(Keys) do (<br />
//if value in array matches the specified value, return the value from the localized array<br />
if Keys[i] = Key then (<br />
value:=Values[i];<br />
exit for<br />
)<br />
);</p>
<p>//return value<br />
value;</p>
<h3>Formula Fields</h3>
<p>Create a Formula Field that will act as a label for each desired Key.  Add it to the report&#8217;s canvas.</p>
<p>//{@Country}<br />
getLocalizedString (&#8220;COUNTRY&#8221;, ContentLocale)</p>
<p>//{@Region}<br />
getLocalizedString (&#8220;REGION&#8221;, ContentLocale)</p>
<p>//{@City}<br />
getLocalizedString (&#8220;CITY&#8221;, ContentLocale)</p>
<h4>Advantages</h4>
<ul>
<li>Rapid development and deployment.</li>
<li>Executes during &#8216;view&#8217; time.</li>
<li>Can be saved to Repository and shared with other reports.</li>
</ul>
<h4>Limitations</h4>
<ul>
<li>Crystal Reports is required to maintain the logic and publish changes to the Repository.</li>
<li>Array of Key/Values limited to 1000 items.</li>
</ul>
<h3>Summary</h3>
<p>This approach should help ease the burden of localizing the labels contained in a Crystal Report.</p>
<h3>Download</h3>
<p><a href="/wordpress/wp-content/Report Localization [custom function].12.000.rpt" target="_new">Sample report</a><br />
<a href="/wordpress/wp-content/xtreme.zip" target="_new">Sample database</a></p>
]]></content:encoded>
			<wfw:commentRss>http://cogniza.com/wordpress/2009/07/09/crystal-reports-strategy-to-localize-a-report-labels/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Crystal Reports: Display a Message When Report Has No Data</title>
		<link>http://cogniza.com/wordpress/2007/08/28/crystal-reports-display-a-message-when-report-has-no-data/</link>
		<comments>http://cogniza.com/wordpress/2007/08/28/crystal-reports-display-a-message-when-report-has-no-data/#comments</comments>
		<pubDate>Tue, 28 Aug 2007 16:47:04 +0000</pubDate>
		<dc:creator>Craig Buchanan</dc:creator>
				<category><![CDATA[Business Objects Enterprise]]></category>
		<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Business Objects]]></category>

		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=98</guid>
		<description><![CDATA[Often it is desirable to display a message, such as 'No matching records', when a report does not contain data. Unfortunately, Crystal Reports does not have a function to easily identify this state.]]></description>
			<content:encoded><![CDATA[<p>Often it is desirable to display a message, such as &#8216;No matching records&#8217;, when a report does not contain data.  Unfortunately, Crystal Reports does not have a function to easily identify this state.</p>
<p><span id="more-98"></span></p>
<p>Fortunately, this functionality can be approximated by building a formula that manually counts the records.  This formula, excuted during the report&#8217;s &#8216;WhileReadingRecords&#8217; phase, will increment a Global variable.  To work correctly, this formula will need to reside in the report&#8217;s Details section.</p>
<p>To build a report that uses this functionality, follow these steps:</p>
<ol>
<li>Create a formula named &#8216;Records&#8217;.</li>
<li>Set the formula&#8217;s text to be:<br />
<code>//Excute this formula as records are read into the report<br />
WhileReadingRecords;<br />
//define a variable that is available throughout the 'main' report<br />
Global Numbervar Records;<br />
//increment the variable<br />
Records:=Records+1;<br />
</code></li>
<li>Place this field in the report&#8217;s Details section.  Suppress the field by checking &#8216;Suppress&#8217; check box on the Format Editor&#8217;s Common tab.</li>
<li>Create a new Page Header section by right-clicking the Page Header section and choose &#8216;Insert Section Below&#8217; from the context menu.</li>
<li>Right-click the newly-created Page Header and choose &#8216;Section Expert&#8230;&#8217; from the context menu.  Check the &#8216;Underlay Following Sections&#8217; checkbox.</li>
<li>Click the Conditional-Formula Editory button to the right of the &#8216;Suppress&#8217; checkbox.  Set the formula&#8217;s text to:<br />
<code>//If the field isn't null, suppress the section; the field will only be null when<br />
//the report does not contain data.<br />
Not(Isnull({@Records}))<br />
</code></li>
<li>Add a Text Object to the report containing the desired message.  Place the Text Object in the newly-created Page Header section.</li>
<li>Test the report.</li>
</ol>
<p><a href="/wordpress/wp-content/uploads/2007/08/usa.pdf" target="_new" class="attachmentlink">Report with Data</a></p>
<p><a href="/wordpress/wp-content/uploads/2007/08/united-states.pdf" target="_new" class="attachmentlink">Report without Data</a></p>
<p><a href="/wordpress/wp-content/uploads/2007/08/no-matching-records-template115.zip" class="attachmentlink">Sample Report</a></p>
]]></content:encoded>
			<wfw:commentRss>http://cogniza.com/wordpress/2007/08/28/crystal-reports-display-a-message-when-report-has-no-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crystal Reports: Common Files Directories</title>
		<link>http://cogniza.com/wordpress/2007/02/15/crystal-reports-common-files-directories/</link>
		<comments>http://cogniza.com/wordpress/2007/02/15/crystal-reports-common-files-directories/#comments</comments>
		<pubDate>Thu, 15 Feb 2007 14:49:15 +0000</pubDate>
		<dc:creator>Craig Buchanan</dc:creator>
				<category><![CDATA[Business Objects Enterprise]]></category>
		<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[Business Objects]]></category>

		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=97</guid>
		<description><![CDATA[The location of the Crystal Reports 'Shared' directory has changed over time. When deploying applications that use Crystal Reports, ensure that exporting, user-function library (UFL), and database DLLs are located in the appropriate directory for the version of Crystal Reports that is being used.]]></description>
			<content:encoded><![CDATA[<p>The location of the Crystal Reports &#8216;Shared&#8217; directory has changed over time. When deploying applications that use Crystal Reports, ensure that exporting, user-function library (UFL), and database DLLs are located in the appropriate directory for the version of Crystal Reports that is being used.<span id="more-97"></span></p>
<table>
<tr>
<th>Name</th>
<th>Location</th>
</tr>
<tr>
<td>Crystal Reports 4, 4.5, 5, 6 ,7, 8</td>
<td>&lt;drive&gt;:\WINNT\crystal</td>
</tr>
<tr>
<td>Crystal Reports 8.5</td>
<td>
<ul>
<li>&lt;drive&gt;:\WINNT\crystal</li>
<li>&lt;drive&gt; :\Program Files\Seagate Software\Shared</li>
<li>&lt;drive&gt; :\Program Files\Common Files\Crystal Decisions\2.0\Bin\</li>
</ul>
</td>
</tr>
<tr>
<td>Crystal Reports 9</td>
<td>&lt;drive&gt;:\Program Files\Common Files\Crystal Decisions\2.0\Bin</td>
</tr>
<tr>
<td>Crystal Reports 10</td>
<td>&lt;drive&gt;:\Program Files\Common Files\Crystal Decisions\2.5\Bin</td>
</tr>
<tr>
<td>Crystal Reports.Net 10.2</td>
<td>&lt;drive&gt;:\Program Files\Common Files\Business Objects\2.7\Bin</td>
</tr>
<tr>
<td>Crystal Reports XI</td>
<td>&lt;drive&gt;:\Program Files\Common Files\Business Objects\3.0\bin</td>
</tr>
<tr>
<td>Crystal Reports XI R2</td>
<td>&lt;drive&gt;:\Program Files\Business Objects\common\3.5\bin</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://cogniza.com/wordpress/2007/02/15/crystal-reports-common-files-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Business Objects Enterprise: Create a Dynamic List of Date Ranges</title>
		<link>http://cogniza.com/wordpress/2006/05/24/business-objects-enterprise-create-a-dynamic-list-of-date-ranges/</link>
		<comments>http://cogniza.com/wordpress/2006/05/24/business-objects-enterprise-create-a-dynamic-list-of-date-ranges/#comments</comments>
		<pubDate>Wed, 24 May 2006 17:38:23 +0000</pubDate>
		<dc:creator>Craig Buchanan</dc:creator>
				<category><![CDATA[Business Objects Enterprise]]></category>
		<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Business Objects]]></category>
		<category><![CDATA[Business View]]></category>
		<category><![CDATA[Date/Time]]></category>
		<category><![CDATA[Parameters]]></category>

		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=61</guid>
		<description><![CDATA[Add a dynamic, date-range parameter to a report which includes the most recent 12 months, plus Crystal Reports' Month-to-Date and Year-to-Date ranges.]]></description>
			<content:encoded><![CDATA[<p>Add a dynamic, date-range parameter to a report which includes the most recent 12 months, plus Crystal Reports&#8217; Month-to-Date and Year-to-Date ranges.</p>
<p><a href="/wordpress/wp-content/uploads/2006/05/Date-Range%20Parameter.png" target="_new"><img src="/wordpress/wp-content/uploads/2006/05/Date-Range%20Parameter.png" alt="Date-Range Parameter" id="image62" border="0" height="90" width="128" /></a><span id="more-61"></span></p>
<h2>Objective</h2>
<p>Give the report</p>
<h2>Instructions</h2>
<h3>Create the Sql Server Components</h3>
<p>A Sql Server user-defined function (see <a href="http://www.cogniza.com/wordpress/2006/05/25/sql-server-dateranges-function" target="_new">Sql Server: DateRanges Function</a>) will dynamically create the values that are needed for the this project. This function needs a Sql Server view (see <a href="http://www.cogniza.com/wordpress/2006/05/25/sql-server-getnow-view" target="_new">Sql Server: GetNow View</a>) to generate the system&#8217;s current date/time.</p>
<h3>Create Data Connection</h3>
<ol>
<li>Open the Business View Manager and log in.</li>
<li>Create a new Data Connection.</li>
<li>Configure the Data Connection to attach to the appropriate Sql Server database.</li>
<li>Save the Data Connection as &#8216;Sql Server DC&#8217;.</li>
</ol>
<h3>Create a Data Foundation</h3>
<ol>
<li>In the Business View Manager, create a Data Foundation.</li>
<li>Select &#8216;Sql Server DC&#8217; as the Data Connection.</li>
<li>Save the Data Foundation as &#8216;Sql Server DF&#8217;.</li>
</ol>
<h3>Create a Business View</h3>
<ol>
<li>In the Business View Manager, create a Business View.</li>
<li>Save the Business View as &#8216;Sql Server BV&#8217;.</li>
</ol>
<h3>Create a Command Object</h3>
<ol>
<li>Create a Command Object in the Data Foundation. Add the following text to the Command Object:</li>
<p><code>SELECT *<br />
FROM dbo.DateRanges()<br />
ORDER BY Sequence DESC </code></p>
<li>Save the Command Object as &#8216;DateRanges&#8217;.</li>
</ol>
<p><a href="/wordpress/wp-content/uploads/2006/05/Create%20Command%20Object.png" target="_new"><img src="/wordpress/wp-content/uploads/2006/05/Create%20Command%20Object.thumbnail.png" alt="Create Command Object" id="image65" border="0" height="80" width="128" /></a></p>
<p><a href="/wordpress/wp-content/uploads/2006/05/Data%20Foundation.png" target="_new"><img src="/wordpress/wp-content/uploads/2006/05/Data%20Foundation.thumbnail.png" alt="Data Foundation" id="image75" border="0" height="94" width="128" /></a></p>
<h3>Create a Business Element</h3>
<ol>
<li>Create a new Business Element in the Business View Manager.</li>
<li>Add the Description and Value fields from the &#8216;DateRanges&#8217; Command Object.</li>
<li>Save the Business Element as &#8216;DateRanges&#8217;.</li>
</ol>
<p><a href="/wordpress/wp-content/uploads/2006/05/Business%20Element.png" target="_new"><img src="/wordpress/wp-content/uploads/2006/05/Business%20Element.thumbnail.png" alt="Business Element" id="image63" border="0" height="94" width="128" /></a></p>
<h3>Add Business Element to Business View</h3>
<ol>
<li>Open the Business View.</li>
<li>From the &#8216;Insert&#8217; menu, select &#8216;Insert Business Elements&#8230;&#8217;.</li>
<li>Locate and select the &#8216;DateRanges&#8217; Business Element, click &#8216;Add&#8217;, then &#8216;Close&#8217;.</li>
</ol>
<p><a href="/wordpress/wp-content/uploads/2006/05/Business%20View.png" target="_new"><img src="/wordpress/wp-content/uploads/2006/05/Business%20View.thumbnail.png" alt="Business View" id="image64" border="0" height="94" width="128" /></a></p>
<h3>Create the List of Values</h3>
<ol>
<li>Create a new List of Value in the Business View Manager.</li>
<li>Select the desired Business View from the &#8216;Select Business View&#8217; window.</li>
<li>Enter &#8216;Date Range LoV&#8217; in the &#8216;Name&#8217; textbox.</li>
<li>Expand the &#8216;DateRanges&#8217; Business Element in the &#8216;Available Fields&#8217; list.</li>
<li>Select &#8216;Value&#8217;, then click the &#8216;&gt;&#8217; button.</li>
<li>Check &#8216;Sort by Value in Descending Order&#8217;.</li>
<li>Choose &#8216;Description&#8217; from the &#8216;Description Field&#8217; dropdown list.</li>
<li>Click &#8216;OK&#8217; to save the List of Values.</li>
</ol>
<p><a href="/wordpress/wp-content/uploads/2006/05/Create%20List%20of%20Values.png" target="_new"><img src="/wordpress/wp-content/uploads/2006/05/Create%20List%20of%20Values.thumbnail.png" alt="Create List of Values" id="image66" border="0" height="96" width="112" /></a></p>
<h3>Examine Repository</h3>
<p>Open the Repository Explorer in the Business View Manager.  The list of objects for the Date Range Parameter should resemble this list:</p>
<p><a href="/wordpress/wp-content/uploads/2006/05/Repository%20Explorer.png" target="_new"><img src="/wordpress/wp-content/uploads/2006/05/Repository%20Explorer.thumbnail.png" alt="Repository Explorer" id="image76" border="0" height="96" width="111" /></a></p>
<h3>Create the Dynamic Parameter</h3>
<ol>
<li>Create a new report using Crystal Reports XI.</li>
<li>Connect to the Repository that contains the &#8216;Sql Server BV&#8217; Business View.</li>
<li>Create a new parameter, named &#8216;Date Range&#8217;.  Leave the &#8216;Prompt Group Text&#8217; textfield blank.</li>
<li>Select &#8216;Dynamic&#8217; from the &#8216;List of Values&#8217; dropdown list.</li>
<li>Select the Existing radio button and choose &#8216;Date Range LoV&#8217; from the list.</li>
<li>Click &#8216;Create Parameter&#8217; in the &#8216;Parameters&#8217; column of the &#8216;Choose a Data Source&#8217; group.</li>
<li>Set &#8216;Prompt Text&#8217; to &#8216;Choose Date Range&#8217;.</li>
<li>Set &#8216;Sort Order&#8217; to &#8216;Descending by Value&#8217;.</li>
<li>Set &#8216;Prompt With Description Only&#8217; to &#8216;True&#8217;.</li>
<li>Click &#8216;OK&#8217; to save the parameter.</li>
</ol>
<p><a href="/wordpress/wp-content/uploads/2006/05/Create%20Parameter.png" target="_new"><img src="/wordpress/wp-content/uploads/2006/05/Create%20Parameter.Thumbnail.png" alt="Create Parameter" id="image67" border="0" height="96" width="114" /></a></p>
<h3>Modify the Report</h3>
<ol>
<li>Add the CDateTime Custom Function to the report (see <a href="http://www.cogniza.com/blog/?p=77" title="Crystal Reports: CDateRange Function">Crystal Reports: CDateTime</a>).</li>
<li>Add a Custom Function named &#8216;getDateRange&#8217; (see below) to the report.</li>
<li>Edit the Record Selection Formula. Add the following code:<br />
<code>//set the database field to the value that is extracted from the 'Date Range' parameter<br />
{table.date_field} IN getDateRange({?Date Range})</code></li>
<li>Add a formula field to display the date range.  Add the following code to the formula:<br />
<code>CStr(Minimum(getDateRange ({?Date Range}))) + " - " + CStr(Maximum(getDateRange ({?Date Range})))</code><br />
Add the formula field to the report.</li>
</ol>
<h2>Summary</h2>
<p>When the report is run, the parameter form will resemble:</p>
<p><a href="/wordpress/wp-content/uploads/2006/05/Date-Range%20Parameter.png" target="_new"><img src="/wordpress/wp-content/uploads/2006/05/Date-Range%20Parameter.png" alt="Date-Range Parameter" id="image62" border="0" height="90" width="128" /></a></p>
<p><a href="/wordpress/wp-content/uploads/2006/05/Dynamic%20Date-Range%20Parameter.zip" id="p70">Dynamic Date-Range Parameter Sample</a></p>
<h2>getDateRange Custom Function</h2>
<p><code> '--------------------------------------------------------------------------------<br />
'Author:        Craig <a href="mailto:Buchanan;craig.buchanan@cogniza.com" style="color: #ffcc33" class="linkification-ext" title="Linkification: mailto:Buchanan;craig.buchanan@cogniza.com">Buchanan;craig.buchanan@cogniza.com</a><br />
'Purpose:       Convert a string value into its equivalent Date Range<br />
'Parameters:    text - a string in the format index;startDate:endDate<br />
'               or index;NamedDateRange<br />
'               e.g. 1;1/1/2006:12/31/2006 or 2;MonthToDate<br />
'Returns:       Date Range<br />
'--------------------------------------------------------------------------------<br />
Function getDateRange (text as string) As Date Range<br />
If Instr(text,";")=0 Then Exit Function<br />
Dim value as string: value = Split(text,";")(2)<br />
If Instr(value,":")=0 Then<br />
getDateRange = CDateRange (value)<br />
Else<br />
Dim startDate as Date: startDate = Cdate(Split(value,":")(1))<br />
dim endDate as Date: endDate = cdate(Split(value,":")(2))<br />
getDateRange = startDate to endDate<br />
End If<br />
End Function</code></p>
]]></content:encoded>
			<wfw:commentRss>http://cogniza.com/wordpress/2006/05/24/business-objects-enterprise-create-a-dynamic-list-of-date-ranges/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Crystal Reports: ShellSort() Function</title>
		<link>http://cogniza.com/wordpress/2005/11/07/crystal-reports-shellsort/</link>
		<comments>http://cogniza.com/wordpress/2005/11/07/crystal-reports-shellsort/#comments</comments>
		<pubDate>Mon, 07 Nov 2005 14:57:12 +0000</pubDate>
		<dc:creator>Craig Buchanan</dc:creator>
				<category><![CDATA[Business Objects Enterprise]]></category>
		<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Business Objects]]></category>

		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=27</guid>
		<description><![CDATA[Sort an array of numbers using the Shell sort algorythm.]]></description>
			<content:encoded><![CDATA[<p>Sort an array of numbers using the Shell sort algorythm.  This sorting algorythm will quickly sort arrays in Crystal Reports.</p>
<p><span id="more-27"></span>  <code> Function ShellSort(Values() As Number)<br />
</code></p>
<blockquote><p>&#8216;exit if array has no elements<br />
If Ubound(Values)=0 Then Exit Function</p>
<p>&#8216;account for optional arguments<br />
Dim LastElement As number<br />
LastElement = UBound(Values)</p>
<p>&#8216;Crystal Reports&#8217; arrays are 1-based.<br />
Dim FirstElement As Number<br />
FirstElement = 1</p>
<p>Dim Elements As Number<br />
Elements = LastElement &#8211; FirstElement + 1</p>
<p>&#8216;find the best value for distance<br />
Dim distance As Number<br />
Do</p></blockquote>
<blockquote><p>distance = distance * 3 + 1</p></blockquote>
<p>Loop Until distance &gt; Elements</p>
<p>Dim temp as number<br />
Dim index As Number, index2 As Number</p>
<p>Do</p>
<blockquote><p>distance = distance \ 3<br />
For index = distance + FirstElement To LastElement</p></blockquote>
<blockquote><p>temp = Values(index)<br />
index2 = index</p>
<p>Do While (Values(index2 &#8211; distance) &gt; temp)</p></blockquote>
<blockquote><p>Values(index2) = Values(index2 &#8211; distance)<br />
index2 = index2 &#8211; distance<br />
If index2 &#8211; distance &lt; FirstElement Then Exit Do</p></blockquote>
<p>Loop</p>
<p>Values(index2) = temp</p>
<p>Next<br />
Loop Until distance = 1</p>
<p>ShellSort=Values<br />
End Function</p>
<h2>Parameters</h2>
<dl>
<dt><em>Values</em></dt>
<dd>An array of numbers.</dd>
</dl>
<h2>Return Value</h2>
<p>A sorted array of numbers</p>
<h2>Remarks</h2>
<p>Arrays in Crystal Reports are limit to 1000 elements.</p>
<h2>Example</h2>
<p>//create an array of numbers<br />
Numbervar Array numbers:=[44,2,77,4,9,1,0,55,3];</p>
<p>//sort the array<br />
numbers:=ShellSort(numbers);</p>
<p>//returns 0,1,2,3,4,9,44,55,77,<br />
numbervar i;</p>
<p>stringvar t;<br />
for i := 1 to ubound(numbers) do</p>
<blockquote><p>t:=t &amp; cstr(numbers[i],0) &amp; &#8220;,&#8221;;</p></blockquote>
<p>t;</p>
<h2>Requirements</h2>
<p>This function requires the use of Basic Syntax.</p>
]]></content:encoded>
			<wfw:commentRss>http://cogniza.com/wordpress/2005/11/07/crystal-reports-shellsort/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crystal Reports: Using SQL Expression Fields</title>
		<link>http://cogniza.com/wordpress/2005/11/07/crystal-reports-using-sql-expression-fields/</link>
		<comments>http://cogniza.com/wordpress/2005/11/07/crystal-reports-using-sql-expression-fields/#comments</comments>
		<pubDate>Mon, 07 Nov 2005 14:15:37 +0000</pubDate>
		<dc:creator>Craig Buchanan</dc:creator>
				<category><![CDATA[Business Objects Enterprise]]></category>
		<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=26</guid>
		<description><![CDATA[This article discusses the syntax requirements for SQL Expression fields.]]></description>
			<content:encoded><![CDATA[<p>This document discusses the syntax requirements for SQL Expression fields.</p>
<p><span id="more-26"></span>The contents of a SQL Expression field is any valid SQL statement that returns a scalar value. The resulting SQL is added to the report&#8217;s SELECT clause. For example:<br />
<code><br />
SELECT	PAT_NAME,HOSP_ADMSN_TIME,HOSP_DISCH_TIME,<br />
--SQL Expression<br />
(<br />
SELECT	MAX(HOSP_DISCH_TIME)<br />
FROM	PAT_ENC_HSP PAT_ENC_HSP2<br />
WHERE	PAT_ENC_HSP2.PAT_ID=PAT_ENC_HSP.PAT_ID<br />
AND	PAT_ENC_HSP2.PAT_ENC_CSN_ID &lt; PAT_ENC_HSP.PAT_ENC_CSN_ID<br />
)<br />
--/SQL Expression<br />
FROM	PAT_ENC_HSP<br />
</code></p>
<h2>Limitations</h2>
<p>SQL Expression fields may only return a scalar value (one column and one row).<br />
Parameter fields may not be used in SQL Expressions.</p>
<h2>Features</h2>
<p>A database [Oracle|SQL Server|Sybase] scalar function may be used in a SQL Expression field.<br />
Case statements may be used in SQL Expression fields. For example (Oracle syntax):<br />
<code><br />
(<br />
CASE<br />
WHEN PAT_ENC_HSP.HOSP_DISCH_TIME IS NULL THEN<br />
'F'<br />
WHEN PAT_ENC_HSP.HOSP_DISCH_TIME &gt;= PAT_ENC_HSP.HOSP_ADMSN_TIME-7 THEN<br />
'T'<br />
ELSE<br />
'F'<br />
END<br />
)<br />
</code></p>
<h2>Syntax</h2>
<p>The SQL statement needs to be enclosed in parenthesis:<br />
<code><br />
(<br />
SELECT	MAX(HOSP_DISCH_TIME)<br />
FROM	PAT_ENC_HSP PAT_ENC_HSP2<br />
WHERE	PAT_ENC_HSP2.PAT_ID=PAT_ENC_HSP.PAT_ID<br />
AND	PAT_ENC_HSP2.PAT_ENC_CSN_ID &lt; PAT_ENC_HSP.PAT_ENC_CSN_ID<br />
)<br />
</code></p>
<p>Double-quotation marks aren&#8217;t required if tables in the main query aren&#8217;t aliased:<br />
<code><br />
(<br />
--will compile<br />
SELECT	MAX(HOSP_DISCH_TIME)<br />
FROM	PAT_ENC_HSP PAT_ENC_HSP2<br />
WHERE	PAT_ENC_HSP2.PAT_ID=PAT_ENC_HSP.PAT_ID<br />
AND	PAT_ENC_HSP2.PAT_ENC_CSN_ID &lt; PAT_ENC_HSP.PAT_ENC_CSN_ID<br />
)</code></p>
<p>(<br />
&#8211;will compile<br />
SELECT	MAX(&#8220;HOSP_DISCH_TIME&#8221;)<br />
FROM	&#8220;PAT_ENC_HSP&#8221; &#8220;PAT_ENC_HSP2&#8243;<br />
WHERE	&#8220;PAT_ENC_HSP2&#8243;.&#8221;PAT_ID&#8221;=&#8221;PAT_ENC_HSP&#8221;.&#8221;PAT_ID&#8221;<br />
AND	&#8220;PAT_ENC_HSP2&#8243;.&#8221;PAT_ENC_CSN_ID&#8221; &lt; &#8220;PAT_ENC_HSP&#8221;.&#8221;PAT_ENC_CSN_ID&#8221;<br />
)<br />
Double-quotation marks are required if tables in the main query are aliased:<br />
<code><br />
(<br />
--will compile<br />
SELECT	MAX(HOSP_DISCH_TIME)<br />
FROM	PAT_ENC_HSP PAT_ENC_HSP_<br />
WHERE	PAT_ENC_HSP2.PAT_ID="PAT_ENC_HSP_alias".PAT_ID<br />
AND	PAT_ENC_HSP2.PAT_ENC_CSN_ID &lt; "PAT_ENC_HSP_alias".PAT_ENC_CSN_ID<br />
)</code></p>
<p>(<br />
&#8211;will not compile<br />
SELECT	MAX(HOSP_DISCH_TIME)<br />
FROM	PAT_ENC_HSP PAT_ENC_HSP_<br />
WHERE	PAT_ENC_HSP2.PAT_ID=PAT_ENC_HSP_alias.PAT_ID<br />
AND	PAT_ENC_HSP2.PAT_ENC_CSN_ID &lt; PAT_ENC_HSP_alias.PAT_ENC_CSN_ID<br />
)<br />
When using aggregate functions in the SQL Expression, do not include the &#8216;local&#8217; table&#8217;s alias:<br />
<code><br />
(<br />
--will not compile<br />
SELECT	MAX(PAT_ENC_HSP2.HOSP_DISCH_TIME)<br />
FROM	PAT_ENC_HSP PAT_ENC_HSP2<br />
WHERE	PAT_ENC_HSP2.PAT_ID=PAT_ENC_HSP.PAT_ID<br />
AND	PAT_ENC_HSP2.PAT_ENC_CSN_ID &lt; PAT_ENC_HSP.PAT_ENC_CSN_ID<br />
)</code></p>
<p>(<br />
&#8211;will compile<br />
SELECT	MAX(HOSP_DISCH_TIME)<br />
FROM	PAT_ENC_HSP PAT_ENC_HSP2<br />
WHERE	PAT_ENC_HSP2.PAT_ID=PAT_ENC_HSP.PAT_ID<br />
AND	PAT_ENC_HSP2.PAT_ENC_CSN_ID &lt; PAT_ENC_HSP.PAT_ENC_CSN_ID<br />
)<br />
When using aggregate functions in the SQL Expression, you can include the &#8216;main&#8217; query&#8217;s table&#8217;s alias:<br />
<code><br />
(<br />
--will compile<br />
SELECT	MAX(PAT_ENC_HSP.HOSP_DISCH_TIME)<br />
FROM	PAT_ENC_HSP PAT_ENC_HSP2<br />
WHERE	PAT_ENC_HSP2.PAT_ID=PAT_ENC_HSP.PAT_ID<br />
AND	PAT_ENC_HSP2.PAT_ENC_CSN_ID &lt; PAT_ENC_HSP.PAT_ENC_CSN_ID<br />
)<br />
</code></p>
<p>If you are using a SQL Expression as a subquery and wish to link it to the detail row of your main report, do not include the table you wish to link to in the FROM clause of the subquery. For example:<br />
<code><br />
(<br />
SELECT	MAX("IP_FLWSHT_MEAS_SP"."MEAS_VALUE")<br />
FROM	IP_FLWSHT_MEAS IP_FLWSHT_MEAS_SP,<br />
IP_FLWSHT_REC IP_FLWSHT_REC_SP<br />
WHERE	"IP_FLWSHT_MEAS_SP"."FLO_MEAS_ID" in ('11')<br />
AND	"IP_FLWSHT_MEAS_SP"."FSD_ID" = "IP_FLWSHT_REC_SP"."FSD_ID"<br />
AND	"IP_FLWSHT_REC_SP"."INPATIENT_DATA_ID" = "PAT_ENC_HSP"."INPATIENT_DATA_ID"<br />
)<br />
</code></p>
<p>The above query links to the PAT_ENC_HSP table in the main report by linking to the INPATIENT_DATA_ID field. To accomplish this, PAT_ENC_HSP is omitted from the FROM clause in the query.</p>
]]></content:encoded>
			<wfw:commentRss>http://cogniza.com/wordpress/2005/11/07/crystal-reports-using-sql-expression-fields/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>UflTimezone &#8211; General Mills Case Study</title>
		<link>http://cogniza.com/wordpress/2004/04/27/ufltimezone-general-mills-case-study/</link>
		<comments>http://cogniza.com/wordpress/2004/04/27/ufltimezone-general-mills-case-study/#comments</comments>
		<pubDate>Tue, 27 Apr 2004 13:02:49 +0000</pubDate>
		<dc:creator>Craig Buchanan</dc:creator>
				<category><![CDATA[Business Objects Enterprise]]></category>

		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=38</guid>
		<description><![CDATA[General Mills Case Study
&#8220;We had four developers with four ways of converting Remedy date storage format to human readable format. None worked properly.&#8221;
&#8220;The Cogniza UFLTimeZone functions immediately solved the problem. We were fixing all reports Remedy date fields with every spring into daylight savings and fall coming out.&#8221;
&#8220;With over 130 reports with Remedy dates, UFLTimeZone [...]]]></description>
			<content:encoded><![CDATA[<h1>General Mills Case Study</h1>
<p>&#8220;We had four developers with four ways of converting Remedy date storage format to human readable format. None worked properly.&#8221;</p>
<p>&#8220;The Cogniza UFLTimeZone functions immediately solved the problem. We were fixing all reports Remedy date fields with every spring into daylight savings and fall coming out.&#8221;</p>
<p>&#8220;With over 130 reports with Remedy dates, UFLTimeZone paid for itself after as soon as all the reports were converted; within a month, daylight savings ended (and summer time in the UK) and we didn&#8217;t have to tweek any of the reports.&#8221;</p>
<p>&#8220;Users noticed right away. They had gotton use to wrong reports for a couple weeks until developers could work through fixing all reports.&#8221;</p>
<p>&#8220;Within weeks of converting to using Cogniza&#8217;s UFLTimeZone for Crystal Reports, other internal developers of Crystal Reports noticed we solved our problem and asked to use the functions too.&#8221;</p>
<p>&#8220;I&#8217;d recommend UFLTimeZone for Crystal Reports to anyone struggling with the limitiations of the Remedy ODBC driver or those frustrated with trying to convert dates by using Crystal formulas.&#8221;</p>
<p>Gary Ledo<br />
Program Manager<br />
Information Systems Operations Services<br />
General Mills, Inc.</p>
]]></content:encoded>
			<wfw:commentRss>http://cogniza.com/wordpress/2004/04/27/ufltimezone-general-mills-case-study/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cogniza announces the release of UFLTimeZone for Crystal Reports.</title>
		<link>http://cogniza.com/wordpress/2002/06/17/cogniza-announces-the-release-of-ufltimezone-for-crystal-reports/</link>
		<comments>http://cogniza.com/wordpress/2002/06/17/cogniza-announces-the-release-of-ufltimezone-for-crystal-reports/#comments</comments>
		<pubDate>Mon, 17 Jun 2002 16:34:11 +0000</pubDate>
		<dc:creator>Craig Buchanan</dc:creator>
				<category><![CDATA[Business Objects Enterprise]]></category>
		<category><![CDATA[Crystal Reports]]></category>
		<category><![CDATA[Remedy ARS]]></category>
		<category><![CDATA[Business Objects]]></category>
		<category><![CDATA[Date/Time]]></category>
		<category><![CDATA[Timezone]]></category>
		<category><![CDATA[UFL]]></category>

		<guid isPermaLink="false">http://www.cogniza.com/blog/?p=24</guid>
		<description><![CDATA[Cogniza announces the release of UFLTimeZone for Crystal Reports.  UFLTimeZone for Crystal Reports provides date and time zone conversion functions that give new options when using Crystal Reports with Remedy’s Action Request (AR) System.]]></description>
			<content:encoded><![CDATA[<p><em>For Immediate Release</em></p>
<p>Monday, June 17, 2002 &#8211; Cogniza announces the release of UFLTimeZone for Crystal Reports.  UFLTimeZone for Crystal Reports provides date and time zone conversion functions that give new options when using Crystal Reports with Remedy’s Action Request (AR) System.  To understand the value of this new product, some background on Remedy is appropriate.</p>
<p><span id="more-24"></span></p>
<h2>Background</h2>
<p>Remedy AR System, from Peregrine Systems, stores dates in ‘Epoch date’ format.  An Epoch date is the number of elapsed seconds since January 1, 1970 at Midnight Greenwich Mean Time.  To provide a more human-understandable value, the Remedy ODBC driver converts this value to the familiar date and time format, using the user’s regional settings, including time zone and seasonal adjustments (e.g. Daylight Savings).</p>
<h2>Challenges</h2>
<p>One of the challenges for developers, however, when working with Remedy’s AR System is the one-table-per-query restriction imposed by the Remedy ODBC driver.  When working with Crystal Reports and Remedy, this restriction prevents more that one table or view from being used in a report.<br />
To address this issue when using Crystal Reports within the Remedy ODBC driver, developers use sub-reports or request that the Remedy System Administrator creating a join table in the Remedy database.  These solutions, while addressing the immediate need, lead to decreased database and report performance, increased report development time and increased demands on the Remedy System Administrator’s time.  Fortunately, there is another solution to these challenges!</p>
<h2>Solution</h2>
<p>The solution to the issue is to use a database driver, supplied by Crystal Reports or the database vendor, in conjunction with the functions provided by UFLTimeZone for Crystal Reports.  Essentially, UFLTimeZone for Crystal Reports provides the Epoch date and time zone conversion functions that would have been provided by the Remedy ODBC driver.</p>
<h3>Features</h3>
<p>UFLTimeZone for Crystal Reports offers these features:<br />
•	Conversions between Epoch dates and Windows date times.<br />
•	Epoch date and Windows’ date time adjustments for any of the world’s 75 time zones.<br />
•	Automatic adjustments for any of the world’s seasonal variations (e.g. Daylight Savings in North America).</p>
<h3>Benefits</h3>
<p>The benefits to using UFLTimeZone for Crystal Reports in conjunction with a non-Remedy ODBC driver are:<br />
•	Decrease the demands on the Remedy System Administrator’s time by eliminating Remedy Join Forms<br />
•	Reduce the number of Remedy client licenses, by generating reports externally from the Remedy client<br />
•	Reduce report development time, by using the latest version of Crystal Reports, Crystal Enterprise or Seagate Info</p>
<h2>Free Trial</h2>
<p>To download a 30-day-trial version of UFLTimeZone for Crystal Reports, visit <a href="http://www.cogniza.com/products/ufltimezone/UFLTimeZoneW_30.exe" style="color: #ffcc33" class="linkification-ext" title="Linkification: http://www.cogniza.com/products/ufltimezone/UFLTimeZoneW_30.exe">http://www.cogniza.com/products/ufltimezone/UFLTimeZoneW_30.exe</a>.</p>
<h2>About Cogniza</h2>
<p>Founded in 1996, Cogniza is a US company, headquartered in Minneapolis, Minnesota.</p>
]]></content:encoded>
			<wfw:commentRss>http://cogniza.com/wordpress/2002/06/17/cogniza-announces-the-release-of-ufltimezone-for-crystal-reports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

