Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Exporting Crystal Reports with Powershell

$
0
0

Hi,

I am trying to generate some reports using powershell. The report can be loaded in a crystal report viewer. But now I want to export it in the pdf format. below is the script I have written so far. I need to know how to set arguments for exportformattype and destinationoptions to export the report.

Grateful to help.

Rgds,

Ashley

[reflection.assembly]::LoadWithPartialName('CrystalDecisions.Shared')
[reflection.assembly]::LoadWithPartialName('CrystalDecisions.CrystalReports.Engine')
[reflection.assembly]::LoadWithPartialName('CrystalDecisions.Windows.Forms')   

$report = New-Object CrystalDecisions.CrystalReports.Engine.ReportDocument
$report.Load("D:\MPL Projects\CEB\cebreport.rpt")
#i need to know how to set these arguments
$report.ExportOptions.
#that part is working fine
$rv = New-Object CrystalDecisions.Windows.Forms.CrystalReportViewer            
$rv.ReportSource = $report            
$rv.Dock = [System.Windows.Forms.DockStyle]::Fill            
$form = New-Object Windows.Forms.Form            
$form.Height = 810            
$form.Width= 1210            
$form.Controls.Add($rv)            
$rv.Show()            
$form.ShowDialog()            
$rv.Dispose()            
$report.Dispose()            
$form.Dispose()     


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>