I am working with two tables in NAV 2009 R2, ‘Sales Invoice Header’, and ‘Sales Invoice Line’. Now I want to make a temporary table which merges the data from both of these tables. I am doing so because I need to make a report which needs all the values from both the table under same header.
Can you please guide me, how can I make such table.
Elisha, you are asking the wrong question. You need to start with the business requirement, i.e. the report. What do you need and why can’t you do it the way every other Navision developer would do it? Why do you need to do it this way?
Hi Elisha, you don’t need to create a temp table to create the report you need. Take a look at existing reports like Sales Invoice, etc and see how Sales Invoice Header and Sales Invoice Line are linked up in DataItem by checking out the properties. You may be able to save a lot of time by modifying an existing report as opposed to creating one by scratch. You’ll also notice when researching existing reports, that very few (if any?) of them use temp tables to combine multiple tables. Good luck!
The RTC version of NAV is still new enough that most of us old-timers automatically presume that you’re working in the Classic version of the client. But, it’s now very much worth asking. Which version of the client are you developing this report for - RTC or Classic?
If that’s the case, then I’d have to agree with David. There’s a better way to get this done. Take a look at the Sales Invoice report to see how to define and access Parent/Child datasets. If you need to add a control in the SalesInvLine.Body section that refers to a field in the header, then create the textbox control in the body section using the Toolbox, and set the source expression to SalesInvoiceHeader.“field name”. Obviously, you’ll replace “SalesInvoiceHeader” with the actual name of your parent record as defined in the DataItem list, and you’ll replace “field name” with the name of the field from the parent record that you want to display on the child body section.
I have made the link between two tables with “No,”, and “Document No.”
My problem is, when I put a textbox that contain an expression of Sales Header in the body section of Sales line (while generating the report) I usually get the first line blank, and only in the second line i get the data.
I want the Outlet in the header (Which is possible as it is just a labe), and the textbox of “SalesInvoiceHeader.sell-to customer name” in the sales Invoice line, body… When i just drag the textbox in the body(7), I get the first line as blank as shown below