Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to use SSRS to format financial report using non-sequential account order Expand / Collapse
Author
Message
Posted Friday, May 16, 2014 7:55 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Today @ 12:57 PM
Points: 14, Visits: 64
I am new to SSRS 2012 and am trying to create several financial reports (trial balance, profit & loss, balance sheet, etc.).
Our general ledger account numbers are in the ###-###-### format (i.e 481-389-810)

The problem I am having is that the finance dept wants the P&L report in a specific format using groups/headings and with the GL accounts appearing in a non-sequential order.

See example in attached image file that shows GL Account Description, GL Account Number, Company Number fields

How do I get SSRS to use, display and keep the non-sequential order?

Example 1 using simplified account numbers:

Account# Description
100 Truck Repairs
150 Rail Repairs
120 Warehouse Inventory
110 Auto Repairs
160 Property Maintenance

I am assuming others have had a similar problem and possible solution(s). I would appreciate any assistance in resolving this issue.






  Post Attachments 
GL PL Acct Structure.jpg (10 views, 141.25 KB)
Post #1571732
Posted Friday, May 16, 2014 11:32 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 5:32 PM
Points: 839, Visits: 5,418
SSRS will use the same sort order as the query/stored procedure you base the report on, so if you have the data sorted in your stored procedure, you're all set.

If that doesn't help, we may need more information - like what are the rules for sorting?
Post #1571967
Posted Saturday, May 17, 2014 8:04 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 3:27 PM
Points: 20,734, Visits: 32,505
Here is what I would do.

I would create a table that lists the accounts that must be in a specific order with a sequence number for the order that that the accounts need to be displayed. I would then join to this table using an left outer join. Where the sequence number is null substitute some default value (use ISNULL or COALESCE to accomplish this) then the query sorts on the sequence number first then the account number.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1571996
Posted Tuesday, May 20, 2014 12:44 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Today @ 12:57 PM
Points: 14, Visits: 64
I have the report now sorting the accounts in the correct order that the users want. Now my problem is getting SSRS to be able to incorporate the correct financial statement headings and subheadings (text).

The report output/preview looks like attached image file: IS-Bal Statement. I can't figure out how to get the headings and subheadings to work in the report like attached image file Statement Labels - see items in red/bold.

I think that I may need to use some kind of IIF expression but not sure. If I do, then do I need to create some expression for each heading/subheading?

Can anyone point me in the right direction to make this work?

Thanks.


  Post Attachments 
IS-Bal Statement.jpg (10 views, 379.08 KB)
Statement Labels.jpg (10 views, 143.56 KB)
Post #1572841
Posted Tuesday, May 20, 2014 1:16 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 4:19 PM
Points: 1,796, Visits: 5,799
You need to include the headings/subheadings in the data and group the report by them.

MM


  • MMGrid Addin
  • MMNose Addin


  • Forum Etiquette: How to post Reporting Services problems
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • How to Post Performance Problems - by Gail Shaw

  • Post #1572858
    Posted Friday, June 27, 2014 5:59 PM


    Old Hand

    Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

    Group: General Forum Members
    Last Login: Friday, October 17, 2014 12:20 PM
    Points: 373, Visits: 909
    Start by right clicking the detail row and select to add a parent group. In the popup dialogue you select the column to group by and if you want to include a header.
    Post #1587076
    « Prev Topic | Next Topic »

    Add to briefcase

    Permissions Expand / Collapse