Been asked to create a new selection in menu for customer shipment entry

Hello,

I have been asked if I could add a print dialog in the Actions menu in Customer Shipment Entry.

We still use the client in Modern mode, not Kinetic.

I have copied the report I needed to modify and have made the changes.

I just have no idea on how to:

  1. Create a new menu item
  2. Have it trigger a print dialog
  3. Have that dialog use the report I created.

Any help is appreciated!

Its pretty easy. If you are worried about messing anything up, do it in the pilot first.

Here is an example menu item for a specific report:

The security ID and parent menu will depend on how your company does stuff. I would look at a menu item that already has the security you want and copy that.

To make myself clear, they wanted to add it to the Customer Shipment Entry screen pictured in screenshot below where the red line is.

I am unsure on how to add an item here.
I am unsure on how to point it to a print dialog that uses the report I created.

If you need more information, just let me know and I will provide it.

Yanked this out of a customization where I did the same thing:

	public void InitializeCustomCode()
	{
		// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
		// Begin Wizard Added Variable Initialization
		// End Wizard Added Variable Initialization
		// Begin Wizard Added Custom Method Calls
		// End Wizard Added Custom Method Calls

		PopupMenuTool varActionMenu;
		varActionMenu = (PopupMenuTool)baseToolbarsManager.Tools["ActionsMenu"];
		
		// Create a some tools and add them to the menu .
		ButtonTool menuButton1 = new ButtonTool("PrintRptTool");
		menuButton1.SharedProps.Caption = "Print Selected Records";
	
		baseToolbarsManager.Tools.Add(menuButton1);
	
	
		varActionMenu.Tools.AddTool("PrintRptTool");
		menuButton1.ToolClick += new ToolClickEventHandler(Print_toolclick);
	}

	public void Print_toolclick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs args)
	{
		LaunchFormOptions lfo = new LaunchFormOptions();
		lfo.IsModal = false;
		ProcessCaller.LaunchForm(oTrans, "OutRpt", lfo);
	}

I am getting this error.

Did you add any using statements at the top?

The type or namespace name ā€˜PopupMenuTool’ could not be found (are you missing a using directive or an assembly reference?)

1 Like

These are the usings. I would guess the last one is the one you need:

using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Ice.BO;
using Ice.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;
using Infragistics.Win.UltraWinToolbars;

You are correct, the last using statement was the one needed.

I can now make the menu item.

Your code points to a form called OutRpt.

How did you create that report?

Would that be a BAQ Report that uses the report I created?

Is this just a different Report Style of a built-in report? Or, what do you mean by copying the report? If it’s a custom report style, then what exactly is the business need for adding a separate Action menu item to launch this as opposed to simply selecting the custom style from the regular print dialog for that report?

Medium length story here…

When asked to create this, I was under the impression that it was a straight modification of the order entry report for Pro-forma invoice. It is to be a ā€˜Commercial Invoice’ that contains data from the pro-forma and some shipping information.

After making most of the modifications, I realized it was wanting specific shipping information that may not have been created at this point.

That meant that it would be better if printed from the Customer Shipment entry so I would be sure that the shipment information was created.

It was then pointed out that it would be better if it showed up as an option in the actions menu.

It may be possible to monkey around with a copy of the report style ā€˜Packing slip’ but would be messy, in my opinion.

At this point, I may just create a BAQ that would contain all the information I need and then create a BAQ report from that.

If I do that, would I just change the name in the previous code from ā€˜OutRpt’ to whatever the BAQ Report ID is?

If not, then how would I point the code to the BAQ Report I create?

If there is a better way, then please let me know.

Why, though? And as opposed to what? How were you planning to run this before? I’m still not sure what exactly you’ve made a copy of.

We are currently using a modified report style of the ā€˜PackSlip’ report as a commercial invoice (where previously we were using a straight copy of our Order Ack with the title changed). I suppose how messy it gets depends on how extensively you need to modify it. We only had to add one extra table (OrderRelTax) to the custom copy of the Report Data Definition and un-exclude a few columns, so for us, it wasn’t very messy at all. Shipping just picks that Report Style from the report dialog which shows up for Actions > Print in Customer Shipment Entry when they need it.

I’m not sure about the parameters on that ProcessCaller.LaunchForm() method. The ā€œOutRptā€ string might be the menu ID of the report, shown in Menu Maintenance?

Yes.