2 Tables Report Problem

There are 2 tables Header and Line. Report uses both. Report’s header uses Header and report’s body uses Line. Both tables have the same key - “No.” field. When running report from the form the report’s header displays only the first record’s value and body displays all (!!!) records from Line, not only one which has the same key value as in Header. How to make the report to display only the information of the current record without ReqForm and to set the right relation between Header and Line (header and body)?

Header’s header is report’s header. You must use Header’s body as document’s header. Business Applications Programmer Sertified Navision Developer SIA “Sintegra” Latvia

Well, I use it now - it’s ok, but the problem is how to print current record of the form without ReqForm. Of course I can set UseReqForm to No, but it will print many reports - for all records in the table. How to set filter only for current?

Dmytro, to do this you will have to set some filters on the record that you want to print. When you only want to print one record you can use the SETRECFILTER function. Here is an example:

YourRec.SETRECFILTER;
REPORT.RUNMODAL(REPORT::"YourReport", FALSE, TRUE, YourRec);

Reijer.

Ok, what i understand of your problem is that you want to print the header and then by each header all the lines that have the same value in the field you want than the header no. Index the lines to the header (use the right arrow on the botton part of the screen) and then use the datalink property of the dataitem for choosing the relation with the header one (usually you’ll set the PrintOnlyIfDetail property on the header dataitem to yes). When calling the report you only need to filter by the header no (or use a datalink property in the button where you call the report). Regards, Alfonso Pertierra (Spain)apertierra@teleline.es

Thanks everybody - it works!