Section Expert - Suppress Formula

Post Author: testing123
CA Forum: Crystal Reports
Has anyone had any experience with the suppression formulas for sections in the Section Expert?  My report has two groups : Project Status and a subgroup, Project Number. Each Project Number contains a value called Total. Each total is added to a variable, GroupTotal, until the end of the main group Project Status. At that point, the GroupTotal is shown, and then at the start of the next Project Status group the value is set to 0. However, if I add a group suppression formula for the Project Number where the Project Number group is supressed if GroupTotal = 0, it screws up, and displays information wrong. I can't pinpoint what exactly, but numbers from the previous group get passed to the next, and empty groups where GroupTotal = 0 also get displayed. How can I suppress a group which contains a running total of 0 without messing up the report?

Post Author: palm
CA Forum: Crystal Reports
Here is a small suggestion , try this
i am not into running totals much , so create a formula which gives the sum for a Particular Group (Project Number here) and place it GH or GF of Project Status
Synatax: Formula: Test
Sum(,{Project Number})  // give total of field for a particular Project Number
Now you want suppress those groups where the SUM is ZERO , So in section expert  and  in supress write a condition       (@Test)=0
It will suppress those groups where sum =0
Try this and let me know!!!

Similar Messages

  • Looking for alternative formulas to suppress duplicates through Section Expert

    I'm using version 14.0.2.364 CR and having trouble building a customized treatment plan report for our case workers to manage to filter out duplicates. I'll do my best to give a layout and criteria:
    GH: CDCLIENT.SAI_ID    STAFF.SORT_NAME
    Case #
    First Name
    Last Name
    Home Phone
    DOB
    Tx Plan Start Date
    Tx Plan End Date
    CDCLIENT.CASE_NUM
    CDCLIENT.FIRST_NAME
    CDCLIENT.LAST_NAME
    CDCLIENT.PHONE
    CDCLIENT.DOB
    PLAN.BEG_DATE
    PLAN.END_DATE
    GF: CDCLIENT.SAI_ID    STAFF.SORT_NAME
    The problem is that when pulling data for each client, it will bring forward all their tx plans, but I just want to show the newest one. I was inclined to go to section expert > Select Details > Suppress (No Drill down) and in X-2, put the following:
    if {CDCLIENT.CASE_NUM} = next({CDCLIENT.CASE_NUM}) then true else false
    This will suppress duplicate records ONLY if I have this sorted by Case #. The problem is, we want to sort by Tx Plan End Date, so case workers can identify which clients are coming up for expiring tx plans. The way the data is stored, I have the first 5 columns from one table, and the last two in another. I also tried to format the field, go to "Commons" on CASE_NUM and choose Suppress (if Duplicated) in combination with the Section Expert, but it was still pulling both if I have it the sort order start at PLAN.END_DATE.
    Is there a way to preserve the most recent begin / end date and suppress any duplicates without sorting it by case #?

    Jamie Wiseman wrote:
    or in the case of your report use this as the suppression formula...sorry again about the original code.
    {AZCLPLAN.BEG_DATE} <> maximum ({AZCLPLAN.BEG_DATE}, {CDCLIENT.SAI_ID})
    The problem with this suppression is that for each Case Worker (Group) it is only pulling one client record forward, thus suppressing all other multiple unique clients associated with this caseworker.
    What my original report (before your suggestions is this):
    Case Manager Name (group CDCLIENT.SAI_ID)
    CDCLIENT.CASE_NUM
    CDCLIENT.FIRST_NAME
    CDCLIENT.LAST_NAME
    CDCLIENT.PHONE
    CDCLIENT.DOB
    PLAN.BEG_DATE
    PLAN.END_DATE
    1
    Client A
    Client A
    111-111-1111
    01/01/11
    01/01/2013
    01/01/2014
    2
    Client B
    Client B
    222-222-2222
    02/22/22
    02/02/2013
    02/02/2014
    3
    Client C
    Client C
    333-333-3333
    03/31/33
    03/03/2013
    03/03/2014
    1
    Client A
    Client A
    111-111-1111
    01/01/11
    01/01/2014
    01/01/2015
    4
    Client D
    Client D
    444-444-4444
    04/04/44
    04/04/2014
    04/04/2015
    Notice, it finds two records for Client A, because they are an existing client that needs continuous treatment. The caseworker doesn't need to see the older record for Client A, but also needs to see all other unique records.
    I basically want it to suppress the first row (older treatment plan) for Client A and have it display like this in conjunction with all other unique clients:
    Case Manager Name (group CDCLIENT.SAI_ID)
    CLIENT.CASE_NUM
    CDCLIENT.FIRST_NAME
    CDCLIENT.LAST_NAME
    CDCLIENT.PHONE
    CDCLIENT.DOB
    PLAN.BEG_DATE
    PLAN.END_DATE
    2
    Client B
    Client B
    222-222-2222
    02/22/22
    02/02/2013
    02/02/2014
    3
    Client C
    Client C
    333-333-3333
    03/31/33
    03/03/2013
    03/03/2014
    1
    Client A
    Client A
    111-111-1111
    01/01/11
    01/01/2014
    01/01/2015
    4
    Client D
    Client D
    444-444-4444
    04/04/44
    04/04/2014
    04/04/2015
    What your Section Expert + Summary Code did, was essentially this:
    Case Manager Name (group CDCLIENT.SAI_ID)
    CLIENT.CASE_NUM
    CDCLIENT.FIRST_NAME
    CDCLIENT.LAST_NAME
    CDCLIENT.PHONE
    CDCLIENT.DOB
    PLAN.BEG_DATE
    PLAN.END_DATE
    4
    Client D
    Client D
    444-444-4444
    04/04/44
    04/04/2014
    04/04/2015
    Maximum
    04/04/2015
    Let me know if this is possible.

  • How do i suppress a section with a formula if a sql query result is 0

    hello everyone,
    i want to supress a section if a query result is 0. Is there a tutorial somewhere how to do that?
    thank you all,
    joshua

    Hi, 
    Crystal needs to know what the record count is.  In our reports, we have a message that comes up when the record count is 0. 
    In the Section Expert, select the section  you want suppressed.  Put a check beside Suppress (No Drill-Down).  In the Conditional formula your formula would look like: 
    Count ({table.FIELD1}) = 0;
    This will suppress that section if no records are returned. 
    Good luck,
    Brian

  • How to apply two conditions in Suppress in Section Expert

    Hi,
    I need your help in applying to conditions in the Details section for the suppress in the Section Expert. My Report looks like:
    Details A: {@SUM -DR}   {@SUM -CR}   {@SUM -Balance} {@TT-CLASS}
    Details B: {Deal_No}   {Image_No}   {Amount}   {@Comments}  
    Currently, I am applying a condition to suppress both Details A and Details B in the section expert:
    {@TT-CLASS}="OB"
    Now while running the report, I got some duplicated deals ex:
    123   1   1000   Reversal
    123   1   1000   Reversal
    124   2   2000   Approved
    So I applied a condition in the section expert for the details A and B which is:
    ({Deal_No} = next({Deal_No} ) and {Image_No} =next( {Image_No} ) )
    or 
    {@TT-CLASS}="OB"
    And it is still giving me the duplicated deals when I am running the report. So can you please help.
    Thanks

    Duplicates are usually caused by an incorrect Join.
    What is the datasource of the report - tables/views, stored procedures, sql query?
    If you're reporting against tables/views, see if checking the 'select distinct records' option under the 'Database' menu helps.
    -Abhilash

  • Crystal Reports XI - Suppression Formula

    I am trying to suppress different sections based on fields in my report. I have checked that the formulas are working by placing them in the report and have checked that they are returning the correct boolean result. I have three sections using the forumulas below;
    Section A
    If pagenumber MOD 2 = 0 then true
    else
    If {Student__02_03_.Date of Birth}<>DateTime(1900,1,1,0,0,0) and {Student__02_03_.Ethnicity}<>"99" then
        FALSE
    else
        TRUE
    Section B
    If pagenumber MOD 2 = 0 then true
    else
    If ({Student__02_03_.Date of Birth}=DateTime(1900,1,1,0,0,0) and {Student__02_03_.Ethnicity}<>"99") then
        FALSE //If either date of birth & ethnicity are blank or unknown then show this header
    else
    If ({Student__02_03_.Date of Birth}<>DateTime(1900,1,1,0,0,0) and {Student__02_03_.Ethnicity}="99") then
        FALSE //If either date of birth & ethnicity are blank or unknown then show this header
    else
        TRUE // if not then supress
    Section C
    If pagenumber MOD 2 = 0 then true
    else
    If ({Student__02_03_.Date of Birth}=DateTime(1900,1,1,0,0,0) and {Student__02_03_.Ethnicity}="99") then
        FALSE //If both date of birth & ethnicity are blank or unknown then show this header
    else
        TRUE // if not then supress
    For my first result in the report this always returns the correct section. However, from the second result on it hides all of the sections, despite showing the correct result in CR (they show FALSE, TRUE, TRUE for each record in my current result. But the first section does not display.
    If I remove the suppression formula it works fine through the report, but unfortunately this does not help me! Can anyone offer any suggestions?
    Edited by: cataylor951 on Jan 12, 2011 12:08 PM

    >
    cataylor951 wrote:
    > I am trying to suppress different sections based on fields in my report. I have checked that the formulas
    are working by placing them in the report and have checked that they are returning the correct boolean result.
    I have three sections using the forumulas below;
    >
    > Section A
    >
    If pagenumber MOD 2 = 0 then true
    > else
    > If {Student__02_03_.Date of Birth}<>DateTime(1900,1,1,0,0,0)
    > and {Student__02_03_.Ethnicity}<>"99" then
    > then   FALSE
    > else   TRUE
    >
    > Section B
    >
    If pagenumber MOD 2 = 0 then true
    > else
    > If ({Student__02_03_.Date of Birth}=DateTime(1900,1,1,0,0,0)
    > and {Student__02_03_.Ethnicity}<>"99") then
    >     FALSE
    > //If either date of birth & ethnicity are blank or unknown then show this header
    > else
    > If ({Student__02_03_.Date of Birth}<>DateTime(1900,1,1,0,0,0)
    > and {Student__02_03_.Ethnicity}="99") then
    >     FALSE
    > //If either date of birth & ethnicity are blank or unknown then show this header
    > else TRUE // if not then supress
    >
    > Section C
    >
    If pagenumber MOD 2 = 0 then true
    > else
    > If ({Student__02_03_.Date of Birth}=DateTime(1900,1,1,0,0,0)
    > and {Student__02_03_.Ethnicity}="99")
    > then  FALSE
    > //If both date of birth & ethnicity are blank or unknown then show this header
    > else
    >     TRUE // if not then supress
    >
    > For my first result in the report this always returns the correct section. However, from the second
    result on it hides all of the sections, despite showing the correct result in CR
    (they show FALSE, TRUE, TRUE for each record in my current result. But the first section does not
    display.
    >
    > If I remove the suppression formula it works fine through the report, but unfortunately this does not
    help me! Can anyone offer any suggestions?
    >
    > Edited by: cataylor951 on Jan 12, 2011 12:08 PM
    What do you mean by: from the second result  ?

  • Crystal 2011 RAS. Section Expert Paging tab properties does not correspond to EnableNewPageAfter, EnableNewPageBefore properties in section format

    Hello,
    We have application where you can select fields, select groupings and properties (for example disable page grouping ) and create custom report.
    It worked with crystal 9.
    Now we are converting to Crystal 2011 and I have the following problem:
    I create report dynamically and set group footer EnableNewPageAfter property to false in group footer section.
    When report is created , I open it and see that New Page After property in section expert is unchecked.
    When I run the report, I have page break after each group - which is wrong.
    If I open report in Crystal, check New Page After Property , save, exit report, open report again, uncheck New Page After Property, save and exit,And than run the report again,
    My report behaves correctly:does not break after each group.
    If I open report in Crystal, check New Page After Property , save, exit report and then load this report in code and look at EnableNewPageAfter property,
    the property is still false - but it should be true
    Do I use the wrong property?
    What is the right RAS property to set  Crystal report 'New Page After' Property in the code for group footer/group header?
    Below is method that sets properties for section.
    All properties from common tab works, but paging tab properties does not work
    public static void SetSectionSettings( ReportSectionController reportSectionController, Section section, Color backgroundColor, bool enableKeepTogether, bool enableNewPageAfter,
                                                bool enableNewPageBefore, bool enablePrintAtBottomOfPage, bool enableResetPageNumberAfter, bool enableSuppress, bool enableSuppressIfBlank,
                                                bool enableUnderlaySection, bool autoFitSection )
                try
                    SectionFormat sectionFormat = new SectionFormat();
                    sectionFormat.EnableKeepTogether = enableKeepTogether;
                    sectionFormat.EnableNewPageAfter = enableNewPageAfter;
                    sectionFormat.EnableNewPageBefore = enableNewPageBefore;
                    sectionFormat.EnablePrintAtBottomOfPage = enablePrintAtBottomOfPage;
                    sectionFormat.EnableResetPageNumberAfter = enableResetPageNumberAfter;
                    sectionFormat.EnableSuppress = enableSuppress;
                    sectionFormat.EnableSuppressIfBlank = enableSuppressIfBlank;
                    sectionFormat.EnableUnderlaySection = enableUnderlaySection;
                    sectionFormat.BackgroundColor = uint.Parse( ColorTranslator.ToWin32( backgroundColor ).ToString() );
                    reportSectionController.SetProperty( section, CrReportSectionPropertyEnum.crReportSectionPropertyFormat, sectionFormat );
                catch ( Exception ex )
                    log.Error( "ReportApplicationBuilder error - SetSectionSettings: ", ex );
                    throw;
    Thanks,
    Julia Klubis

    Hi Julia,
    There have been a few escalations of this type. For some odd reason you have to call the .Set 2 times...
    reportSectionController.SetProperty( section, CrReportSectionPropertyEnum.crReportSectionPropertyFormat, sectionFormat );
    reportSectionController.SetProperty( section, CrReportSectionPropertyEnum.crReportSectionPropertyFormat, sectionFormat );
    See if that works?
    Don

  • Crystal report 2011 - Suppress formula?

    I'm not new to Crystal reports 2011, but I am new to this forum. Excuse me if my question is already answered in another discussion thread, but I've searched the forum, but could not find an answer easily.
    In my report I need to total the amount per day per security. If one of the totals per day have a negative amount, my report should show all dates for that security.
    To make it more clear to you I've put in two examples
    Example 1:
    From date      PfGrp        Por         Security      ISIN          Custody     Amount
    15-1-2015      aaa           por_a      Sec01        123456      Cust01      5000
    15-1-2015      aaa           por_b      Sec01        123456      Cust02      -6000
    16-1-2015      aaa           por_a      Sec01        123456      Cust01       5000
    16-1-2015      aaa           por_b      Sec01        123456      Cust02       1000
    17-1-2015      aaa           por_a      Sec01        123456      Cust01       2000
    17-1-2015      aaa           por_b      Sec01        123456      Cust02       1000
    Expected output:
    From date      PfGrp        Por         Security      ISIN          Custody     Amount
    15-1-2015      aaa                          Sec01        123456                         -1000
    16-1-2015      aaa                          Sec01        123456                          6000
    17-1-2015      aaa                          Sec01        123456                          3000
    Output expected because the total amount on 15-1-2015 is negative. Because of this negative total amount the other dates have to be shown as well.(although they are positive)
    Example 2:
    From date      PfGrp        Por         Security      ISIN          Custody     Amount
    15-1-2015      aaa           por_a      Sec01        123456      Cust01       5000
    15-1-2015      aaa           por_b      Sec01        123456      Cust02       6000
    16-1-2015      aaa           por_a      Sec01        123456      Cust01       5000
    16-1-2015      aaa           por_b      Sec01        123456      Cust02       1000
    17-1-2015      aaa           por_a      Sec01        123456      Cust01       2000
    17-1-2015      aaa           por_b      Sec01        123456      Cust02      -1000
    No output expected because all the totals per day are positive.
    Regards, Peter.

    Hi Peter,
    Try this please:
    1) Save the existing report with a new name. You should now have two copies of the same report - let's call them A and B.
    2) Open Report A.
    3) Insert a Group on the Security Field first and then on the Date field. Set the Date Field to 'Print for Each Day'.
    4) Create a formula (@Groups) with this code and place this on Group Header #2:
    WhilePrintingRecords;
    stringvar groups;
    If Sum ({Amount}, {Date}) < 0 then
        If Instr(groups,{Security}) = 0 then   
            groups := groups + {Security} + ",";   
    groups;
    5) Suppress all sections of this report except the Report Footer.
    6) Go ahead and Insert a Subreport. In the Insert Subreport dialog box, browse to the Report B and place it on the Report Footer.
    7) Edit the Subreport so that it has the same groups as the Main Report (or Report A)
    8) Right-click the Subreport > Change Subreport Links > Move the @Groups formula to the Pane on the right > Uncheck the option 'Select data in Subreport based on Field' > Click OK.
    9) Get inside the Subreport > Click the Report Option > Selection Formulas > Record and use this code:
    Not({Security} IN Split({?Pm-@Groups},","))
    IF you have some existing selection formula in there, then you would need to add this condition with an AND clause.
    Hope this helps.
    The reason we have to add a Subreport is because you're trying to suppress a higher group based on a summary that appears on a lower group.
    If you're reporting off of tables, you should be able to use a SQL Expression Field to display the summary for Group #2 and use this summary to suppress the higher section based on another logic!
    -Abhilash

  • Using Highlighted Expert With Formula (i.e. 'Insert Summary')

    I'm trying to compare the summary of a value (via formula (let's call it 'formula A' ) that uses the 'Insert Summary' option in Crystal Reports) with the value that is in a table.  The formula does not show in the list of available fields (i.e. in the 'Item editor' section for 'Value of') of 'Highlight Expert'.  So, I used 'Other Fields ...' (which took me to 'Choose Field').  I found the field (as a Group#1 total), so I set it up to compare this Group #1 total for 'formula A' to 0.00.  I then tried to create logic in formula 'A' which currently does what it supposed to do, but it states that 'A formula cannot refer to itself, either directly or indirectly."  How can I refer to the value and flag (i.e. 'crRed' - 'Conditional Formatting Function') the value if they are different.  Thanks  ! ! !

    I found another way to compare these two (2) values.  It is outlined below:
    1.  Right click on the value
    2.  Select 'Format Field . . .'
    3.  Select 'Font' tab
    4.  Create the formula (As shoen below)
    If {Region.Commission_Amt} <> {@Commission Amount} Then crRed;
    Now, my problem is that any value after the decimal point that does not end with a '00', '05', '50' is flag in red.  I tried rounding, but it did not solve the problem.  Since I can't see the actual values, I don't know what is causing this.  Any ideas ?

  • Select Expert on Formula Fields

    <p>Hello guys I have a Formula</p><p>if <a href="mailto:{@TrueAndFalse}<>{#RTotal0">{@TrueAndFalse}<>{#RTotal0</a>} then "Caution !"<br />    else "Is OK"</p><p>I need to created Select Expert and show only the "Caution !" </p><p>so I dont want to show "Is OK" in the report</p><p>thanks for you help<br /></p>

    Hi,
    You just Call formula in selection expert window and give like this
    formulaname = "Caution !"
    !/modules/tinymce/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-cool.gif|title=Cool|height=18|alt=Cool|width=18|src=/modules/tinymce/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-cool.gif!
    Let me know any other info u want......Â
    Thanks
    Rajesh

  • Section code suppressed on vendor line item in f-53

    Hi all!
    I have created a validation to make business place and section code mandatory on all vendor accounts. This works fine except for when trying to post a vendor payment in transaction f-53. On the line item for the vendor I get an error message when trying to save saying that I must enter business place and section code (according to my validation). Business place is automatically filled but section code is not and the main problem is that that field is supressed. So now it's not possible to post a payment!
    How do I solve this? How do I make the field section code not supressed and filled automatically or manually?
    Many thanks in advance!

    Hi,
    Can you please check the affected posting key in 0B41 and its field status.
    Thanks
    Aravind

  • How to add a trigger for a section to suppress in Documaker 11.4

    Hi,
    I am using 11.4. My form has a particular section which in turn has a multi line variable that gets printed based on a DAL. if the DAL returns no value, the variable would be empty and it prints the blank sections. I want the section not to be printed on my formset, if the multi line variable returns no value.
    Could someone can help me in this??
    Thanks in advance
    Sai

    Thank you user9976546 ,
    i have used dal similar to the one you hv provided.
    the problem is explained below:
    B = ?(!\Document\MessageContent); C= ?(!\MessageContent\Message text); If (len(C !> 0) then return B;end;
    given: "B" may have more than one entry in the XML and "C" is optional child node inside "B". if C has no value, the variable field wil return B`s value into multi line variable field according to my DAL.
    But, it prints the blank section if C doesnt have any value in it. sample output below:
    Sample data
    Record 1
    Message content: 1111
    Message text: No value for this record
    Record 2
    Message content: 2222
    Message text: abc
    Record 3
    Message content: 3333
    Message text: No value for this record
    Record 4
    Message content: 4444
    Message text: abc
    Record 5
    Message content: 5555
    Message text: No value for this record
    Sample Output
    11111
    +<blank section>+
    3333
    +<blank section>+
    5555
    I tried adding "@" field rule function, PostImage Dal but could not get the desired result.
    Now after adding the "@" function, it is not picking up the particular section at all.

  • Section code suppressed in f-53

    Hi all!
    I have created a validation to mabke business place and section code mandatory on all vendor accounts and on bank accounts. This works fine except for when trying to post a vendor payment in transaction f-53. On the line item for the Bank G/L account I get an error message when trying to save saying that I must enter business place and section code (according to my validation). Business place is automatically filled but section code is not and the main problem is that that field is supressed. So now it's not possible to post a payment!
    How do I solve this? How do I make the field section code not supressed and filled automatically or manually?
    Many thanks in advance!
    Best regards,
    Åsa

    Dear,
    Don't work hard to get this done.. Section Code is available only in vendor and customer line item....Because TDS is to be deducted on the vendor line item not the bank line item...
    You can update Business Place in the Bank Line item but not the section code....
    Change your substitution to remove bank gl account for coming into check performance.....
    Regards,
    Chintan Joshi

  • Section Expert Help with Groups

    Hello,
    Seeking assistance with forcing my report groups to print on odd pages.  Essentially, I have letters I need to fold and place in an envelope with a window.  That requires that my print job to print the beginning of every new group on odd pages 1, 3, 5, etc.  Thanks in advance for your attention on this!
    Eddie

    Eddie Gonzalez wrote:>
    > Great!  Thanks for the follow up!  Any idea on how I can suppress all items (Header, footer, etc.) when using your solution?
    You can suppress all the headers and footers except the 2 group footers like normal - for the footers, just size them to almost nothing - you can't size to 0 or they are ignored - even the page breaks (had a LONG conversation about that with customer support but they just didn't "get it")

  • How to disappear the sub Report if the values are null from db..

    hi.
    i have one requirement ie.
    i put two sub reports at report footer section..
    sub report values are coming from the data base
    Some times  there is no values in data base at sub report two
    plz have a look on below image..it becomes empty.
    can i disappear the sub report if there is no values..
    I need your valuable suggestions..

    Hi
    In your sub reports, you also have to suppress the values (report labels,headings etc) using a formula.
    Go in Report Menu--Section Expert--Suppress -- Formula editor and write the follwoing :
    if Count({Yoursubreportfield)}) > 0 then false else true
    This will suppress your headers and footers or any other secitons which has static information.
    Now in the main report go in section expert and check 'Suppress Blank Sections'
    Also check you have applied New Page before or After for any of your sections.
    --Praveen G

  • Need a formula to suppress the page header for multiple pages

    Hello Experts,
    I have a report where I need to suppress the Page Header on 4 pages that have charts.  There are two different charts that take up the full page, but my page header shows up at the top of the page. 
    I found a way to get the page header off of the first page with a formula in the Section Expert; Suppress; but I need to be able to do the same for the other 3 pages.
    My formula that worked for the first page is:  PageNumber = 2
    I tried everything I can think of to add page numbers 15; 21; and 35.
    Can you please tell me if this is possible and what I should do?  Thanks in advance for your help.
    Kathryn.

    Do you know what pages you want to suppress?
    If yes, can you use the suppress formula option in the Section Expert?
    pagenumber in [1,2,3,4]
    Hope this helps.
    Edited by: Sharma Hari on Nov 18, 2009 9:01 PM

Maybe you are looking for