Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Report Writing Assistance - Project Accounting

(0) ShareShare
ReportReport
Posted on by

I have a situation where I need to figure out how to present data for a client in the simplest format possible for the senior management, but at the same time to allow the controller and a couple of the project managers to access the data and dig deep into the information.

Here is - in a nut shell what we are looking for.

From Project Accounting we are looking at the data in the PA30101 Timesheet Detail History and the PA10001 Timesheet Detail (current).  I have created a VIEW that is the union of these two tables - as they share for my purposes, the same column names.

What the client needs is to see a summary of the data by PADepartment and displayed on a line by line basis on EmployID with the columns being the PAPROJNUMBER, PABase_QTY, PABase_Unit_Cost and the kicker is that we want to see this detail for each of the 18 (currently) defined PACOSTCATID's in the system.

I am not a SQL Master by any definition, but I have figured out the following script that gets the union created, however, all the PACOSTCATID are listed in a single column.  What I would ideally like is a script that breaks out the detail lines and provides a separate coloumn for the PACOSTCATID

We have as example - LABOUR, VACATION, STAT HOLIDAY

Currently there is one column for PACOSTCATID and then a column for the QTY and Dollars, I would like a separate column for each of the "DIFFERENT" PACOSTCATID and list the QTY and DOLLARS under each of them.

Is that possible? What is involved?  I am not a programer but I knwo what I need.

I will attach the script to this post separately.

*This post is locked for comments

  • RE: Report Writing Assistance - Project Accounting

    SELECT a.EMPLOYID, b.PLastName , b.PFirstName, PADepartment, PATSNO, padt ,

    cast(year(padt)as int)as "PYear", cast(month(PADT)as Int) as "PMonth", cast(DAY(padt)as int)as "PDay",

    PAPROJNUMBER, PACOSTCATID, PABase_Qty,PAUnit_of_Measure ,PABase_Unit_Cost

    from hemi..PA30101 a join hemi..CPY10100 b on a.EMPLOYID = b.PEmployeeID

    where a.PADT > '2012-05-31'

    UNION

    SELECT a.EMPLOYID, b.PLastName , b.PFirstName, PADepartment, PATSNO, padt ,  

    cast(year(padt)as int)as "PYear", cast(month(PADT)as Int) as "PMonth", cast(DAY(padt)as int)as "PDay",

    PAPROJNUMBER, PACOSTCATID, PABase_Qty,PAUnit_of_Measure ,PABase_Unit_Cost

    from hemi..PA10001 a join hemi..CPY10100 b on a.EMPLOYID = b.PEmployeeID

    NOTE: I removed the Create View statement from this for presentation.

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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans