cancel
Showing results for 
Search instead for 
Did you mean: 

Query to join OADM and ADM1

Former Member
0 Kudos

Hi All,

I Am Creating Crystal report Layout for sale order,My Problem is that I am unable to link OADM And ADM1 tables in my Query

Because of which I am Not getting Company Details.

I Don't want to Manually enter the Details of Company But Generically,So that I can use Same Layout for different Company.

Please Anyone Help me to Solve my problem.

Regards,

Gayatri Shukla.

Accepted Solutions (1)

Accepted Solutions (1)

KennedyT21
Active Contributor
0 Kudos

Hi Gayatri Shukla..

The primary key of the OADM & ADB1 is Code

Try this

SELECT *  FROM OADM T0

INNER JOIN ADM1 T1 ON T0.Code= T1.Code

Regards

Kennedy

Former Member
0 Kudos

Hi Kennedy,

Thank you Very Much,I got what was required.

Thanks,

Regards,

Gayatri Shukla.

michaelhouse
Participant
0 Kudos

You can place OADM in a Crystal report completely unlinked to all other data tables and get the report to print a sales order that includes data from OADM.  Once you link OADM to ADM1 through "Code" in a Crystal report, it does not work.

What link should exist between the sales order tables and OADM/ADM1 in order for Crystal to produce a sales order?  Do you have to have OADM/ADM1 in a subreport and pass its values to the main report?  Thanks for assistance.

Answers (4)

Answers (4)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Already it was there in my answer.

michaelhouse
Participant
0 Kudos

Thank you but the answer is not above.  I understand the link between OADM and ADM1 but when you link these tables in a Crystal report that has other tables, say for a sales order, the report does not work.  My question was how do you link OADM/ADM1 to other tables.

The solution actually involved NOT linking OADM to ADM1.  If you have a Crystal report and need data from ADM1, just add it to the report without linking it to OADM.  Surprisingly, this allowed Crystal reports to work and data from ADM1 was populated in the result.  I'm not sure if my database is a unique situation or not, but this appears to be the correct answer.

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi Gayatri,

OADM T0 inner join  ADM1 T1 on T0.[Code]=T1.[Code]

Thanks & Regards,

Nagarajan

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi Gayatri,

What information you need retrieve from sales order?

Former Member
0 Kudos

Hi Gayatri,

Check this:

SELECT *  FROM OADM T0 INNER JOIN ADM1 T1 ON T0.Country = T1.Country

Thanks,

Joseph