mscorlib - 值不能为空 - 参数名称:值
我有一个已经构建了一段时间的 VB.net 应用程序。我最近在活动报告 6 中向其中一份报告添加了条形码。
在我的机器和其他机器上一切正常,但少数机器会出现与以下内容相关的错误:
mscorlib - 值不能为空 - 参数名称:值
代码如下:
Dim rp As New ARPTSpecialOrderCard
CType(rp.Sections("pgDetails").Controls("labelVendorPhone"), DataDynamics.ActiveReports.Label).Text = Me.LabelVendorTelephone.Text
CType(rp.Sections("pgDetails").Controls("labelID"), DataDynamics.ActiveReports.Label).Text = Me.orderid.ToString
CType(rp.Sections("pgDetails").Controls("bcID"), DataDynamics.ActiveReports.Barcode).Text = Me.orderid.ToString
rp.Run()
frmARViewer.Viewer1.Document = rp.Document
frmARViewer.ShowDialog()
异常文本:
> ************** Exception Text ************** System.ArgumentNullException: Value
> cannot be null. Parameter name: value
> at
> System.Collections.CollectionBase.OnValidate(Object value) at
> System.Collections.CollectionBase.System.Collections.IList.Add(Object value) at
> DataDynamics.ActiveReports.Document.FontsCollection.Add(Font inFont) at
> #f.#iZi.set_Font(Font value) at
> DataDynamics.ActiveReports.Label.#Pvb(GraphicsCache cache, Page page, PointF pageOffset, Single startPos, Single endPos) at
> DataDynamics.ActiveReports.ARControl.Render(GraphicsCache gRef, Page page, PointF pageOffset, Single startPos, Single endPos) at
> DataDynamics.ActiveReports.Section.Render(GraphicsCache cache, Page page, #Ppb drawingLog, PointF pageOffset, Single pageWidth, Single drawStartPos, Single drawEndPos) at
> DataDynamics.ActiveReports.Section.Render(GraphicsCache cache, #rqb rData, #Ppb drawingLog) at
> #mb.#mqb.#LDb() at
> #mb.#mqb.#SDb(Section section, Int32 insPos) at
> #mb.#vqb.#vEb() at
> #mb.#vqb.#qEb(Page newPage, Single left, Single top, Single right, Single bottom, UInt32 flags, UInt32& status) at
> DataDynamics.ActiveReports.ActiveReport.#4yb() at
> DataDynamics.ActiveReports.ActiveReport.Run(Boolean syncDocument) at
> SpecialOrderSystem.soFRMViewOrder.pbPrintPO_Click(Object sender, EventArgs e) at
> System.Windows.Forms.Control.OnClick(EventArgs e) at
> System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at
> System.Windows.Forms.Control.WndProc(Message& m) at
> System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at
> System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
我需要更新用户计算机上的 mscorlib.dll 吗?我不确定为什么会发生这个错误。
谢谢
I have a VB.net application that has been built for awhile. I recently added a barcode in active reports 6 to one of the reports.
everything works fine on my machine as well as others, but a select few get an error relating to the following:
mscorlib - value cannot be null -
parameter name: value
there code is as follows:
Dim rp As New ARPTSpecialOrderCard
CType(rp.Sections("pgDetails").Controls("labelVendorPhone"), DataDynamics.ActiveReports.Label).Text = Me.LabelVendorTelephone.Text
CType(rp.Sections("pgDetails").Controls("labelID"), DataDynamics.ActiveReports.Label).Text = Me.orderid.ToString
CType(rp.Sections("pgDetails").Controls("bcID"), DataDynamics.ActiveReports.Barcode).Text = Me.orderid.ToString
rp.Run()
frmARViewer.Viewer1.Document = rp.Document
frmARViewer.ShowDialog()
Exception text:
> ************** Exception Text ************** System.ArgumentNullException: Value
> cannot be null. Parameter name: value
> at
> System.Collections.CollectionBase.OnValidate(Object value) at
> System.Collections.CollectionBase.System.Collections.IList.Add(Object value) at
> DataDynamics.ActiveReports.Document.FontsCollection.Add(Font inFont) at
> #f.#iZi.set_Font(Font value) at
> DataDynamics.ActiveReports.Label.#Pvb(GraphicsCache cache, Page page, PointF pageOffset, Single startPos, Single endPos) at
> DataDynamics.ActiveReports.ARControl.Render(GraphicsCache gRef, Page page, PointF pageOffset, Single startPos, Single endPos) at
> DataDynamics.ActiveReports.Section.Render(GraphicsCache cache, Page page, #Ppb drawingLog, PointF pageOffset, Single pageWidth, Single drawStartPos, Single drawEndPos) at
> DataDynamics.ActiveReports.Section.Render(GraphicsCache cache, #rqb rData, #Ppb drawingLog) at
> #mb.#mqb.#LDb() at
> #mb.#mqb.#SDb(Section section, Int32 insPos) at
> #mb.#vqb.#vEb() at
> #mb.#vqb.#qEb(Page newPage, Single left, Single top, Single right, Single bottom, UInt32 flags, UInt32& status) at
> DataDynamics.ActiveReports.ActiveReport.#4yb() at
> DataDynamics.ActiveReports.ActiveReport.Run(Boolean syncDocument) at
> SpecialOrderSystem.soFRMViewOrder.pbPrintPO_Click(Object sender, EventArgs e) at
> System.Windows.Forms.Control.OnClick(EventArgs e) at
> System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at
> System.Windows.Forms.Control.WndProc(Message& m) at
> System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at
> System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Do I need to update the mscorlib.dll on the users machine? I'm not sure why this error is happening.
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从堆栈跟踪来看,您似乎正在添加无效的字体。确保用户已将其安装在其计算机上或选择更有保证的字体。
From the stack trace, it appears that you are adding an invalid Font. Ensure that the user has it installed on their machine or select a more guaranteed font.