[]
Initiates the printing process for a section-based document with default settings.
public static bool Print(this SectionDocument sectionDocument)
Type | Name | Description |
---|---|---|
SectionDocument | sectionDocument | The section document to print. |
Type | Description |
---|---|
bool |
|
This method prints the document using the default settings: showing the print dialog, showing the print progress dialog, and using the printing thread. It simplifies the printing process for common scenarios.
The following example demonstrates how to print a section document using default settings:
SectionDocument sectionDocument = new SectionDocument();
sectionDocument.Load("C:\\Report.rdf");
sectionDocument.PrintOptions.PrintPageBorder = true;
bool printSuccess = sectionDocument.Print();
if (printSuccess)
Console.WriteLine("Printing completed successfully.");
else
Console.WriteLine("Printing failed.");
Initiates the printing process for a section-based document, with an option to display the print dialog.
public static bool Print(this SectionDocument sectionDocument, bool showPrintDialog)
Type | Name | Description |
---|---|---|
SectionDocument | sectionDocument | The section document to be printed. |
bool | showPrintDialog | Specifies whether the print dialog should be shown to the user. If |
Type | Description |
---|---|
bool |
|
This method allows for basic customization of the printing process by controlling the visibility of the print dialog. It defaults to showing the print progress dialog and using the printing thread for the operation, simplifying the printing process for common use cases.
The following example demonstrates how to print a section document with the print dialog:
SectionDocument sectionDocument = new SectionDocument();
sectionDocument.Load("C:\\Report.rdf");
bool printSuccess = sectionDocument.Print(showPrintDialog: true);
if (printSuccess)
Console.WriteLine("Printing completed successfully.");
else
Console.WriteLine("Printing failed.");
Initiates the printing process for a section-based document, with options to display the print dialog and the print progress dialog.
public static bool Print(this SectionDocument sectionDocument, bool showPrintDialog, bool showPrintProgressDialog)
Type | Name | Description |
---|---|---|
SectionDocument | sectionDocument | The section document to be printed. |
bool | showPrintDialog | Specifies whether the print dialog should be shown to the user. If |
bool | showPrintProgressDialog | Specifies whether the print progress dialog should be shown during the printing process. If |
Type | Description |
---|---|
bool |
|
This method offers more control over the printing process by allowing the user to decide whether to display the print dialog and the print progress dialog. It defaults to using the printing thread for the operation, ensuring that the UI remains responsive during printing.
The following example demonstrates how to print a section document with both the print dialog and the print progress dialog displayed:
SectionDocument sectionDocument = new SectionDocument();
sectionDocument.Load("C:\\Report.rdf");
bool printSuccess = sectionDocument.Print(showPrintDialog: true, showPrintProgressDialog: true);
if (printSuccess)
Console.WriteLine("Printing completed successfully.");
else
Console.WriteLine("Printing failed.");
Prints the section-based document using specified printing settings.
public static bool Print(this SectionDocument sectionDocument, PrintingSettings settings)
Type | Name | Description |
---|---|---|
SectionDocument | sectionDocument | The document to be printed. |
PrintingSettings | settings | The printing settings to apply. |
Type | Description |
---|---|
bool |
|
This method decodes the provided settings
to determine the configuration for the print operation, such as whether to show
the print dialog, the print progress dialog, use a printing thread, and the style of the dialog.
The following example demonstrates how to print a section document with custom printing settings:
SectionDocument sectionDocument = new SectionDocument();
sectionDocument.Load("C:\\Report.rdf");
PrintingSettings settings = PrintingSettings.UseStandardDialog | PrintingSettings.ShowPrintDialog;
bool printSuccess = sectionDocument.Print(settings);
if (printSuccess)
Console.WriteLine("Printing completed successfully with custom settings.");
else
Console.WriteLine("Printing failed.");
Initiates the printing process for a section-based document with options for displaying print dialogs and controlling the printing execution thread.
public static bool Print(this SectionDocument sectionDocument, bool showPrintDialog, bool showPrintProgressDialog, bool usePrintingThread)
Type | Name | Description |
---|---|---|
SectionDocument | sectionDocument | The section document to be printed. This document contains the content and layout information for the print job. |
bool | showPrintDialog | Specifies whether to display the print dialog before printing. If set to |
bool | showPrintProgressDialog | Specifies whether to display a print progress dialog during the printing process.
If set to |
bool | usePrintingThread | Determines whether the printing process should be executed on a separate thread. If set to |
Type | Description |
---|---|
bool | Returns |
This method provides a flexible approach to printing section-based documents, allowing for user interaction through dialogs and improved application performance by optionally running the print job on a separate thread. It is part of the GrapeCity ActiveReports printing extensions and is designed to integrate seamlessly with the ActiveReports reporting components.
var doc = new SectionDocument();
doc.Load("C:\\Report.rdf");
doc.PrintOptions.PrintPageBorder = true;
doc.PrintOptions.Watermark = new WatermarkOptions
{
Title = "Watermark",
Angle = 45,
Color = Color.Gray,
Font = new Document.Drawing.Font("Arial", 72)
};
var result = doc.Print(false, true, false);
Initiates the printing process for a page-based document with default settings.
public static bool Print(this PageDocument pageDocument)
Type | Name | Description |
---|---|---|
PageDocument | pageDocument | The page document to print. This document contains the content and layout information for the print job. |
Type | Description |
---|---|
bool | Returns |
This method simplifies the printing process by using default settings, which include displaying the print dialog to the user, showing a print progress dialog during the printing process, and executing the print job on a separate thread to maintain UI responsiveness. It is designed for ease of use in common printing scenarios.
The following example demonstrates how to print a page document using the default settings:
var pageReport = new PageReport();
PageDocument pageDocument = new PageDocument(pageReport);
bool printSuccess = pageDocument.Print();
if (printSuccess)
Console.WriteLine("Printing completed successfully.");
else
Console.WriteLine("Printing failed.");
Initiates the printing process for a page-based document, optionally displaying the print dialog.
public static bool Print(this PageDocument pageDocument, bool showPrintDialog)
Type | Name | Description |
---|---|---|
PageDocument | pageDocument | The PageDocument instance representing the document to be printed. This document contains the content and layout information for the print job. |
bool | showPrintDialog | A bool value indicating whether the print dialog should be shown to the user before printing.
If set to |
Type | Description |
---|---|
bool | A bool value indicating the success of the print operation. Returns |
This method provides a simplified interface for printing page-based documents, with an option to display the print dialog for user interaction. It defaults to showing the print progress dialog and executing the print job on a separate thread to maintain UI responsiveness. This method is part of the GrapeCity ActiveReports printing extensions and is designed to integrate seamlessly with ActiveReports reporting components.
The following example demonstrates how to print a page document with the print dialog displayed:
var pageReport = new PageReport();
PageDocument pageDocument = new PageDocument(pageReport);
bool printSuccess = pageDocument.Print(showPrintDialog: true);
if (printSuccess)
Console.WriteLine("Printing completed successfully.");
else
Console.WriteLine("Printing failed.");
Initiates the printing process for a page-based document, with options to display the print dialog and the print progress dialog.
public static bool Print(this PageDocument pageDocument, bool showPrintDialog, bool showPrintProgressDialog)
Type | Name | Description |
---|---|---|
PageDocument | pageDocument | The PageDocument instance representing the document to be printed. This document contains the content and layout information for the print job. |
bool | showPrintDialog | A bool value indicating whether the print dialog should be shown to the user before printing.
If set to |
bool | showPrintProgressDialog | A bool value indicating whether the print progress dialog should be shown during
the printing process. If set to |
Type | Description |
---|---|
bool | A bool value indicating the success of the print operation. Returns |
This method provides a simplified interface for printing page-based documents, offering control over the display of the print dialog and the print progress dialog. It defaults to executing the print job on a separate thread to maintain UI responsiveness. This method is part of the GrapeCity ActiveReports printing extensions and is designed to integrate seamlessly with ActiveReports reporting components.
The following example demonstrates how to print a page document with both the print dialog and the print progress dialog displayed:
var pageReport = new PageReport();
PageDocument pageDocument = new PageDocument(pageReport);
bool printSuccess = pageDocument.Print(showPrintDialog: true, showPrintProgressDialog: true);
if (printSuccess)
Console.WriteLine("Printing completed successfully.");
else
Console.WriteLine("Printing failed.");
Initiates the printing process for a page-based document, providing options to display the print dialog, the print progress dialog, and to execute the printing on a new thread.
public static bool Print(this PageDocument pageDocument, bool showPrintDialog, bool showPrintProgressDialog, bool usePrintingThread)
Type | Name | Description |
---|---|---|
PageDocument | pageDocument | The PageDocument instance to be printed. This document contains the content and layout information for the print job. |
bool | showPrintDialog | Specifies whether the print dialog should be shown to the user. If set to |
bool | showPrintProgressDialog | Specifies whether the print progress dialog should be displayed during the printing process.
If set to |
bool | usePrintingThread | Determines whether the printing process should be executed on a new thread. Using a separate thread for printing
can help maintain UI responsiveness during the print job. If set to |
Type | Description |
---|---|
bool | Returns |
This method is designed to provide a flexible and user-friendly interface for printing page-based documents within the GrapeCity ActiveReports framework. It allows for customization of the printing process through various parameters, catering to different user preferences and requirements.
var report = new PageReport(new FileInfo(@"C:\Report.rdlx"));
var doc = report.Document;
doc.PrintOptions.Watermark = new WatermarkOptions
{
Title = "Watermark",
Angle = 45,
Color = Color.Red,
Font = new Font("Arial", 72),
DrawOver = true
};
var result = doc.Print(false, true, false);
Initiates the printing process for a page-based document, allowing for detailed control over the printing settings.
public static bool Print(this PageDocument pageDocument, PrintingSettings printingSettings)
Type | Name | Description |
---|---|---|
PageDocument | pageDocument | The PageDocument instance representing the document to be printed. This document contains the content and layout information for the print job. |
PrintingSettings | printingSettings | A PrintingSettings enumeration that specifies the printing options such as whether to show the print dialog, the print progress dialog, use a printing thread, and the style of the dialog. This allows for granular control over the printing process. |
Type | Description |
---|---|
bool | A bool value indicating the success of the print operation. Returns |
This method provides an advanced interface for printing page-based documents within the GrapeCity ActiveReports framework, leveraging the PrintingSettings enumeration to customize the printing experience. It is designed to cater to various printing preferences and scenarios, offering flexibility in how the print job is executed.
The following example demonstrates how to print a page document with customized printing settings:
var pageReport = new PageReport();
PageDocument pageDocument = new PageDocument(pageReport);
PrintingSettings settings = PrintingSettings.UseStandardDialog | PrintingSettings.ShowPrintDialog;
bool printSuccess = pageDocument.Print(settings);
if (printSuccess)
Console.WriteLine("Printing completed successfully.");
else
Console.WriteLine("Printing failed.");
Initiates the printing process for a page-based document using specified printer settings.
public static bool Print(this PageDocument pageDocument, PrinterSettings printerSettings)
Type | Name | Description |
---|---|---|
PageDocument | pageDocument | The PageDocument instance representing the document to be printed. This document contains the content and layout information for the print job. |
PrinterSettings | printerSettings | An instance of PrinterSettings that specifies the settings to be used for the print job, including whether to show the print dialog, the print progress dialog, whether to use a printing thread, and details about the printer configuration. |
Type | Description |
---|---|
bool | A bool value indicating the success of the print operation. Returns |
This method provides a flexible interface for printing page-based documents within the GrapeCity ActiveReports framework, leveraging the PrinterSettings class to customize the printing experience. It allows for detailed control over the printing process, catering to various user preferences and scenarios.
The following example demonstrates how to print a page document with custom printer settings:
var pageReport = new PageReport();
PageDocument pageDocument = new PageDocument(pageReport);
PrinterSettings printerSettings = new PrinterSettings
{
ShowPrintDialog = true,
ShowPrintProgressDialog = true,
UsePrintingThread = true,
UseStandardDialog = true
};
bool printSuccess = pageDocument.Print(printerSettings);
if (printSuccess)
Console.WriteLine("Printing completed successfully.");
else
Console.WriteLine("Printing failed.");
Type | Condition |
---|---|
ArgumentNullException | Thrown when |