Passing Parameter as a Wild Card

jaustinjaustin Member Posts: 21
I have a report that runs and passes parameters to another report that prints bar code labels. What I need to know is.... can I pass a parameter that contains the * (wildcard) character that the 2nd report will be able to use correctly?

Example: Currently, I pass the User ID and PO# (i.e. PO-0001) to the 2nd report which will print a label for this PO# if it was created by this user. This works great.

IF PrintMES THEN BEGIN
CLEAR(MESPrint);
MESPrint.SetParams("Inventory Valuation"."Purchase Order",USERID);
MESPrint.RUN;
END

What I would like to do is, pass the User ID and wildcard character for the PO# (i.e. PO-*) to the 2nd report which would then print all PO's starting with "PO-" for this user.

Kind of like when you do a 'Field Filter' within a NAV table.....

Any ideas?

Thanks,
Jim

Comments

  • girish.joshigirish.joshi Member Posts: 407
    Yes, you absolutely can.
    filterstring := 'PO-*' ; 
    MESPrint.setparams("inventory valuation"."Purchase Order",USERID,filterstring) ; 
    
    ... and in MESPrint.setparams....
    
    PurchLine.setfilter("Document No.",'%1',filterstring) ; 
    
    

    That is assuming that PurchLine is the variable in SetParams that you want to filter of course.
Sign In or Register to comment.