<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: So Easy, I Could Kick Myself</title>
	<atom:link href="http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/</link>
	<description>The Shell Is Calling</description>
	<lastBuildDate>Tue, 10 Jan 2012 04:24:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Shane</title>
		<link>http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/comment-page-1/#comment-851</link>
		<dc:creator>Shane</dc:creator>
		<pubDate>Mon, 18 Jul 2011 03:08:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/#comment-851</guid>
		<description>Yeah, I&#039;ve this one.  You can connect your report to almost any data source, as well as to proxy data, such as a result set (for example, an ADO.NET DataSet). The wizards that are included in the GUI designer make it easy to format, group, chart, and present data.</description>
		<content:encoded><![CDATA[<p>Yeah, I&#8217;ve this one.  You can connect your report to almost any data source, as well as to proxy data, such as a result set (for example, an ADO.NET DataSet). The wizards that are included in the GUI designer make it easy to format, group, chart, and present data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christine</title>
		<link>http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/comment-page-1/#comment-667</link>
		<dc:creator>Christine</dc:creator>
		<pubDate>Wed, 09 Mar 2011 20:26:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/#comment-667</guid>
		<description>Hi Steven,

I&#039;m relatively new to Powershell and a complete Crystal Reports newbie. I&#039;ve been tasked with writing a script to run a folder full of .rpts, export the results to excel, then email the results based on a .rtf (Geeze, why not something HARD?)

I&#039;m stuck on figuring out what the .X is to get the report&#039;s query, and how to pass parameters into a report. If you could point me in the right direction, I&#039;d be eternally grateful. This was a great post and has helped me a bit but I could use one more nudge. Thank you in advance.</description>
		<content:encoded><![CDATA[<p>Hi Steven,</p>
<p>I&#8217;m relatively new to Powershell and a complete Crystal Reports newbie. I&#8217;ve been tasked with writing a script to run a folder full of .rpts, export the results to excel, then email the results based on a .rtf (Geeze, why not something HARD?)</p>
<p>I&#8217;m stuck on figuring out what the .X is to get the report&#8217;s query, and how to pass parameters into a report. If you could point me in the right direction, I&#8217;d be eternally grateful. This was a great post and has helped me a bit but I could use one more nudge. Thank you in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Larry</title>
		<link>http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/comment-page-1/#comment-609</link>
		<dc:creator>Larry</dc:creator>
		<pubDate>Tue, 05 Oct 2010 16:52:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/#comment-609</guid>
		<description>I found your script a perfect starting point for what I&#039;m trying to accomplish. Document all tables and fields in .rpt files.

While I&#039;ve managed to do that, I&#039;m still stuck on one issue. My script finds all fields a table uses instead of just the ones used in the report (you know the ones with the little checkmark with them in CR). 

Here&#039;s the code I used to do that

function Get-CRTablesFields()
{
    
    [cmdletbinding()]
    param (
        [parameter(ValueFromPipelineByPropertyName=$true,Mandatory=$true)]
        [Alias(&#039;fullname&#039;)]
        [string]$Path
    )
    begin
    {
        [reflection.assembly]::LoadWithPartialName(&#039;CrystalDecisions.Shared&#039;) &#124; Out-Null
        [reflection.assembly]::LoadWithPartialName(&#039;CrystalDecisions.CrystalReports.Engine&#039;) &#124; Out-Null
       
    }
    process
    {
        try
        {
            $report = New-Object CrystalDecisions.CrystalReports.Engine.ReportDocument
            $report.load($path)
            $fname = Split-Path $path -Leaf 
            
            $results = $report.database.tables &#124; select Fields
                        
            foreach ($line in $results) 
            { 
                foreach ($field in $line.fields) 
                {
                    $tbl = $field &#124; Select TableName
                    $fld = $field &#124; Select FormulaName
                    $aline = $fname + &quot;`t&quot; + $tbl  + &quot;`t&quot; + $fld
                    write-output $aline
                }
            }
           
           
        }
        finally
        {
            $report.dispose()   
        }
    }
}

If anyone knows where these fields that are only used in the report are hidden, please let me know. 

Also, it is time consuming to explore all of the namespace for possible locations of this information. Does anyone know how to write a recursive get-member the behaves like get-childitem -recurse?</description>
		<content:encoded><![CDATA[<p>I found your script a perfect starting point for what I&#8217;m trying to accomplish. Document all tables and fields in .rpt files.</p>
<p>While I&#8217;ve managed to do that, I&#8217;m still stuck on one issue. My script finds all fields a table uses instead of just the ones used in the report (you know the ones with the little checkmark with them in CR). </p>
<p>Here&#8217;s the code I used to do that</p>
<p>function Get-CRTablesFields()<br />
{</p>
<p>    [cmdletbinding()]<br />
    param (<br />
        [parameter(ValueFromPipelineByPropertyName=$true,Mandatory=$true)]<br />
        [Alias('fullname')]<br />
        [string]$Path<br />
    )<br />
    begin<br />
    {<br />
        [reflection.assembly]::LoadWithPartialName(&#8216;CrystalDecisions.Shared&#8217;) | Out-Null<br />
        [reflection.assembly]::LoadWithPartialName(&#8216;CrystalDecisions.CrystalReports.Engine&#8217;) | Out-Null</p>
<p>    }<br />
    process<br />
    {<br />
        try<br />
        {<br />
            $report = New-Object CrystalDecisions.CrystalReports.Engine.ReportDocument<br />
            $report.load($path)<br />
            $fname = Split-Path $path -Leaf </p>
<p>            $results = $report.database.tables | select Fields</p>
<p>            foreach ($line in $results)<br />
            {<br />
                foreach ($field in $line.fields)<br />
                {<br />
                    $tbl = $field | Select TableName<br />
                    $fld = $field | Select FormulaName<br />
                    $aline = $fname + &#8220;`t&#8221; + $tbl  + &#8220;`t&#8221; + $fld<br />
                    write-output $aline<br />
                }<br />
            }</p>
<p>        }<br />
        finally<br />
        {<br />
            $report.dispose()<br />
        }<br />
    }<br />
}</p>
<p>If anyone knows where these fields that are only used in the report are hidden, please let me know. </p>
<p>Also, it is time consuming to explore all of the namespace for possible locations of this information. Does anyone know how to write a recursive get-member the behaves like get-childitem -recurse?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Murawski</title>
		<link>http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/comment-page-1/#comment-597</link>
		<dc:creator>Steven Murawski</dc:creator>
		<pubDate>Wed, 29 Sep 2010 21:26:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/#comment-597</guid>
		<description>There is a new link at the bottom of the post that has a link to a V1 version of the script.  I&#039;ve commented out the V2 features and it should work that way.  One change is that it is now not pipeline aware.. it will require a path to be provided as a parameter (so if you were piping a directory full of reports to the command it would now look like 
dir *.rpt &#124; foreach-object {get-crystalreporttable -path $_.fullname}
Good luck!</description>
		<content:encoded><![CDATA[<p>There is a new link at the bottom of the post that has a link to a V1 version of the script.  I&#8217;ve commented out the V2 features and it should work that way.  One change is that it is now not pipeline aware.. it will require a path to be provided as a parameter (so if you were piping a directory full of reports to the command it would now look like<br />
dir *.rpt | foreach-object {get-crystalreporttable -path $_.fullname}<br />
Good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Becky</title>
		<link>http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/comment-page-1/#comment-595</link>
		<dc:creator>Becky</dc:creator>
		<pubDate>Wed, 29 Sep 2010 18:23:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/#comment-595</guid>
		<description>Steven,

That would be fantastic! I could follow the script logic but wasn&#039;t fluent enough in Powershell to know which parts were based on v2 compared to v1. I should be able to get the VS2008 Crystal Reports runtime on my work machine now that we&#039;ve upgraded some of our environment to SQL Server 2008.

Becky</description>
		<content:encoded><![CDATA[<p>Steven,</p>
<p>That would be fantastic! I could follow the script logic but wasn&#8217;t fluent enough in Powershell to know which parts were based on v2 compared to v1. I should be able to get the VS2008 Crystal Reports runtime on my work machine now that we&#8217;ve upgraded some of our environment to SQL Server 2008.</p>
<p>Becky</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Murawski</title>
		<link>http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/comment-page-1/#comment-593</link>
		<dc:creator>Steven Murawski</dc:creator>
		<pubDate>Wed, 29 Sep 2010 11:16:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/#comment-593</guid>
		<description>Becky,

The script was based on the VS2008 Crystal Reports runtime.

The Get-CrystalReportTable script was written to support version 2 of PowerShell but we could strip out the V2 specific items and the basics of the script will still work.  If you are interested, I can post a V1 compatible script.</description>
		<content:encoded><![CDATA[<p>Becky,</p>
<p>The script was based on the VS2008 Crystal Reports runtime.</p>
<p>The Get-CrystalReportTable script was written to support version 2 of PowerShell but we could strip out the V2 specific items and the basics of the script will still work.  If you are interested, I can post a V1 compatible script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Becky</title>
		<link>http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/comment-page-1/#comment-592</link>
		<dc:creator>Becky</dc:creator>
		<pubDate>Wed, 29 Sep 2010 02:32:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/#comment-592</guid>
		<description>Steven,

I&#039;m wrestling a little with which versions of the runtimes and CR Engines I need for this script, plus trying to learn powershell at the same time. I thought I was being smart by downloading VS2010 express, until I saw SAP&#039;s CR .Net Engine is only released for versions up to VS2008. 

I&#039;ve discovered my work machine can only support Powershell v1 (it&#039;s got XP SP2), but I can run Powershell v2 at home. Will the Get-CrystalReportTable script possibly run on v1 or does it use features that only v2 support? 

Thank you for the explanations!</description>
		<content:encoded><![CDATA[<p>Steven,</p>
<p>I&#8217;m wrestling a little with which versions of the runtimes and CR Engines I need for this script, plus trying to learn powershell at the same time. I thought I was being smart by downloading VS2010 express, until I saw SAP&#8217;s CR .Net Engine is only released for versions up to VS2008. </p>
<p>I&#8217;ve discovered my work machine can only support Powershell v1 (it&#8217;s got XP SP2), but I can run Powershell v2 at home. Will the Get-CrystalReportTable script possibly run on v1 or does it use features that only v2 support? </p>
<p>Thank you for the explanations!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yihong</title>
		<link>http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/comment-page-1/#comment-525</link>
		<dc:creator>Yihong</dc:creator>
		<pubDate>Sat, 01 May 2010 14:50:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/#comment-525</guid>
		<description>I am new to ps.  we have hundreds of crystal reports currently kicked off by different platforms, such as crystal enterprise and java.  we are looking for a solution to run all reports from 1 source, and is it possible to do it with ps?  Is ps able to query sql tables so that we can pass values to crystal parameters?  If so, can you please direct me where to start?  can you please recommend some books or references?  Thanks.</description>
		<content:encoded><![CDATA[<p>I am new to ps.  we have hundreds of crystal reports currently kicked off by different platforms, such as crystal enterprise and java.  we are looking for a solution to run all reports from 1 source, and is it possible to do it with ps?  Is ps able to query sql tables so that we can pass values to crystal parameters?  If so, can you please direct me where to start?  can you please recommend some books or references?  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Murawski</title>
		<link>http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/comment-page-1/#comment-450</link>
		<dc:creator>Steven Murawski</dc:creator>
		<pubDate>Thu, 07 Jan 2010 17:41:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/#comment-450</guid>
		<description>Glad you found it useful.  Let me know if you run in to any questions.  I&#039;ve been monkeying with the script a bit further as well (I should post the update later today.)</description>
		<content:encoded><![CDATA[<p>Glad you found it useful.  Let me know if you run in to any questions.  I&#8217;ve been monkeying with the script a bit further as well (I should post the update later today.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Becky</title>
		<link>http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/comment-page-1/#comment-449</link>
		<dc:creator>Becky</dc:creator>
		<pubDate>Thu, 07 Jan 2010 17:35:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.usepowershell.com/2009/11/so-easy-i-could-kick-myself/#comment-449</guid>
		<description>Thanks, Steven, this is exactly what I was trying to figure out during our last data model change. It&#039;s definitely time for me to check out the .Net API for Crystal Reports and learn PowerShell!</description>
		<content:encoded><![CDATA[<p>Thanks, Steven, this is exactly what I was trying to figure out during our last data model change. It&#8217;s definitely time for me to check out the .Net API for Crystal Reports and learn PowerShell!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

