Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

NAV - Convert Rows of one table to Columns of another table

(0) ShareShare
ReportReport
Posted on by

Here’s the scenario:

I have two tables, one is Salary Statement and another one is Salary Statement Details.

Salary Statement Table

Year

Month

Employee ID

Basic

Total Allowances

Total Bonus

Gross Pay

Total Deductions

Total TDS

Adjustments

Net Pay

2018

November

221344

40000

20000

5000

65000

6000

1000

0

58000

 

Salary Statement Details Table

Employee ID

Year

Month

Detail_Code

Detail_Type

Amount

221344

2018

November

Medical_Allowance

Allowance

5000

221344

2018

November

House_Rent

Allowance

15000

221344

2018

November

Festival_Bonus

Bonus

5000

221344

2018

November

Loan_Deduction

Deduction

6000

 

Total Allowances is a calculated column in Salary Statement table. Total Allowances column value comes from Salary Statement Details table. Salary Statement Details table have all the allowances as a row.

Now, I want to create a report in NAV to Show all the Salary Statement table’s fields and all the related rows from Salary Statement Details table as Column and ultimately it will look like:

 

Employee ID

Year

Month

Basic

House Rent

Medical Allowance

Festival Bonus

Gross Pay

Loan Deduction

TDS

Adjustments

Net Pay

221344

2018

November

40000

15000

5000

5000

65000

6000

1000

0

580000

 

Here the allowance, bonus and deduction fields are added as columns which were in rows of earlier table.

How can I do that? Thanks in advance.

*This post is locked for comments

  • RockwithNav Profile Picture
    6,562 on at
    RE: NAV - Convert Rows of one table to Columns of another table

    May be you can make a Matrix Report for this. RDLC Report Matrix will be easier.

  • Hannes Holst Profile Picture
    5,767 on at
    RE: NAV - Convert Rows of one table to Columns of another table

    Hi,

    You could create FlowFields with the Method "Lookup".

    Have a look in Table 5065 "Interaction Log Entry", Field 39 "Contact Name"

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,245 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,925 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans