a very short question

I can not figure out how does the posted invoice printout work, so that it prints only active invoice data. I have to do secondary report executed after the invoice printout but can’t explain to the report that i need only this certain invoice, not all of them :P. Anyway to run the report WITH parameters? Annar

You need to set a filter on a Sales Header record and RUN report using this record as parameter: CurrForm.SETSELECTIONFILTER(SalesInvHeader); REPORT.RUN(REPORT::"Sales Invoice",TRUE,FALSE,SalesInvHeader);

If “No. Printed” (number of times printed) is Zero then it hasn’t been printed. So when printing if you set the filter No.Printed=0 you’ll only get the new invoices. Is this what you are asking about?

Just go to the report setup, and add your new report to the list, it will automatically print.

Arthur, you understood what i need, but how do i make it clear to the report that it has parameters?

Annar If I understand correctly, you need to do what David said. Sales & Receivables> Setup> Report Selections Sales… Select Usage Invoice, then add the next Sequence number and the new Report Id number. Then this should print out automatically when you press the print button on the Posted Sales Invoice Card.

Hi annar, you can’t tell the Report that there are parameters to use ! The parameters you set can only be filters to the first dataitem of the report ! BUT : you can set filter to a textfield of firstdataitem and then do something like this if getfilter(textfield) then begin; … (checkfilters and set local variables depending on filters) end setrange(textfield);

Hi Hans, You can send paramaters to a Report, but not through the standard call. Just define a function in the Report, and use that to pass paramaters. There are many examples in base navision where they use this feature.

Hi Hans You can send parameters to more than data item but it depends on the Running Calling method

If you want to run the report as secondary report with standard ReportListing then you can’t set parameters like the way report.setparamfunction (var1,var2,…) because you have no report.run in your own C/Side-Code. but filter on a field will be passed into the report