InventoryMovement ProcessCaller.LaunchForm

customization
printing
e10

(Peter) #1

Hi everybody,

I launch InventoryMovement by ProcessCaller with the good context.
The printing work properly.
But each time I launch InventoryMovement by ProcessCaller. I get this error :


Application Error

Exception caught in: Erp.UIRpt.InventoryMovement

Error Detail

Message: Object reference not set to an instance of an object.
Program: Erp.UIRpt.InventoryMovement.dll
Method: setReportParams

Client Stack Trace

at Erp.UI.Rpt.InventoryMovement.Transaction.setReportParams(LaunchFormOptions lfo)

Can someone help me about that, please ?


Here my code to lunch Inventory Movement with the paramaters :

StringDictionary reportParameters = new StringDictionary();
reportParameters.Add(“KPartTranPKs”, CallPartTranAdapterGetRowsMethod()); //here, return a ToString()
reportParameters.Add(“KInvMovmntReportID”, “IssMatInvMvm”);
LaunchFormOptions lfo = new LaunchFormOptions();
lfo.IsModal = true;
lfo.ContextValue = reportParameters;
ProcessCaller.LaunchForm(this.oTrans, “PRTRN001”, lfo); //Open Erp.UIRpt.InventoryMovement.dll
lfo.IsModal = true;

Thank you very much for the help.


(Jose C Gomez) #2

You are passing something in the ValueIn it isn’t expecting.


(Peter) #3

Hi Jose C Gomez,

Thank you for the reply.

I will show you my code. (I always do the same way without any error).

StringDictionary reportParameters = new StringDictionary();
reportParameters.Add(“KPartTranPKs”, CallPartTranAdapterGetRowsMethod()); //here, return a ToString()
reportParameters.Add(“KInvMovmntReportID”, “IssMatInvMvm”);
LaunchFormOptions lfo = new LaunchFormOptions();
lfo.IsModal = true;
lfo.ContextValue = reportParameters;
ProcessCaller.LaunchForm(this.oTrans, “PRTRN001”, lfo); //Open Erp.UIRpt.InventoryMovement.dll
lfo.IsModal = true;

what wrong with the parameters, please ?

Thank you very much.


(Peter) #4

Would someone have a hint about this ?

I search again and no result.

I think Erp.UIRpt.InventoryMovement.dll wait for a ReportID. because this windows can be open by Issue Material or Return Material…

Thank you.


(Jeremy Chance) #5

I would simply try and open the report screen first, without the parameters and see if you get any errors. If you don’t, you definitely know there’s something wrong with the paramters themselves. I’ve never opened a rpt screen with paramters, but i have just printed a report using parameters (skipping the screen entirely), so this can be done.


(Peter) #6

Hi Chan,

Sorry to reply you late.

Depends the context, you need to pass the parameters in the good type.

Sometimes, you must send a Hashtable or Array, etc. in the ValueIn.

Thank you for the reply.


(Theodore Koch) #7

The setReportParams method is expecting a hashtable to be present in the LaunchFormOptions.ValueIn property which you aren’t setting.

image