Report/Request Form

msraetsenmsraetsen Member Posts: 8
edited 2004-05-19 in Navision Financials
Is there any way to get the Rec passed to a report using RUNMODAL(REPORT_ID, TRUE, FALSE, Rec) on the Request Form? Even if I can get the filter that shows up (and then I can get the record myself) that would be okay. E.g. If I run the Purchase Order Report from the Purchase Order Form, the Request Form shows the No. Filter for the specified Rec. Can I get this Filter? I can't figure this out because when the Request Form runs the Purchase Header record is empty.

Also, is there a way to save off the options selected in the Options tab of the Request Form without the user having to close the Report?

I'll explain what exactly I'm trying to do:
I call the report from a form. When the Request Form shows up, the user picks their options on the Options tab. If they click e-mail report, I want to recall the report (I have to do this so the Printer Dialog doesn't show up). But I need the initial record, and the subsequent call to the report has to pick up any options that they had selected.

Please let me know if I can clarify anything that would help somebody understand the problem better.

Any help is greatly appreciated.
Thanks,
Mark.

Comments

  • stamenstamen Member Posts: 13
    Create function
    SetVariables(YourRecord : Record)
    BEGIN
    NewRecord := YourRecord;
    END;

    in the report.
    In the other object set variable to this report and enter this code

    RepVar.SetVariables(Rec);
    RepVar.SETTABLEVIEW(Rec);
    RepVar.RUN;


    In RequestForm use NewRecord variable.

    Best regards
    Stamen Delikostov
    Intelligent Sysytems Bulgaria Ltd.
    email: s.delikostiv@intellisyst.com
  • bill_carsonbill_carson Member Posts: 8
    It doesn't work :(. I have a filter on "Location Filter" field and have a textbox "LocationCode" on request form. I can't fill field "LocationCode" from NewRecord."Location Filter". It's empty... Maybe i do something wrong...
  • RobertMoRobertMo Member Posts: 484
    to read flow filter (in your case "Location filter"), you must actaully use Getfilter function on this flow filter field.
    LocationCode := NewRecord.GETFILTER("Location Filter")

    Beware that getfilter returns string so thi will work only when single filter is applied. If you set range or any other filter you will have to do some more coding...
               ®obi           
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Sign In or Register to comment.