我即将完成并运行我的上一份报告。我在其他报告中没有遇到过这个问题。我正在尝试根据数据库记录创建报告。当我通过 LocalReport 创建报告并为报告创建参数时,收到错误消息“托管调试助手‘PInvokeStackImbalance’:‘调用 PInvoke 函数’Microsoft.ReportViewer.Common!Microsoft.ReportingServices.Rendering.ImageRenderer”。 FontPackage::CreateFontPackage' 使堆栈不平衡。这可能是因为托管 PInvoke 签名与非托管目标签名不匹配。检查 PInvoke 签名的调用约定和参数是否与目标非托管签名匹配。这是我的 MVC 项目的 .rdlc 报告。记录是正确的并且插入了值,但是当我去显示它/创建它时,报告错误。在行 'renderedBytes = localReport.Render(
/* TRACKER_TEST Database Connection ~ Debugging & Testing */
TRACKER_TESTDataSet dataSet = new TRACKER_TESTDataSet();
TRACKER_TESTDataSetTableAdapters.Service_Report_FieldsTableAdapter adapter = new TRACKER_TESTDataSetTableAdapters.Service_Report_FieldsTableAdapter();
LocalReport localReport = new LocalReport();
localReport.ReportPath = Server.MapPath("~/ReportForms/VirtualService2.rdlc");
List<TRACKER_TESTDataSet.Service_Report_FieldsRow> report = new List<TRACKER_TESTDataSet.Service_Report_FieldsRow>();
foreach(var row in list)
{
report.Add(adapter.GetDataBy(row.SN1, row.SN2).First());
}
ReportDataSource rds = new ReportDataSource("Service_Data", report);
localReport.DataSources.Add(rds);
// command specifies whether its a PDF EXCEL WORD IMAGE doc
string reportType = command;
string mimeType, encoding, fileNameExtension;
string deviceInfo =
"<DeviceInfo>" +
" <OutputFormat>" + command + "</OutputFormat>" +
" <PageWidth>8.5in</PageWidth>" +
" <PageHeight>11in</PageHeight>" +
" <MarginTop>0.5in</MarginTop>" +
" <MarginLeft>0.3in</MarginLeft>" +
" <MarginRight>0.3in</MarginRight>" +
" <MarginBottom>0.5</MarginBottom>" +
"</DeviceInfo>";
Warning[] warnings;
string[] streams;
byte[] renderedBytes;
}
慕哥6287543
猛跑小猪
手掌心
杨魅力
MMTTMM
万千封印
相关分类