<?xml version="1.0" encoding="iso-8859-1" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwizguide.info/rss_namespace/">
 <channel>
  <title>Crystal Reports Forum : Writing Code</title>
  <link>http://www.crystalreportsbook.com/forum</link>
  <description>This is an XML content feed of; Crystal Reports Forum : Writing Code : Last 10 Posts</description>
  <pubDate>Fri, 11 Sep 2026 07:10:03 +0000</pubDate>
  <lastBuildDate>Mon, 20 Apr 2020 05:47:12 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 8.04</generator>
  <ttl>30</ttl>
  <WebWizForums:feedURL>www.crystalreportsbook.com/forum/RSS_topic_feed.asp?FID=12</WebWizForums:feedURL>
  <item>
   <title>Writing Code : .NET questions</title>
   <link>http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22864&amp;PID=74881#74881</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.crystalreportsbook.com/forum/member_profile.asp?PF=28">hilfy</a><br /><strong>Subject:</strong> .NET questions<br /><strong>Posted:</strong> 20 Apr 2020 at 5:47am<br /><br />I haven't done this in Power Shell, however, I hope I can point you in the right direction.<br /><br />1.  I would replace "HasRecords" with "Refresh" to run the report.<br /><br />2.  To get to the parameters for the subreport, you actually have to walk through the sections of the report in code to find the subreports and pull the parameters from individual subreports just like you're doing for the main report.  In fact, I'm surprised your report is even running because I don't see where you're setting the credentials for the database connections, which you also have to do for each subreport as well as the main report.<br /><br />-Dell]]>
   </description>
   <pubDate>Mon, 20 Apr 2020 05:47:12 +0000</pubDate>
   <guid isPermaLink="true">http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22864&amp;PID=74881#74881</guid>
  </item> 
  <item>
   <title>Writing Code : .NET questions</title>
   <link>http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22864&amp;PID=74874#74874</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.crystalreportsbook.com/forum/member_profile.asp?PF=24808">hello</a><br /><strong>Subject:</strong> .NET questions<br /><strong>Posted:</strong> 12 Mar 2020 at 5:02am<br /><br />Hello:<br /><br />I was hoping there where a few .NET gurus here that could help me understand some basic programming using the CRYSTALDECISIONS.SHARED and CRYSTALDECISIONS.ENGINE assemblies.<br /><br />First off, here is my Powershell code to load a report, set parameters, and then displays the parameters for viewing on the screen.<br /><br /><br />&#091;reflection.assembly&#093;::LoadWithPartialName('CrystalDecisions.Shared')<br />&#091;reflection.assembly&#093;::LoadWithPartialName('CrystalDecisions.CrystalReports.Engine')<br /><br />$report = New-Object CrystalDecisions.CrystalReports.Engine.ReportDocument<br />$report.Load("C:\TEMPLATE.rpt")<br /><br /><br />#hard code prompted values here<br />$customer = '065447'<br />$location = 1000<br />$locationsToExclude = 0<br />$range = New-Object CrystalDecisions.Shared.ParameterRangeValue<br />$range.StartValue = 1<br />$range.EndValue = 999<br /><br />#main report parameter mapping<br />$report.SetParameterValue("Parent",$customer)<br />$report.SetParameterValue("Location",$location)<br />$report.SetParameterValue("@LocationsToExclude",$locationsToExclude)<br />$report.SetParameterValue("LocationRange",$range)<br /><br />#sub reports parameter mapping<br />$report.SetParameterValue("Pm-SHIPMENT.PRO",'FB_Pointer.PRO')<br /><br />$report.HasRecords<br /><br />#$parameterField = New-Object CrystalDecisions.Shared.ParameterField<br /><br />foreach ($parameterField in $report.DataDefinition.ParameterFields)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write-output "The current value of:"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $parameterField.Name<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write-output "In report:"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $parameterField.ReportName<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write-output "is:"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $parameterField.CurrentValues.Value<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write-output "Of kind:"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $parameterField.DiscreteOrRangeKind<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write-output "-------------------"<br />}<br /><br /><br />QUESTION 1<br />What exactly does HASRECORDS do? If I leave out that line, the report has no data and is blank.  Is HASRECORDS basically an 'execute' command?<br /><br />QUESTION 2<br />The FOREACH loop at the end simply shows parameter values for each parameter, but the parameters on the sub report never show anything.  How do I access the values of the sub reports?<br /><br /><br />Thanks for any input.]]>
   </description>
   <pubDate>Thu, 12 Mar 2020 05:02:41 +0000</pubDate>
   <guid isPermaLink="true">http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22864&amp;PID=74874#74874</guid>
  </item> 
  <item>
   <title>Writing Code : ReportDocument.SummaryInfo.Template</title>
   <link>http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4616&amp;PID=74413#74413</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.crystalreportsbook.com/forum/member_profile.asp?PF=28">hilfy</a><br /><strong>Subject:</strong> ReportDocument.SummaryInfo.Template<br /><strong>Posted:</strong> 11 Feb 2019 at 7:06am<br /><br />Or it may not be available.  I would go to https://answers.sap.com/tags/01200314690800000341 on the SAP Community to try to get an answer. Questions in the SAP Crystal Reports tag are read by some of the support folks from SAP and they would probably be able to answer this for you.<br /><br />-Dell]]>
   </description>
   <pubDate>Mon, 11 Feb 2019 07:06:00 +0000</pubDate>
   <guid isPermaLink="true">http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4616&amp;PID=74413#74413</guid>
  </item> 
  <item>
   <title>Writing Code : ReportDocument.SummaryInfo.Template</title>
   <link>http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4616&amp;PID=74401#74401</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.crystalreportsbook.com/forum/member_profile.asp?PF=8671">kevlray</a><br /><strong>Subject:</strong> ReportDocument.SummaryInfo.Template<br /><strong>Posted:</strong> 30 Jan 2019 at 5:24am<br /><br />I would contact SAP help on that one.&nbsp; They probably re-named the property to something else.]]>
   </description>
   <pubDate>Wed, 30 Jan 2019 05:24:18 +0000</pubDate>
   <guid isPermaLink="true">http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4616&amp;PID=74401#74401</guid>
  </item> 
  <item>
   <title>Writing Code : ReportDocument.SummaryInfo.Template</title>
   <link>http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4616&amp;PID=74397#74397</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.crystalreportsbook.com/forum/member_profile.asp?PF=31698">andrej81</a><br /><strong>Subject:</strong> ReportDocument.SummaryInfo.Template<br /><strong>Posted:</strong> 29 Jan 2019 at 1:40pm<br /><br />Any news on that? Thank You]]>
   </description>
   <pubDate>Tue, 29 Jan 2019 13:40:33 +0000</pubDate>
   <guid isPermaLink="true">http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4616&amp;PID=74397#74397</guid>
  </item> 
  <item>
   <title>Writing Code : Null Field</title>
   <link>http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22630&amp;PID=74074#74074</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.crystalreportsbook.com/forum/member_profile.asp?PF=8671">kevlray</a><br /><strong>Subject:</strong> Null Field<br /><strong>Posted:</strong> 19 Jun 2018 at 9:08am<br /><br />Looks correct to me.&nbsp; Don't forget about the "Default Values for Nulls"]]>
   </description>
   <pubDate>Tue, 19 Jun 2018 09:08:39 +0000</pubDate>
   <guid isPermaLink="true">http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22630&amp;PID=74074#74074</guid>
  </item> 
  <item>
   <title>Writing Code : Null Field</title>
   <link>http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22630&amp;PID=74073#74073</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.crystalreportsbook.com/forum/member_profile.asp?PF=30638">lbuffett</a><br /><strong>Subject:</strong> Null Field<br /><strong>Posted:</strong> 19 Jun 2018 at 7:08am<br /><br />Thank you, that is what I am looking for.<br /><br />What if I wanted to report on 2 blank fields, would it be an if statement or would I just put it in the select expert such as: <br /><br />ISNULL({Treatme2.AppUser}) and<br />ISNULL({Treatme2.AppDate}) <br /><br />Treatme2 is the table. <br />AppUser is the field.<span style="font-size:10px"><br /><br />Edited by lbuffett - 19 Jun 2018 at 7:09am</span>]]>
   </description>
   <pubDate>Tue, 19 Jun 2018 07:08:14 +0000</pubDate>
   <guid isPermaLink="true">http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22630&amp;PID=74073#74073</guid>
  </item> 
  <item>
   <title>Writing Code : Null Field</title>
   <link>http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22630&amp;PID=74070#74070</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.crystalreportsbook.com/forum/member_profile.asp?PF=8671">kevlray</a><br /><strong>Subject:</strong> Null Field<br /><strong>Posted:</strong> 18 Jun 2018 at 4:14am<br /><br />In the select expert, go to the formula editor and do a isnull check on the acceptance date (i.e., isnull({somedate}).&nbsp; Also make sure the "Default Values for Nulls" is selected in the Formula Workshop.<br>]]>
   </description>
   <pubDate>Mon, 18 Jun 2018 04:14:14 +0000</pubDate>
   <guid isPermaLink="true">http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22630&amp;PID=74070#74070</guid>
  </item> 
  <item>
   <title>Writing Code : Null Field</title>
   <link>http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22630&amp;PID=74068#74068</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.crystalreportsbook.com/forum/member_profile.asp?PF=30638">lbuffett</a><br /><strong>Subject:</strong> Null Field<br /><strong>Posted:</strong> 16 Jun 2018 at 5:28pm<br /><br />Hello<br /><br />I am trying to figure out how to come up with code (within crystal 2016) that will only show students where the acceptance date is null.  Hopefully, this will show me all students that are incomplete.<br /><br />Anyone know or have an idea how to do it?  I can find all kinds of SQL statements; however, I am not sure how to do it in crystal.<br /><br />Les&nbsp;&nbsp;&nbsp;]]>
   </description>
   <pubDate>Sat, 16 Jun 2018 17:28:46 +0000</pubDate>
   <guid isPermaLink="true">http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22630&amp;PID=74068#74068</guid>
  </item> 
  <item>
   <title>Writing Code : Formatting text as a date</title>
   <link>http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=20750&amp;PID=71700#71700</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.crystalreportsbook.com/forum/member_profile.asp?PF=30295">jessicacyrus1</a><br /><strong>Subject:</strong> Formatting text as a date<br /><strong>Posted:</strong> 15 Jun 2016 at 1:28am<br /><br />Thank you for posting the answer it will be help full to me and many others also. because I also Don't have Idea about it.]]>
   </description>
   <pubDate>Wed, 15 Jun 2016 01:28:26 +0000</pubDate>
   <guid isPermaLink="true">http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=20750&amp;PID=71700#71700</guid>
  </item> 
 </channel>
</rss>