# GrapeCity.ActiveReports.PrinterSettings.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_ActiveReports_PrinterSettings__ctor_" data-uid="GrapeCity.ActiveReports.PrinterSettings.#ctor*">PrinterSettings Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_PrinterSettings__ctor_" data-uid="GrapeCity.ActiveReports.PrinterSettings.#ctor*"></a>
<h4 id="GrapeCity_ActiveReports_PrinterSettings__ctor" data-uid="GrapeCity.ActiveReports.PrinterSettings.#ctor">PrinterSettings()</h4>
<div class="markdown level1 summary"><p>Creates a new instance of PrinterSettings with default print options.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public PrinterSettings()</code></pre>
</div>


<a id="GrapeCity_ActiveReports_PrinterSettings__ctor_" data-uid="GrapeCity.ActiveReports.PrinterSettings.#ctor*"></a>
<h4 id="GrapeCity_ActiveReports_PrinterSettings__ctor_GrapeCity_ActiveReports_PageReportModel_Report_System_String_" data-uid="GrapeCity.ActiveReports.PrinterSettings.#ctor(GrapeCity.ActiveReports.PageReportModel.Report,System.String)">PrinterSettings(Report, string)</h4>
<div class="markdown level1 summary"><p>Creates a new instance of PrinterSettings for a specific report.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public PrinterSettings(Report report, string reportName = null)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="../MESCIUS.ActiveReports.Core.Rdl/GrapeCity.ActiveReports.PageReportModel.Report.html">Report</a></td>
      <td><span class="parametername">report</span></td>
      <td><p>The report to print.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">reportName</span></td>
      <td><p>The name of the report.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PrinterSettings__ctor_GrapeCity_ActiveReports_PageReportModel_Report_System_String__examples">Examples</h5>
<pre><code class="lang-csharp">// Load the report
var reportPath = @"C:\path\to\your\report\SalesReport.rdlx";
var report = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(reportPath));
// Optionally, specify a custom name for the print job
string reportName = "Monthly Sales Report";
// Create a new instance of PrinterSettings for the specific report
var printerSettings = new GrapeCity.ActiveReports.PrinterSettings(report.Report, reportName);
// Configure additional printer settings as needed
printerSettings.ShowPrintDialog = true;
printerSettings.ShowPrintProgressDialog = true;
printerSettings.UsePrintingThread = true;
// Example: Print the report
// Note: Actual printing code would go here, using the configured printerSettings</code></pre>



<a id="GrapeCity_ActiveReports_PrinterSettings__ctor_" data-uid="GrapeCity.ActiveReports.PrinterSettings.#ctor*"></a>
<h4 id="GrapeCity_ActiveReports_PrinterSettings__ctor_GrapeCity_ActiveReports_Win_Printing_Printer_GrapeCity_ActiveReports_Printing_PrintOptions_" data-uid="GrapeCity.ActiveReports.PrinterSettings.#ctor(GrapeCity.ActiveReports.Win.Printing.Printer,GrapeCity.ActiveReports.Printing.PrintOptions)">PrinterSettings(Printer, PrintOptions)</h4>
<div class="markdown level1 summary"><p>Creates a new instance of PrinterSettings with a specific printer and print options.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public PrinterSettings(Printer printer, PrintOptions printOptions)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="../MESCIUS.ActiveReports.Win/GrapeCity.ActiveReports.Win.Printing.Printer.html">Printer</a></td>
      <td><span class="parametername">printer</span></td>
      <td><p>The printer instance.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Printing.PrintOptions.html">PrintOptions</a></td>
      <td><span class="parametername">printOptions</span></td>
      <td><p>The print options.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PrinterSettings__ctor_GrapeCity_ActiveReports_Win_Printing_Printer_GrapeCity_ActiveReports_Printing_PrintOptions__examples">Examples</h5>
<pre><code class="lang-csharp">// Instantiate and configure a Printer object
var printer = new GrapeCity.ActiveReports.Win.Printing.Printer()
{
	PrinterName = "YourPrinterName", // Specify the printer name
	Landscape = true, // Set landscape orientation
					  // Additional printer configuration can be done here
};
// Configure custom print options
var printOptions = GrapeCity.ActiveReports.Printing.PrintOptions.CreateDefault();
printOptions.PageOrder = PageOrder.Vertical;
printOptions.PagesPerSheet = 2;
// Create a new instance of PrinterSettings with the custom printer and print options
var printerSettings = new GrapeCity.ActiveReports.PrinterSettings(printer, printOptions);
// Example: Use the configured printerSettings for printing
// Note: Actual printing code would go here, using the configured printerSettings</code></pre>

</div>
