We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Direct print using SfReportViewer in uwp

Thread ID:

Created:

Updated:

Platform:

Replies:

125170 Jul 27,2016 08:25 AM Nov 17,2016 07:02 AM UWP 9
loading
Tags: SfReportViewer
Krishna Prasad
Asked On July 27, 2016 08:25 AM

Hi Team,
I am using syncfusion controls version 14.1.0.46 in my UWP project.
For the reporting purpose i am using SfReportViewer and its working fine.
I need to print my reports directly without previewing in SfReportViewer  in UWP.



Vinoth Srinivasan [Syncfusion]
Replied On July 28, 2016 07:27 AM

Hi Krishna,   
   
Thanks for contacting Syncfusion support.   
   
We have published a KB to print the report directly without viewing in UWP using Report Writer. Please refer to the following KB link for more details on this.   
  
   
Regards,   
Vinoth S.   


Krishna Prasad
Replied On July 29, 2016 09:06 AM

Hi Vinoth S

Thank you for your response.
I had tried with the given project and from that i am not able to click print more than one and which shows error like,
"An exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.ni.dll but was not handled in user code
Additional information: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"
and also i am not able to use it in my UWP project . When i call await Windows.Graphics.Printing.PrintManager.ShowPrintUIAsync ( );
which shows error like
"An exception of type 'System.Runtime.InteropServices.COMException' occurred but was not handled in user code

WinRT information: Windows.Graphics.Printing.PrintManager is not supported on the view provided."

And our application works in Any CPU platform and for debugging this code i have to set specific CPU option,So is it possible configure Any CPU option

Please advise..

Thanks and regards
Krishna Prasad.

Vinoth Srinivasan [Syncfusion]
Replied On August 1, 2016 07:12 AM

Hi Krishna, 
 
Sorry for the inconvenience caused. 
 
We have modified the sample based on the reported issues. It can be downloaded from the below location. 
 
 
Also we have updated the sample in our below KB. 
 
 
Regards, 
Vinoth S. 


Krishna Prasad
Replied On August 11, 2016 07:56 AM

Hi Vinoth S,
Thank you for your response.
The given code is working fine,
if i do direct printing then its comes with default font and i can't able to customize it.

Please advice.


Regards,   
Krishna Prasad. 

Vinoth Srinivasan [Syncfusion]
Replied On August 12, 2016 03:22 AM

Hi Krishna, 
 
As the UWP doesn’t provide access to the installed font data, Unicode fonts cannot be embedded directly in PDF exported document. So we need to add required Unicode font files as an embedded resource to the application. The Unicode font streams need to be added to the Report Writer’s PDFFonts collection to export report as PDF format with Unicode fonts as shown in the below code snippet. 
 
writer.PDFFonts = new Dictionary<string, Stream>(); 
Stream fontStream = assembly.GetManifestResourceStream("UWPDirectPrinting.Assets.segoeui.ttf"); 
writer.PDFFonts.Add("Segoe UI", fontStream); 
 
We have modified the sample based on this and it can be downloaded from the below location. 
 
 
Regards, 
Vinoth S.  


Krishna Prasad
Replied On August 12, 2016 08:00 AM

Hi Team,
Thank you for your  quick response.
I had tried with the given font changing  code, 
then i am not able to print the report and if i  remove the  code its working fine.
I had added the fonts to my Assets folder and implemented the code provided by syncfusion.
Am i missing something?


Please advice.


Regards,   
Krishna Prasad. 

Vinoth Srinivasan [Syncfusion]
Replied On August 12, 2016 08:26 AM

Hi Krishna, 
 
We suspect that the Unicode font file stream added as null, please set the “Build Action” property of “segoeui.ttf” file as “Embedded Resource” type to add the font stream to Report Writer. 
 
Regards, 
Vinoth S. 


Krishna Prasad
Replied On November 9, 2016 08:24 AM

Hello Synfusion team!

The solution for direct printing from RDLC is really nice and working well.

However, one of the most used features in LOB application is printing directly to the laser printer without the pop-up. Because of the restrictions in UWP, for e.g. Epson has a e-POS SDK for the bridge to directly call the printer from the application which works within the UWP framework. We use it for the POS receipt printing.

We tried to use the  Brokered Windows Runtime Components using the Microsoft example with the synfusion RDLC print without much luck (VS2015TemplateBrokeredComponents.)

I will be great is Syncfusion can come up with the direct printing solution. 

Thanks again to the great product team at Syncfusion!.



Vinoth Srinivasan [Syncfusion]
Replied On November 17, 2016 07:02 AM

Hi Krishna, 
 
Thanks for contacting Syncfusion support. 
 
A support incident to track the status of this feature has been created under your account. Please log on to our support website to check for further updates. 
  
 
Regards, 
Vinoth S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;