You really shouldn't use Microsoft.ReportViewer.WebForms in ASP.NET MVC.
Rather just call your report server and get the report needed.
public async Task<FileStreamResult> GenerateReport()
{
CredentialCache credentialCache = new CredentialCache();
credentialCache.Add(new Uri("http://domainORipaddress"), "NTLM", new NetworkCredential(
ConfigurationManager.AppSettings["username"],
ConfigurationManager.AppSettings["password"]
));
Stream report = null;
using (var httpClient = new HttpClient(new HttpClientHandler { Credentials = credentialCache }))
{
//put the desired timeout here if needed to cancel the task
httpClient.Timeout = TimeSpan.FromMilliseconds(Timeout.Infinite);
report = await httpClient.GetStreamAsync("reportUrl");
}
Response.AppendHeader("Content-Disposition", String.Format("attachment;filename=\"{0}\"", reportName));
return File(reportPath, MediaTypeNames.Application.Pdf);
}
Reference: SQL Server Reporting Service with ASP.NET MVC
Font embedding was introduced:
SQL Server 2008 Cumulative Update 1 (full font embedding and subsetting for Unicode characters)
SQL Server 2005 Service Pack 3 (limited to non ANSI characters)
Reference: Do You Unicode in PDF?
Font embedding does no longer matter what version of a font is installed on a client - the documents can be viewed the same way regardless of client operating systems, font versions, and client PDF viewer.
So when you disable fonts embedding you are basically reverting back to the old behavior.
How do disable:
- Open the RSreportserver.config file under the path: RS Installation Folder\Reporting Services\ReportServer
Reference: Modify a Reporting Services Configuration File (RSreportserver.config)
Find the following
<Extension Name="PDF" Type="
Microsoft.ReportingServices.Rendering.ImageRenderer.PdfReport,
Microsoft.ReportingServices.ImageRendering"/>
Add the following
<Configuration>
<DeviceInfo>
<EmbedFonts>None</EmbedFonts>
</DeviceInfo>
</Configuration>
You would need to do an IISReset (IISReset stops and restarts the entire web server (including non-ASP.NET apps) to set the changes.
Reference: How to disable this Font embedding in Reporting Services 2005 Service Pack 3?