ReportView导出PDF报PInvokeStackImbalance错误

本文介绍了一个关于ReportView在Debug模式下导出含有中文字符的PDF时出现PInvokeStackImbalance错误的问题。该问题在Release模式或直接运行exe文件时不会出现。文章提供了复现步骤及微软对此问题的解释。

ReportView转PDF报PInvokeStackImbalance错误 

在调试模式Debug运行程序,如果报表中有中文字符导出PDF会报PInvokeStackImbalance错误 ,这是一个已知错误,用Release模式执行正常,直接运行exe文件也正常,解决方法就是:不用Debug运行程序导出PDF。

微软的解释:
1.    Create a new Windows Application Project
2.    Create a new Report
3.    Add one Textbox control to the Report and type a Chinese text in the Textbox.
4.    Add ReportViewer control to Form1 and set its report to the one created in step 3 (no need to set the data sources).
5.    Run the application and attempt to export the report to PDF.
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值