我正在使用Microsoft.Reporting.WebForms
命名空间并尝试从我的localreport对象呈现数据,以便在客户端进行打印。
byte[] bytes = myReportViewer.LocalReport.Render("PDF");
File.WriteAllBytes("test.pdf", bytes); // I will normally return bytes here but for testing I am writing to a file
输出pdf文件显示的是小方框而不是条形码。看来pdf不支持 code128 字体。
来自客户端的内置exportReport method使用尖锐的条形码完美地导出pdf。但我试图渲染数据并将其作为字节数组返回。我无法弄清楚这个客户端方法和服务器端渲染方法之间的区别。他们使用不同的逻辑吗?
如果你能指导我某个方向,我将不胜感激。
感谢。
答案 0 :(得分:0)
这似乎是Microsoft Reporting Services 10.0.0的一个已知错误。经过大量的谷歌搜索,我停下来检查我的引用文件。事实证明我引用了Microsoft.Reporting.WebForms
的第10版,尽管在我的其他项目中它是版本11。
因此,如果有人遇到同样的问题,请确保您没有使用版本10 dll文件。