【问题标题】:JasperReports in .Net over IKVM.Net 中的 JasperReports 通过 IKVM
【发布时间】:2009-12-30 20:30:55
【问题描述】:

我愿意在 .Net 中使用 JasperReports。

我使用 IKVM.net 构建了所需的 DLL,并翻译了一个示例应用程序。

但我在 C# 中得到了 NotImplementedExeption(Java 中的等效代码完美运行)

JasperPrint print = JasperFillManager.fillReport(jasperFileDialog.FileName, null, new JREmptyDataSource());

方法或操作没有实现。

查看下面的堆栈跟踪


注意事项: IKVM 版本:0.40.0.1http://sourceforge.net/projects/ikvm/files/ikvm/0.40.0.1/ikvmbin-0.40.0.1.zip/download


异常堆栈跟踪

在 net.sf.jasperreports.engine.fill.JRBaseFiller.fill(地图参数值) 在 net.sf.jasperreports.engine.fill.JRBaseFiller.fill(映射参数值,JRDataSource ds) 在 net.sf.jasperreports.engine.fill.JRFiller.fillReport(JasperReport jasperReport,地图参数,JRDataSource 数据源) 在 net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperReport jasperReport,地图参数,JRDataSource 数据源) 在 net.sf.jasperreports.engine.JasperFillManager.fillReport(字符串 sourceFileName,地图参数,JRDataSource 数据源) 在 Jasper.Net.Form1.ExportButton_Click(Object sender, EventArgs e) 在 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 事件) 在 System.Windows.Forms.Control.WmMouseUp(消息和 m,MouseButtons 按钮,Int32 点击) 在 System.Windows.Forms.Control.WndProc(消息和 m) 在 System.Windows.Forms.ButtonBase.WndProc(消息和 m) 在 System.Windows.Forms.Button.WndProc(消息和 m) 在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(消息& m) 在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(消息和 m) 在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,Int32 msg,IntPtr wparam,IntPtr lparam) 在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(味精和味精) 在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID,Int32 原因,Int32 pvLoopData) 在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 原因,ApplicationContext 上下文) 在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 原因,ApplicationContext 上下文) 在 System.Windows.Forms.Application.Run(窗体 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(程序集程序集,字符串 [] 参数) 在 System.AppDomain.ExecuteAssembly(字符串 assemblyFile,证据 assemblySecurity,String [] args) 在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() 在 System.Threading.ThreadHelper.ThreadStart_Context(对象状态) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback 回调,对象状态) 在 System.Threading.ThreadHelper.ThreadStart()

【问题讨论】:

  • 尝试使用反射器检查生成的dll中的方法定义/声明
  • 您的堆栈跟踪没有显示 NotImplementedExeption 的来源。没有这些信息就无法回答。
  • 你有没有得到这个工作?
  • 不,我已移至 Microsoft Reporting Services

标签: .net reporting jasper-reports ikvm


【解决方案1】:

当 Jasper Reports jar 依赖于另一个 jar 时,通常会发生 class not found 异常。例如,如果jasperreport.jar 使用另一个jar,如log4net.jar,则首先需要将依赖的jar 转换为dll。然后在jasperreport的转换过程中使用转换后的dll进行链接。我在将 Apache POI 转换为 dll 时遇到了同样的问题。

【讨论】:

    猜你喜欢
    • 2011-09-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-11
    • 2011-05-07
    相关资源
    最近更新 更多