Report printing with a Network Printer(TCP/IP)

Stimulsoft Reports.WEB discussion
Chasoo
Posts: 40
Joined: Wed Oct 19, 2011 1:29 am

Report printing with a Network Printer(TCP/IP)

Post by Chasoo »

i have try to print a report with a Network printer which is availbale in the same network(with the webserver).It doesnt throw any errors,but nothing has went to the printer as well.
here is the code

StiPrinterSettings printerSettings = new StiPrinterSettings();
printerSettings.PrinterName = "\\\\SS-DC01\\SS-PRI01(HP LaserJet M1522nf)\\";
report.PrinterSettings = printerSettings;
report.Print(false);

how should i fix it?
tnx

chaminda
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Report printing with a Network Printer(TCP/IP)

Post by HighAley »

Hello.
Chasoo wrote:i have try to print a report with a Network printer which is availbale in the same network(with the webserver).It doesnt throw any errors,but nothing has went to the printer as well.
here is the code

StiPrinterSettings printerSettings = new StiPrinterSettings();
printerSettings.PrinterName = "\\\\SS-DC01\\SS-PRI01(HP LaserJet M1522nf)\\";
report.PrinterSettings = printerSettings;
report.Print(false);

how should i fix it?
Have other applications access to this printer?
Could you try to run our Demo or Designer on your server and try to print from it.

Thank you.
Chasoo
Posts: 40
Joined: Wed Oct 19, 2011 1:29 am

Report printing with a Network Printer(TCP/IP)

Post by Chasoo »

Hi tnx for the quick reply. it was the prob with printer UNC Id. i managed to fix that.

bu now i am having a bit of a trouble.it's taking lot of time to print a simple report.(more than 90 sec).i am using reportdesigner.web.
is there a work around for this ?

chaminda
Chasoo
Posts: 40
Joined: Wed Oct 19, 2011 1:29 am

Report printing with a Network Printer(TCP/IP)

Post by Chasoo »

here i have added the code which i have used.
Report has only a static label.but it takes more than 90 sec :(

any help

PrinterSettings printer = new PrinterSettings();
printer.PrinterName = GetSelectedPrinterUncName(e);

if (printer.IsValid)
{
report.Print(false, printer);
}

chaminda
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Report printing with a Network Printer(TCP/IP)

Post by HighAley »

Hello.

What product and version do you use?
In one of our prerelease builds we add next property. Please, try to use it.

Code: Select all

StiOptions.Print.AllowUsePaperSizesFromPrinterSettings = false;
We met such problems with long time printing on some servers.

Thank you.
Chasoo
Posts: 40
Joined: Wed Oct 19, 2011 1:29 am

Report printing with a Network Printer(TCP/IP)

Post by Chasoo »

i tried that by downloading the prerelease. but still taking the same time as earlier.

any help.something like rendering report b4 send it to the printer

Chaminda
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Report printing with a Network Printer(TCP/IP)

Post by HighAley »

Hello, Chaminda.
Chasoo wrote:i tried that by downloading the prerelease. but still taking the same time as earlier.

any help.something like rendering report b4 send it to the printer
Please clarify the following points:
1. Is report.Print(false, printer) method executed 90 seconds?
2. How long does the printing last on this printer from this server and from any other computer.
3. How long does the printing last on other printers from this server.

Also please send us your report template with data for analysis.

Thank you.
Chasoo
Posts: 40
Joined: Wed Oct 19, 2011 1:29 am

Report printing with a Network Printer(TCP/IP)

Post by Chasoo »

Hi,
i have modified my code to check how long it will take for the print process.

and here is how my code is looks like now.

StiOptions.Print.AllowUsePaperSizesFromPrinterSettings = false;

report.Render();
PrinterSettings printer = new PrinterSettings();
printer.PrinterName = GetSelectedPrinterUncName(e);

if (printer.IsValid)
{
Debug.WriteLine(DateTime.Now.ToShortTimeString());
report.Print(false, printer);
Debug.WriteLine(DateTime.Now.ToShortTimeString());
}
so 1 . it has taken around 2 mnts as for the result.earlier i said it's taking more than 90 seconds coz our script managers time out was in 90 seconds.
2. i have tested printing from the same printer with the same computer by sending some raw data to printer.it took around 20 seconds.
3.we don't have other printers in our network which are directly connected through a network cable.

the report is a simple thing which is having only a text. here i have attached the report as well.

one last question.By any chance do you all send report as images to the printer ?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Report printing with a Network Printer(TCP/IP)

Post by HighAley »

Hello, Chaminda.
Chasoo wrote:2. i have tested printing from the same printer with the same computer by sending some raw data to printer.it took around 20 seconds.
Please, clarify what RAW data do send to printer? Text only or images?
If it possible, please, send us your report for analysis. We have the same printer and would like to test your project.

If you send text only then 20 seconds is too long for text printing. So it could be a web-server settings problem.
Usually, some server security settings could cause slow printer access.
Chasoo wrote:one last question.By any chance do you all send report as images to the printer ?
What product do you use Designer.Web with? WinForms, Wpf, SL or Web?
Standard printing is used by WinForms, WPF and WebViewer.
But SilverLight and WebViewerFx print using images due to Silverlight and Flash technology restrictions.

Thank you.
Chasoo
Posts: 40
Joined: Wed Oct 19, 2011 1:29 am

Report printing with a Network Printer(TCP/IP)

Post by Chasoo »

I have Done some Testing today, installing another printer locally.and it was surprising, the report came off within 2 seconds.but on network printer it's still taking the same time as earlier(most of the time more than 2 mnts).But it cant be just a network issue coz when try to send just a string as raw data to printer it printed within 2 seconds.(last time i have mistakenly said 20 sec but it should be 2 seconds.)

here i have attached a sample project which i have done for testing.In this sample project i have used same network printer.For print Report it has taken more than 2 mnts but to print just a string (sent as raw data to the printer) took only 2 seconds.So i cant complain the network it self coz i am sending both report and the raw data to the same printer which is exist in the local network.(standalone printer)

i am using report designer web.

Sample Project

Sample Report
Post Reply