.NetでJasperReportsを使用したいと思います。
IKVM.netを使用してこれに必要なDLLを構築し、サンプルアプリを翻訳しました。
しかし、C#でNotImplementedExeptionを取得します(Javaの同等のコードは完全に機能します)
JasperPrint print = JasperFillManager.fillReport(jasperFileDialog.FileName, null, new JREmptyDataSource());
メソッドまたは操作は実装されていません。
以下のスタックトレースを参照してください
注: IKVMバージョン:0.40.0.1 http://sourceforge.net/projects/ikvm/files/ikvm/0.40.0.1/ikvmbin-0.40.0.1.zip/download
- JasperReports 3.7.0プロジェクトをダウンロードし、すべてのjarを\ libにグループ化し、JasperReports-3.7.0.jarを1つのフォルダーにグループ化しました
- jar2ikvmcを使用してikmvcスクリプトを生成しましたhttp://code.google.com/p/jar2ikvmc/downloads/list
- スクリプトを実行すると、ClassNotDefoundの警告がたくさん表示されます
- ikvm-native.dllを除くすべてのIKVMdllに加えて、C#アプリのすべてのDLLを参照しました
例外スタックトレース
net.sf.jasperreports.engine.fill.JRBaseFiller.fill(Map parameterValues)で net.sf.jasperreports.engine.fill.JRBaseFiller.fill(Map parameterValues、JRDataSource ds)で net.sf.jasperreports.engine.fill.JRFiller.fillReport(JasperReport jasperReport、マップパラメーター、JRDataSource dataSource) net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperReport jasperReport、マップパラメーター、JRDataSource dataSource) net.sf.jasperreports.engine.JasperFillManager.fillReport(String sourceFileName、Map parameters、JRDataSource dataSource)で Jasper.Net.Form1.ExportButton_Click(Object sender、EventArgs e)in C:\ Documents and Settings \ Administrator \ My Documents \ Visual Studio 2008 \ Projects \ Jasper.Net \ Jasper.Net \ Form1.cs:line 39 System.Windows.Forms.Control.OnClick(EventArgs e)で System.Windows.Forms.Button.OnClick(EventArgs e)で System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)で System.Windows.Forms.Control.WmMouseUp(Message&m、MouseButtonsボタン、Int32クリック) System.Windows.Forms.Control.WndProc(Message&m)で System.Windows.Forms.ButtonBase.WndProc(Message&m)で System.Windows.Forms.Button.WndProc(Message&m)で System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&m)で System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&m)で System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd、Int32 msg、IntPtr wparam、IntPtr lparam)で System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&msg)で System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID、Int32 reason、Int32 pvLoopData)で System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason、ApplicationContext context)で System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32理由、ApplicationContextコンテキスト)で System.Windows.Forms.Application.Run(Form mainForm)で Jasper.Net.Program.Main()のC:\ Documents and Settings \ Administrator \ My Documents \ Visual Studio 2008 \ Projects \ Jasper.Net \ Jasper.Net \ Program.cs:line 18 System.AppDomain._nExecuteAssembly(アセンブリアセンブリ、String [] args)で System.AppDomain.ExecuteAssembly(String assemblyFile、Evidence assemblySecurity、String [] args)で Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()で System.Threading.ThreadHelper.ThreadStart_Context(オブジェクト状態)で System.Threading.ExecutionContext.Run(ExecutionContextexecutionContext、ContextCallbackコールバック、オブジェクト状態)で System.Threading.ThreadHelper.ThreadStart()で