Passing Variables / strings to a report at runtime

brucembrucem Member Posts: 86
edited 2000-07-25 in Navision Financials
Hi,

I have a report that can be run from two different areas of the sales & Receivables, Sales orders and Sales Shipments.

The reports data comes from an area not related directly to sales order line or sales shipment line, but if i run the report from the sales shipment form i want to include three items from the sales shipment header/ line table. Shipment Number, Customer Order number, Qty shipped.

I thought it would be a good idea to pass these three variables to the report and if they are non zero contruct some strings that will then appear in text boxes on the report.

At present i am passing the shipment line to a function which sets the table views then runs the report, so i could easily tag the three variables on to pass to the function

The trick is how can i get the report to accept three variable which i could then check ??

Any help much appreciated

Bruce

Comments

  • John_TegelaarJohn_Tegelaar Member Posts: 159
    Put the objects, where the variable information is connected to, in a separate section in the report, and use the SHOWOUTPUT method to show these or not, depending on the passed variables being empty.

    John
  • Otto_DreyerOtto_Dreyer Member Posts: 16
    Create 3 global variables in your report, i.e. ShipmentNo, OrderNo, QtyShipped.

    Create function SetData in the report, i.e.

    SetData(inShipmentNo,inOrderNo,inQtyShipped)
    begin
    ShipmentNo := inShipmentNo;
    OrderNo := inOrderNo;
    QtyShipped := inQtyShipped;
    end

    Use values of these variables in your report.

    Call your report like:

    ReportX.SetData(...)
    ReportX.RUN


    [This message has been edited by Otto Dreyer (edited 25-07-2000).]
  • brucembrucem Member Posts: 86
    Thanks to you both for the quick replies !

    all systems are now go, I did have to modify it slightly as there seems to be problems in identifying the row in the subform that is active( form the header), although the function in the subform does know.

    In the end i passed two values and picked the third from the rec

    Thanks again

    Bruce
Sign In or Register to comment.