SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to use SSRS to format financial report using non-sequential account order


How to use SSRS to format financial report using non-sequential account order

Author
Message
rsiem
rsiem
SSC Rookie
SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)

Group: General Forum Members
Points: 26 Visits: 125
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.
Attachments
GL PL Acct Structure.jpg (43 views, 141.00 KB)
pietlinden
pietlinden
SSCertifiable
SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)

Group: General Forum Members
Points: 5074 Visits: 13207
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?
Lynn Pettis
Lynn Pettis
SSC-Forever
SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)

Group: General Forum Members
Points: 40798 Visits: 38567
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.

Cool
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)
rsiem
rsiem
SSC Rookie
SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)

Group: General Forum Members
Points: 26 Visits: 125
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.
Attachments
IS-Bal Statement.jpg (58 views, 379.00 KB)
Statement Labels.jpg (66 views, 143.00 KB)
mister.magoo
mister.magoo
SSCarpal Tunnel
SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)

Group: General Forum Members
Points: 4238 Visits: 7865
You need to include the headings/subheadings in the data and group the report by them.

MM


select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);




  • 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

  • MMartin1
    MMartin1
    SSCrazy
    SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

    Group: General Forum Members
    Points: 2863 Visits: 2031
    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.

    ----------------------------------------------------
    How to post forum questions to get the best help
    Go


    Permissions

    You can't post new topics.
    You can't post topic replies.
    You can't post new polls.
    You can't post replies to polls.
    You can't edit your own topics.
    You can't delete your own topics.
    You can't edit other topics.
    You can't delete other topics.
    You can't edit your own posts.
    You can't edit other posts.
    You can't delete your own posts.
    You can't delete other posts.
    You can't post events.
    You can't edit your own events.
    You can't edit other events.
    You can't delete your own events.
    You can't delete other events.
    You can't send private messages.
    You can't send emails.
    You can read topics.
    You can't vote in polls.
    You can't upload attachments.
    You can download attachments.
    You can't post HTML code.
    You can't edit HTML code.
    You can't post IFCode.
    You can't post JavaScript.
    You can post emoticons.
    You can't post or upload images.

    Select a forum

































































































































































    SQLServerCentral


    Search