Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Active Reports Designer


oneyankfan1
 Share

Recommended Posts

Thank you in advance. I am customizing MILL2. I have got everything where I want it except when I open MILL and copy and paste the "-Setup Sheet (CAPTURES).rpx" SubReport to the bottom and try to preview it throws a warning. I attached a pic.

 

the details drop down says the following :

 

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Control name doesn't exist or invalid
Parameter name: name
   at DataDynamics.ActiveReports.ControlCollection.get_Item(String name)
   at DataDynamics.ActiveReports.ReportScript.Detail_Format()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at #Gpb.#Fpb.#Szb(String methodName, Object[] parameters, Boolean& success)
   at DataDynamics.ActiveReports.Section.#HBb(ActiveReport report, PointF location)
   at #mb.#vqb.#dzb(Section section)
   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.Section.#yBb(ActiveReport parentReport, #tqb rData)
   at #mb.#mqb.#NDb(Int32 pieceIndex)
   at #mb.#mqb.#LDb()
   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 DataDynamics.ActiveReports.ActiveReport.Run()
   at McamDES.rpxViewer.ViewerForm_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(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)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
ActiveReports_Designer
    Assembly Version: 1.0.5591.28682
    Win32 Version: 1.0.5591.28682
    CodeBase: file:///C:/Program%20Files/mcamX9/common/reports/ActiveReports_Designer.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
ActiveReports.Design6
    Assembly Version: 6.3.4797.0
    Win32 Version: 6.3.4797.0
    CodeBase: file:///C:/Program%20Files/mcamX9/common/reports/ActiveReports.Design6.DLL
----------------------------------------
ActiveReports.Viewer6
    Assembly Version: 6.3.4797.0
    Win32 Version: 6.3.4797.0
    CodeBase: file:///C:/Program%20Files/mcamX9/common/reports/ActiveReports.Viewer6.DLL
----------------------------------------
ActiveReports6
    Assembly Version: 6.3.4797.0
    Win32 Version: 6.3.4797.0
    CodeBase: file:///C:/Program%20Files/mcamX9/common/reports/ActiveReports6.DLL
----------------------------------------
System.Drawing.Design
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing.Design/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.Design.dll
----------------------------------------
System.Design
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Design/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Security
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Security/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Security.dll
----------------------------------------
ActiveReports.Document
    Assembly Version: 6.3.4797.0
    Win32 Version: 6.3.4797.0
    CodeBase: file:///C:/Program%20Files/mcamX9/common/reports/ActiveReports.Document.DLL
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 12.0.51209.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
ActiveReports.Chart
    Assembly Version: 6.3.4797.0
    Win32 Version: 6.3.4797.0
    CodeBase: file:///C:/Program%20Files/mcamX9/common/reports/ActiveReports.Chart.DLL
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
ActiveReports.HtmlExport
    Assembly Version: 6.3.4797.0
    Win32 Version: 6.3.4797.0
    CodeBase: file:///C:/Program%20Files/mcamX9/common/reports/ActiveReports.HtmlExport.DLL
----------------------------------------
ActiveReports.RtfExport
    Assembly Version: 6.3.4797.0
    Win32 Version: 6.3.4797.0
    CodeBase: file:///C:/Program%20Files/mcamX9/common/reports/ActiveReports.RTFExport.DLL
----------------------------------------
ActiveReports.TextExport
    Assembly Version: 6.3.4797.0
    Win32 Version: 6.3.4797.0
    CodeBase: file:///C:/Program%20Files/mcamX9/common/reports/ActiveReports.TextExport.DLL
----------------------------------------
mex54yli
    Assembly Version: 0.0.0.0
    Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

 

post-46368-0-68808800-1434031691_thumb.png

Link to comment
Share on other sites

System.ArgumentException: Control name doesn't exist or invalid Parameter name: name

 

Did you delete or rename any controls on that report? Open the report in the designer and at the bottom there are two tabs, one named Script, click that and see if there is some code in there referencing a control that does not exist on the report.

Link to comment
Share on other sites

I opened the "-Setup Sheet (CAPTURES).rpx" by itself outside of the MILL2 file and it wont preview by itself, but the script contained is as follows :

 

public void Detail_Format()
{
  string m_machine = ((TextBox)rpt.ParentReport.Sections["Detail"].Controls["Data_NAME"]).Text;
  string m_imx = ((Label)rpt.Sections["Detail"].Controls["IMAGE_LIST"]).Text;
 rpt.Sections["Detail"].AddBookmark (m_machine + "\\" + m_imx);
}

Link to comment
Share on other sites

Hmm I think I had something with this a long time ago. The machine definition and control you are using for this.. do they have spaces in the name? That may be the culprit. Did you try to preview it with the default mill?

Link to comment
Share on other sites

Make sure the controls named Data_NAME (textbox) and IMAGE_LIST (label) exist in the Detail of the report as they are being referenced in this code. 

 

 

public void Detail_Format()
{
  string m_machine = ((TextBox)rpt.ParentReport.Sections["Detail"].Controls["Data_NAME"]).Text;
  string m_imx = ((Label)rpt.Sections["Detail"].Controls["IMAGE_LIST"]).Text;
 rpt.Sections["Detail"].AddBookmark (m_machine + "\\" + m_imx);
}

Link to comment
Share on other sites

}

 

Make sure the controls named Data_NAME (textbox) and IMAGE_LIST (label) exist in the Detail of the report as they are being referenced in this code. 

 

 

public void Detail_Format()
{
  string m_machine = ((TextBox)rpt.ParentReport.Sections["Detail"].Controls["Data_NAME"]).Text;
  string m_imx = ((Label)rpt.Sections["Detail"].Controls["IMAGE_LIST"]).Text;
 rpt.Sections["Detail"].AddBookmark (m_machine + "\\" + m_imx);
}

 

Again forgive me, where do you mean the "Detail" of the report?

Link to comment
Share on other sites

The control Data_NAME was missing from the main report this was causing the exception, I added it back to your report (see images)

 

The two sub reports where also pointing to the original reports so I edited the names to match yours (see images)

 

I have attached the reports below, worked fine for me.

post-4901-0-37306800-1434047459_thumb.png

post-4901-0-74672700-1434047462_thumb.png

post-4901-0-57516500-1434047465_thumb.png

SST.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...