Hi,
My users use Stimulsoft through a Citrix environment. Because they use multiple printers, and in order to force them to choose the right printer (mistakes occur daily and cause waste of paper/labels), I would like to set the printer field as empty when they click on the Print button.
I have no idea how to do that. I don't code, I only use the designer.
Can you help me with having (coding?) this?
Would I have to edit all reports one by one, or is there a kind of configuration file that could do the job for all?
Many thanks!
How to set no default printer?
Re: How to set no default printer?
Hi again,
I've found some code examples to set a default printer in the developer manual, but I can't find where to paste them.
When I open my report's Code tab, I see the code below:
Where should I paste my additional code? And should I make any change so it works with my report?
I tried to paste it after this.InitializeComponent(); but got errors.
I've found some code examples to set a default printer in the developer manual, but I can't find where to paste them.
When I open my report's Code tab, I see the code below:
Code: Select all
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.ReportControls;
using Stimulsoft.Report.Components;
namespace Reports
{
public class Report : Stimulsoft.Report.StiReport
{
public Report()
{
this.InitializeComponent();
}
#region StiReport Designer generated code - do not modify#endregion StiReport Designer generated code - do not modify
}
}
I tried to paste it after this.InitializeComponent(); but got errors.
Code: Select all
//Create Printer Settings
PrinterSettings printerSettings = new PrinterSettings();
//Set Printer to Use for Printing
printerSettings.PrinterName = "myprinter'sname";
Re: How to set no default printer?
Hello.
Please, try to use next code:
Thank you.
Please, try to use next code:
Code: Select all
this.InitializeComponent();
this.PrinterSettings.PrinterName = "myprinter'sname";
Re: How to set no default printer?
Works like a charm 
Thanks a lot!

Thanks a lot!
Re: How to set no default printer?
Hello,
We are always glad to help you!
Let us know if you need any additional help.
We are always glad to help you!
Let us know if you need any additional help.