PeopleSoft Crazy

My Experiments with PeopleSoft

.. on Reporting Services

leave a comment »

I have completed my first complex multi level drill down report in Reporting Services. I should say that I am throughly delighted.. It took me 4 working days to finish the entire thing. This is a report that has to give the details like Sales, Direct Costs, Operating Expenses, Gross Profit, Income Tax, Net profit etc. all in a single page with drill down across months for different business units.

The Report will have a drilldown both at the row level as well as the column level. The row level drill down consists of a primart reporting head. For eg. in our case, it will be Operating Expenses. The second drill down will consists of following heads – Human Resource Costs, Employee Costs, Facility Costs etc. The third drill down under Human Resource Costs (for eg.) will consist of heads like Salaries, Bonus, Relocation, Business Travel etc. The fourth level drill down under the head Salaries will consist of all the GL account codes.

The column drill down will have all months at the first level. The second drill down level will consist of different business units under each month.

So that sums up the requirement. I have no clue how easy or difficult it is to do in nVision. But as far as Reporting Services is concerned, this is how I proceeded..

I first created a tree that represents the four level drill downs at the rowlevel. I wrote a query that ported the relevant data with the necessary structure from Oracle(PeopleSoft Database) to local report server database(SQL Server). The structure had the following columns Parent Node, Middle Node, Child Node and the accounts under the child node along with the posted transaction amount in PS_LEDGER table. I must admit this was pretty messy. I didn’t use any Oracle’s “connect by” and “prior” duo to get the hierarchy. I think, if I had used them, that would have increased the speed of the query by several times.

Anyways once I have ported the data, I wrote a dataset query in SQL Server that represents the order as required in the report. For eg, the Sales have to appear first in the drill down, followed by Direct Costs followed by Operating Expenses. Now if you simply run the report without ordering, it will display heads sorted by alphabetical order. This means, Direct Costs will be displayed first, followed by Operating Expenses and Sales. This is evidently wrong as we need to first show what’s the total sales of the company is for a particular month, for the operating expenses and direct costs to be deducted from it.

This part was bit tricky although not that challenging. Once you take care of the ordering, it is now time to show those uncomfortable “Gross Profit” which is simply total sales – total direct costs – total operating expenses. Now displaying this was tricky as this has to be calculated from the calculated fields and that too on the fly… I had more of these kind of heads in my requirement. The other ones are Income before tax, Net Profit. All of these are to be calculated impromptu from the other calculated fields.. My dataset query turned out to be one huge ugly monster. I will post both SQL Query and the dataset query tomorrow. They are really slouchy and difficult to maintain. I need to improvise on this. I will post them tomorrow. Any suggestion to improve them will be greatly appreciated.

Once I am done with the dataset queries with some prompts here and there, the report is ready to be deployed. Thats it. Pretty easy!! Isn’t it? I will try to emulate this in n-vision and estimate the time taken to do the same requirement. This will give us an idea of when to go for nVision reports and when to go for reports prepared using reporting services.

Written by limemintcooler

August 11, 2008 at 11:32 pm

Posted in Reporting

Tagged with

Leave a Reply