2011-05-09 126 views
0

我有一个VB.net应用程序已经建立了一段时间。我最近在其中一份报告中的活跃报告6中添加了条形码。mscorlib - 值不能为空 - 参数名称:值

一切正常,我的机器上不如别人,而是有选择的几个获得有关以下内容的错误:

的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吗?我不知道为什么会出现这个错误。

谢谢

回答

1

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

+0

@pickypg可以这是条码风格?我把它设置为128auto,其他的一切都是tahoma和arial – Jeff 2011-05-09 16:42:02

+0

@Jeff这听起来像是最有可能的候选人。一个简单的方法可以找到一个带有几个Try/Catch块的版本来寻找罪恶派对。 – pickypg 2011-05-09 16:46:24

+0

@pickypg try/catch with err.description and source刚刚返回的mscorlib值不能为null参数值 - 它在rp.run上暂停 – Jeff 2011-05-09 16:48:04

相关问题