Section Visibility Issue with Positioning Subtotals

 4 Replies
 0 Subscribed to this topic
 22 Subscribed to this forum
Sort:
Author
Messages
Paul4
New Member
Posts: 3
New Member
    I apologize in advance for the long post but I want to provide as much detail as possible on the issue I am trying to resolve.
     
    I am creating an income statement using crystal reports 2008 for a hospital which has 9 corpoations and is implementing Lawson 9.0. I am having a problem with the way the income statement displays that I believe relates to the way I am using conditional suppression of section footers.
     
    The income statement is set up to group accounts by GLCHARTDTL.Sumry_Acct_ID which aggregate debits and credits (using a Running Total formula) from GLAMOUNTS into Specified Groups such as ‘Inpatient Revenue’, ‘Outpatient Revenue’, ‘Salaries & Benefits’, ‘Medical Supplies’, etc..,
     
    My problem is with sub-totals such as Gross Patient Revenue (this subtotal is a manual total, or Global Number Variable, that aggregates Inpatient Revenue and Outpatient Revenue) The problem with the subtotals is not that they are not calculating correctly but with the display of those sub-totals at the appropriate point in the presentation of the Income Statement.
     
    In Group Footer 1a I have the Running Totals by Specified Group (e.g. Inpatient Revenue, Outpatient Revenue) and this is working fine. In Group Footers 1b through 1g I have the manual totals for Gross Patient Revenue, Net Patient Revenue, Other Operating Revenue, Operating Expenses, Net Income etc..,
     
    I am using the Section Expert to conditionally suppress each of these subtotals until the final named group that makes up that sub-total has been passed. For Example Gross Patient Revenue (in Group footer 1b)  is made up of the specified groups Inpatient Revenue and then Outpatient Revenue and I am using the conditional suppression in Section Expert to tell the report to only show the subtotal Gross Patient Revenue after the specified group Outpatient Revenue has been passed (or if there is no Outpatient Revenue after Inpatient Revenue).   The same applies to the subtotal Net Patient Revenue (in Group Footer 1c) which should only display after the specified group Charity Care (or if there is no Charity Care then after Deductions from Revenue) has been passed.  The output (with annotation) should appear as below:
     
    (GF1a) Inpatient Revenue                    5,000
    (GF1a)Outpatient Revenue                  3,000
                                                                        -------
    (GF1b)Gross Patient Revenue            8,000
     
    (GF1a) Deductions from Revenue       2,000
    (GF1a) Charity Care                                1,000
                                                                        -------
    (GF1c) Net Patient Revenue                5,000
     
    This is working fine for those corporations within the hospital that have values in GLAMOUNTS for the specified group ‘Outpatient Revenue’. However for those corporations that do not have values in the Specified Group ‘Outpatient Revenue’ the formula which conditionally suppresses based on the condition below is not being triggered as there are no values for that corporation in the database (or rather in the tables GLAMOUNTS, FBDETAIL or GLCHARTDTL) for “Outpatient Revenue” and therefore the Subtotal does not display.
     
    Here is the conditional Suppression Formula I am using on Group Footer 1b:
     
    GroupName ({GLCHARTDTL.SUMRY_ACCT_ID}) <> "Outpatient Revenue"
     
    However if I do not conditionally suppress the subtotal “Gross Patient Revenue’ in Group Footer 1a the subtotal will show up after every Specified Group.
     
    Have any users encountered this problem or a similar problem before? Does anyone have any ideas as to how to get the subtotals to only display where appropriate? Perhaps I am approaching the presentation issue in the wrong way (using conditional suppression). Any ideas to resolve this issue are much appreciated.
     
    Also please let me know if I can provide further detail or clarification as to the reports design to assist in troubleshooting.  Once again apologies if the post is a little long-winded.
    Adam Jacobson
    Veteran Member
    Posts: 69
    Veteran Member
      I'm not sure how you might fix your crystal, or whether you could, but I think if you change your query, you might have better luck.
      The problem you state is that sometimes there are no postings in GLAMOUNTS (GLAMOUNTS doesn't get created for p&L accounts until something posts).
      However, there is ALWAYS a record in GLMASTER. So, you might want to go from your chart, to GLMASTER and then left outer join to GLAMOUNTS so you always have some record for the account even if the amount is zero. I'm guessing that you already have programming to calculate the proper period amount from the array in GLAMOUNTS so now you can add logic that if GLAMOUNTS is null the amount is zero.

      good luck.
      Char
      Veteran Member
      Posts: 62
      Veteran Member
        I handle these types of Income Statement reports by creating layers of groups - I would have a group 1 for example as Gross Patient Revenue and Group 2 would be the Inpatient and Out Patient - then you can use summaries (running totals are much slower) because they happen WHILEPRINTINGRECORDS like variables so I try to avoid them.

        Also, when using GLAmounts with FBDetail in the same report. Sometimes you'll have actual and no budget and sometimes budget and no actual so I always create a SQL command and alias a column called Type as either Actual or Budget and then union them together.
        Paul4
        New Member
        Posts: 3
        New Member
          Thanks to both of you for your suggestions.  I am currently experimenting with Adam's suggestion as I agree that the problem with the way that I am currently structuring the report is that it cannot process totals correctly when there is no record in either GLAMOUNTS or FBDETAIL.  I am hoping that by using GLMASTER, as suggested, I can force my crystal report to evaluate every account regardless of activity.

          I like your idea Char of creating layers of groups and regret that it is not the path I originally chose when I approached this project as I think it is more efficient than the one I have chosen.  My problem is that our Go Live is September 30th and I have already based a great number of report variations on my original logic.  Now having made that choice I am going to have to make the fix that is easiest to propagate across all these reports.

          After the crunch of GoLive is over I think I will certainly be redesigning and redesigning some of these reports along the lines suggested.  Right now I am looking for a quick fix!  I greatly appreciate both your suggestions and will let you know once I have tested both approaches.  Thanks again!
          Char
          Veteran Member
          Posts: 62
          Veteran Member
            When you revisit them, if you want the SQL you can email me at ccraig@crystaladvantage.com; I have it for both Oracle and SQL Server to union GLAmounts with FBDetail. I also wrote a view that does the union and puts the 12 months of columns in GLAmounts and FBDetail in a a single column called Period with columns for Balance, YTD and Period Activity. I don't like using myself because returning more rows makes the query less efficent but clients that want to write thier own Crystal reports love it because they don't have to write complex formulas to get finanacials. Good luck with go-live!