{"id":329,"date":"2007-12-30T21:45:34","date_gmt":"2007-12-31T04:45:34","guid":{"rendered":"http:\/\/members.crystalreportsbook.com\/crystal-reports-xi\/a22-tutorial-a-1-designing-a-balance-sheet-part-3\/"},"modified":"2007-12-30T21:45:34","modified_gmt":"2007-12-31T04:45:34","slug":"a22-tutorial-a-1-designing-a-balance-sheet-part-3","status":"publish","type":"post","link":"http:\/\/www.crystalreportsonlinetraining.com\/training\/a22-tutorial-a-1-designing-a-balance-sheet-part-3\/","title":{"rendered":"A.22 Tutorial A-1 Designing a Balance Sheet, Part 3"},"content":{"rendered":"<p>There is an initial problem with the current report layout. There are too many account types listed. If you look back at Figure A-4, you&#8217;ll see that there are only two account types: Assets and Liabilities &amp; Owners Equity. This corresponds to the Accounting Equation we discussed earlier. Another way to think about it is that the two account types are assets and \u2018everything else&#8217;. If it isn&#8217;t an asset, it gets lumped into the Liabilities &amp; Owners Equity section and we need to change the account type formula accordingly.<\/p>\n<ol>\n<li Value=\"25\">In the Field Explorer window, right click on the formula {@Account Type} and click the Edit option.<\/li>\n<li Value=\"26\">Change the existing formula to the following:<\/li>\n<\/ol>\n<p>         <code>if {Account_Type.Account Type}=\"Asset\" then<\/code><br \/>\n         <code>\"Assets\"<\/code><br \/>\n         <code>else<\/code><br \/>\n         <code>\"Liabilities &amp; Owners Equity\"<\/code><\/p>\n<p>This formula keeps the Asset type the same and changes all other types to Liabilities &amp; Owners Equity.<\/p>\n<p>The next step is the most important: displaying the account balances. After all, without numbers the report would mean nothing. However, if you just drag and drop the {@Amount} formula onto the report, all the balances will be wrong. You can&#8217;t just display the account balance on the report because all numbers are stored in the database as positive numbers (even the negative numbers). You need to write a formula that determines whether an amount should be negated or left as a positive number.<\/p>\n<p>There are two things that determine the sign of an amount. The first is its account type and the second is whether it is a debit or a credit. If you recall, you have to use the rules in Table A-1 to determine which numbers are positive and which are negative. In the next step, I give you the formula that does this.<\/p>\n<ol>\n<li Value=\"27\">In the Field Explorer window, right-click the formula {@Amount} and select Edit Formula.<\/li>\n<li Value=\"28\">Replace the existing formula with the following formula:<\/li>\n<\/ol>\n<p>         <code>if {Account_Type.Account Type} = \"Asset\"  Then<\/code><br \/>\n         <code>if {Journal_Entry.Debit Or Credit} = \"Debit\" Then<\/code><br \/>\n         <code>{Journal_Entry.Amount}<\/code><br \/>\n         <code>Else<\/code><br \/>\n         <code>{Journal_Entry.Amount} * -1<\/code><br \/>\n         <code>Else<\/code><br \/>\n         <code>if {Journal_Entry.Debit Or Credit} = \"Credit\" Then<\/code><br \/>\n         <code>{Journal_Entry.Amount}<\/code><br \/>\n         <code>Else<\/code><br \/>\n         <code>{Journal_Entry.Amount} * -1<\/code><\/p>\n<p>This formula first looks at the account type and then it looks at whether the number is classified as a debit or credit. Using Table A-1, when the account type is Asset and the value is a debit, it increases the account value. Thus, the formula returns a positive number.  When the account type is Asset and the value is a credit, it decreases the value. The number is negated by multiplying it by -1. The formula uses the opposite for the other accounts (as dictated by Table A-1).<\/p>\n<p>You should note that the Expense account doesn&#8217;t follow the rules in Table A-1. According to Table A-1, expenses are treated the same as the Asset accounts, but this formula doesn&#8217;t do that. This is because expenses are included in the Net Income calculation and they must be combined with revenues. This is a special circumstance that we&#8217;ll learn more about later in this tutorial.<\/p>\n<ol>\n<li Value=\"29\">After entering the new formula and saving it, drag and drop the formula to the Details section. Make sure that the Details section is suppressed because we don&#8217;t want to show every journal entry on the report. We just want to show the sub-totals in the group footers.<\/li>\n<\/ol>\n<p>The amount needs to display a sub-total in each group footer. This summarizes the data at each level. The next three steps walk you through adding each sub-total.<\/p>\n<ol>\n<li Value=\"30\">Right-click on the {@Amount} formula in the Details section and select Insert > Summary.<\/li>\n<li Value=\"31\">On the Insert Summary dialog box, change the Summary Location property to Group #3 &#8211; @Account Number. Click OK to create the summary field in the footer section of Group #3.<\/li>\n<li Value=\"32\">There needs to be a sub-total for the account heading. Right-click on the {@Amount} formula in the Details section and select Insert > Summary. On the Insert Summary dialog box, change the Summary Location property to Group #2 &#8211; @Account Heading Number. Click OK to create the summary field in the footer section of Group #2.<\/li>\n<li Value=\"33\">We need another sub-total for the account type. Right-click on the {@Amount} formula in the Details section and select Insert > Summary. On the Insert Summary dialog box, change the Summary Location property to Group #1 &#8211; @Account Type. Click OK to create the summary field in the footer section of Group #1. This is what lets the user check that Assets are equal to Liabilities &amp; Owner&#8217;s Equity.<\/li>\n<li Value=\"34\">Modify the formatting of the account type sub-total so that it is more prominent. Drag it to the right a couple inches and make it bold.<\/li>\n<li Value=\"35\">The sub-totals in group #1 and #2 each need descriptions so that the user knows what data they are associated with. For each section add a new text object. Type in the word Total.<\/li>\n<li Value=\"36\">In the Field Explorer, find the folder Group Name Fields and click the plus sign to expand it. Drag each group name into the text box that is in that group&#8217;s footer section. This concatenates the group name field immediately after the word &#8220;Total&#8221; so that they appear side-by-side. Lastly, check how they are formatted so that they look the same as the sub-total field.<\/li>\n<\/ol>\n<p>Let&#8217;s look at the report to see where we are so far. If you preview it, you should see something similar to the next two figures. I split the report into two separate figures so that it is easier to read. Figure A-6 is the Assets section and Figure A-7 is the Liabilites &amp; Owners Equity section.<\/p>\n<p>         <a href=\"http:\/\/www.crystalreportsonlinetraining.com\/Images\/CRXI\/ApdxA\/image013.png\"><br \/>\n            <img decoding=\"async\" src=\"http:\/\/www.crystalreportsonlinetraining.com\/Images\/CRXI\/ApdxA\/image014.jpg\"><\/img><\/a><br \/>\n         <b>Figure A-6. Balance Sheet preview showing the Assets section.<\/b><br \/>\n         <a href=\"http:\/\/www.crystalreportsonlinetraining.com\/Images\/CRXI\/ApdxA\/image015.png\"><br \/>\n            <img decoding=\"async\" src=\"http:\/\/www.crystalreportsonlinetraining.com\/Images\/CRXI\/ApdxA\/image016.jpg\"><\/img><\/a><br \/>\n         <b>Figure A-7. Balance sheet showing the Liabilities &amp; Owners Equity section.<\/b><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is an initial problem with the current report layout. There are too many account types listed. If you look back at Figure A-4, you&#8217;ll see that there are only two account types: Assets and Liabilities &amp; Owners Equity. This corresponds to the Accounting Equation we discussed earlier. Another way to think about it is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,1],"tags":[],"class_list":["post-329","post","type-post","status-publish","format-standard","hentry","category-appendix-a-financial-reporting","category-crystal-reports-xi","entry"],"_links":{"self":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/comments?post=329"}],"version-history":[{"count":0,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/329\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/media?parent=329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/categories?post=329"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/tags?post=329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}