Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CR 10 - When I insert details field from another table, data disapears

Status
Not open for further replies.

Pdr0

Technical User
Jul 22, 2010
2
BR
Hi Guys!

Im trying to create an invoice with Crystal Reports 10.

I have 02 different tables:

1. DocumentHeaders
2. DocumentItems

I've created my template for placing the "DocumentHeaders" fields, like DocumentHeaders.DocNumber, DocumentHeaders.SoldToCompany, etc ..

When I place the "DocumentItems" fields in the Details Section, like "DocumentItems.ProductName", DocumentItems.UnitPrice, etc the data related to "DocumentHeaders" fields disappears.

I've already tried many tutorials, including the "Packing Slip" template included with Crystal Reports 10 software, but I really didn't figured what's causing this issue.

I'm not using Groups nor any advanced SQL language, just a very basic Invoice Model I'm trying to create.

Can anyone help me, please?

Thanks,

Pedro
 
Hi,
Be sure you have linked the 2 tables with a Left Outer Join.

With a Equi join ( the default) any missing data in the right hand table will cause the data from the left hand table to be missing; a left-outer join insures that all records in the leftmost table will be returned that meet the selection criteria.

NOTE: If you specify any selection criteria on the rightmost table then the Letft Outer Join will be converted to an Equi join and the original problem will resurface.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Turkbear,

Thank you so much for the brief, but very important tip.
In fact using the word "Left Outer Join" I went into Crystal Reports help and understood what does it means and I decided to delete all actual "links" the software has advised when selected the tables which should compose my databases.

When I deleted the links, I linked the tables in which I thought it should be but, especially I realized I should not link my table "DocumentHeaders" to "DocumentItems" but in the contrary, link the inverse ["DocumentItems" to "DocumentsHeaders].

I works fine.

I'd like to express here that I truly didn't expected to have such a quick reply and solution as I've got.

Thank you very much, hoping I can also be of further assistance, following your advise in the bottom of your message.

Rgds,

Pedro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top