Error Launching Report Quantity From Custom Button

Hi All,

Receiving an error when launching ReportQty (error shown below) from custom btn in MES. I am passing empID, dtlLaborHedSeq and dtlLaborDtlSeq. Seems to fail just before calling method ‘GetNewReportQty’. Double checked parameters and they are correct as the standard Report Quantity button works fine for this particular labordtl row. Also tried a hashtable but not joy! Any ideas? Using 10.1.

Message: Index 0 is either negative or above rows count.
Program: System.Data.dll
Method: GetRow

Code…

LaunchFormOptions launchObject = new LaunchFormOptions
{
IsModal = false,
SuppressFormSearch = true,
ValueIn = empID + “,” + dtlLaborHedSeq + “,” + dtlLaborDtlSeq
};
ProcessCaller.LaunchForm(oTrans, “MES_RQ”, launchObject);

Each screen has it’s own nuances. You will need to check if the screen is expecting a contextvalue or valuein. Next, is it expecting the value in the format you have with commas (unlikely) or tilde or a SysRowID?

How can I establish whether the menu is expecting a contextvalue or valuein and delimiter type? I’m inspecting menu DLL but haven’t looked at these in detail before.

I’m sure someone knows better how to find out. Mine has been more trial and error in the past.
If you customize the Report Qty screen you can show the ValueIn and ContextValue in a message box. Then at least you can see what it is expecting.

one of the good thread i used to construct my code to pass parameters from a UI, to a dashboard form at loading event.