Options

Recover the value of the field

averiasaverias Member Posts: 22
Hello to all, maybe my question can that it is very simple:

I load and I execute a report with


TrackingSpecification.SETRANGE("Item No.",TrackingSpecification."Item No.");
REPORT.RUNMODAL(99001,TRUE,FALSE,TrackingSpecification);

How can I recover the value of the field "Item No." inside the report 99001 and to keep it in a variable?

Thanks and regards

Comments

  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Try this:
    codItemNo := TrackingSpecification.GETFILTER("Item No.");
    
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Options
    averiasaverias Member Posts: 22
    It doesn't work. I should create a variable 'TrackingSpecification' of the type Record, but it doesn't happen anything. Does some way exist of recovering a value that is passed to a Report? The value of the field "Item No." it is sent to the Report. I visualize it in the filter of the DataItem but not you how I can store it in a variable in C/AL.
  • Options
    eromeineromein Member Posts: 589
    It should work!

    Alternative it to define a function in the report called "SetParameter" or SetItemNo.
    Function SetItemNo (SetItemNo: code 20)
      ItemNo := SetItemNo
    

    Good luck!
    "Real programmers don't comment their code.
    If it was hard to write, it should be hard to understand."
  • Options
    averiasaverias Member Posts: 22
    Thanks to all for their help. At the end, I got that it will work well.
Sign In or Register to comment.