mscorlib - 值不能为空 - 参数名称:值

发布于 2024-11-06 07:37:29 字数 2612 浏览 5 评论 0原文

我有一个已经构建了一段时间的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

那些过往 2024-11-13 07:37:29

从堆栈跟踪来看,您似乎正在添加无效的字体。确保用户已将其安装在其计算机上或选择更有保证的字体。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文