Page 1 of 2
Send report direct to printer without preview
Posted: Fri Nov 22, 2013 10:04 am
by pdt1704
Hi,
I used Stimulsoft Report version 2013.2 and ASP.NET, How can I send report direct printer (my printer connect with IIS server and I used object PrintDocument that .NET Framework support).
Please help,
Thanks.
Re: Send report direct to printer without preview
Posted: Fri Nov 22, 2013 10:22 am
by tpontow
Try this in C# code
Code: Select all
StiReport report = .....; // Implement loading or creating the report or whatever it takes to get a report at runtime...
report.Print(showPrintDialog:false);
Re: Send report direct to printer without preview
Posted: Mon Nov 25, 2013 10:17 am
by pdt1704
Thank for reply,
My printer connect to other PC (not IIS server) and share with IIS server. IIS server set this printer is default printer.
It working very well if I must be used function API named LogonUserA (impersonate context).
How can I send report direct to printer without impersonate?
Please help,
Thanks.
Re: Send report direct to printer without preview
Posted: Mon Nov 25, 2013 12:08 pm
by Alex K.
Hello,
Please check the following topic in our knowledgebase:
http://support.stimulsoft.com/index.php ... a-web-page
Thank you.
Re: Send report direct to printer without preview
Posted: Mon Nov 25, 2013 12:38 pm
by HighAley
Hello.
Please, read next
Printing a report with specified parameters article from our Knowledge Base.
Thank you.
Re: Send report direct to printer without preview
Posted: Tue Nov 26, 2013 2:24 am
by pdt1704
Thanks for reply,
It run OK, but I see that it's was print as image?
Thanks.
Re: Send report direct to printer without preview
Posted: Tue Nov 26, 2013 2:37 am
by pdt1704
Thanks for reply,
I see error: Settings to access printer '\\My IP\my printer' are not valid. If I used Impersonate, it run OK.
When I used print with Impersonate, printing report using GDI and GDI technologies?
When I used print with Impersonate, quality print increment many times with image?
Please help,
Thanks.
Re: Send report direct to printer without preview
Posted: Tue Nov 26, 2013 6:46 am
by HighAley
Hello.
Sorry, but it's not enough information to give you an answer.
Could you describe your issue more detailed with examples?
What do you mean under "Impersonate"?
Thank you.
Re: Send report direct to printer without preview
Posted: Tue Nov 26, 2013 7:08 am
by pdt1704
Thanks for reply,
My printer connect to other PC (not IIS server) and share printer with IIS server. IIS server set this printer is default printer.
I must be used function API named LogonUserA to login to IIS Server with user and pass,
Code: Select all
Declare Function LogonUserA Lib "advapi32.dll" (ByVal lpszUsername As String, _
ByVal lpszDomain As String, _
ByVal lpszPassword As String, _
ByVal dwLogonType As Integer, _
ByVal dwLogonProvider As Integer, _
ByRef phToken As IntPtr) As Integer
Declare Auto Function DuplicateToken Lib "advapi32.dll" ( _
ByVal existingTokenHandle As IntPtr, _
ByVal impersonationLevel As Integer, _
ByRef duplicateTokenHandle As IntPtr) As Integer
after login ok, I can used all resource of IIS server, ex: printer, hdd shared for IIs server with user and pass that I login.
Please help.
Thanks.
Re: Send report direct to printer without preview
Posted: Wed Nov 27, 2013 1:46 pm
by HighAley
Hello.
But what problem do you have with our product?
You didn't mention it in your last message.
We can't suggest you how to get access to your printer.
Thank you.