Query in Navision

Hai There, I have query like this

SELECT [Company_Name$Sales Shipment Header].[Sell-to Customer No_] as [Kode Customer],
[Company_Name$Sales Shipment Header].[Sell-to Customer Name] as [Nama Customer],
[Company_Name$Sales Shipment Header].[External Document No_] as [No PO],
[Company_Name$Sales Shipment Header].[Order No_] As [No SO],
[Company_Name$Sales Shipment Header].[Order Date] as [Tgl SO],
[Company_Name$Sales Shipment Header].[Shortcut Dimension 2 Code] as [Kode Project],
[Company_Name$Sales Shipment Header].[No_] As [No DO],
[Company_Name$Sales Shipment Header].[Shipment Date] as [Tgl DO],
[Company_Name$Sales Invoice Header].[No_] As [No Invoice],
[Company_Name$Sales Invoice Header].[Posting Date] as [Tgl Invoice]
FROM [Company_Name$Sales Shipment Header]
LEFT JOIN [Company_Name$Sales Invoice Header]
ON [Company_Name$Sales Invoice Header].[Order No_]
= [Company_Name$Sales Shipment Header].[Order No_]
ORDER BY [Company_Name$Sales Shipment Header].[Order Date] Desc

how we create form which showing data like this query on navision?

thanx for your information

Well it really depends on what development system you are using: C/SIDE, Visual Studio or?

i’m using object designer in navision C/SIDE

Hi!

You could create a SQL site “View” of this SELECT statement. Then you could create a table in NAV - view-name = table-name; identical field-names and data-types - and link it to this “View” by setting the NAV table property “LinkedObject”. Then you should be able to use this table as any other one (reading, not writing)!

Well, then you don’t even need to think about the SQL Select statement. Just create a form. Point out the table and select the fields. And run the form.

that’s the point

i don’t know to connect one table to another like the sql statement

that’s the point

i don’t know how to connect one table to another like the sql statement

Open Sales Order Form / SubForm

Form ID: 42 and 46

I recommend reading Navision Application Designer’s Guide, most of your questions will be answered there.