"Would it be possible to create some kind of solution in applicaiton file so that I don't have to add any relationship in the data file?
You can have a summary field in OrderItems which is summary 'total of amount'. This then can be used in ANY relationship. So now create an external file reference in the UI to this data file. Create table occurrences on both Order and OrderItems right in your UI, create a relationship between them on InvoiceID - no relationships in the data file required. Now when you place the OrderItems summary field on the invoice (layout in the UI based on new Orders table occurrence), it will work just fine.
The only time you need a relationship in the data file is if you need to create a calculation in Invoices. So calculations such as Sum(), Count() etc would require the relationship be in the data file but not with summaries. Also keep in mind that, now in vs. 11 with filtered portals, conditional formatting and merge variables, you can many times skip the calculations in the field definitions and instead create them directly on the layouts based upon the table occurrence group that you create in the UI.
So back to your original question ... yes, relationships and TOGs can be in the UI. In truth, FileMaker should split calculations entirely from the other two layers (of UI and data). Let's hope it happens in the future. If they did, they would blow the market wide open because, with FileMaker's rapid development with the power of free calculations and external sources such as SQL, they would become top in their field.
Update: Added the words in blue.
Thank you LaRetta,
I used the summary field and all worked fine :)
I guess I am thinking a bit too hard and not knowing that filemaker makes things very easy and have many things that you can just apply and do the job.