是C# .错误信息如下: Microsoft.Reporting.WinForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.Reporting.DefinitionInvalidException: The definition of the report 'Main Report' is invalid. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC2000] compiler initialization failed unexpectedly: Unable to find required file 'Microsoft.VisualBasic.dll'.’.说明,本人打包了.NET框架,客户可以选择是否安装。
Microsoft.Reporting.WinForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.Reporting.DefinitionInvalidException: The definition of the report 'Main Report' is invalid. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC2000] compiler initialization failed unexpectedly: Unable to find required file 'Microsoft.VisualBasic.dll'.’.说明,本人打包了.NET框架,客户可以选择是否安装。
举个例子,如果你要加个用个换行应该写完整的带命名空间的表达式
=Parameters!ABC.Value+System.Environment.NewLine
=Fields!a.Value & Fields!b.Value而这样=Fields!a.Value则没问题
如果你是想做与操作,用And
另外Framework当然要装,不装ReportViewer怎么可能跑得起来.
=Fields!xm.Value.ToString() + Fields!xh.Value.ToString()
在rdlc报表里,上面的二个效果好像一样的,二种写法在开发的电脑上均能通过。放到另一台电脑上就不行。我的想法是在C#中直接引用Microsoft.VisualBasic.dllFramework不用安装也可以跑,就像飞信
Microsoft.ReportViewer.ProcessingObjectModel.dll
Microsoft.ReportViewer.WinForms.dll只要引入这三个dll,不用安装ReportViewer查看器一样行