Runtime acces to Group Supress Formula

Hello,
I'm using Crystal Reports 2008.
I want to remove a supress formula in runtime from a given group/section.
I can only access to a readonly object (ReportDefController) where these formula is defined.
Dim objGroupSection As CrystalDecisions.ReportAppServer.ReportDefModel.Section
                For Each objGroupSection In m_objReport.ReportClientDocument.ReportDefController.ReportDefinition.GroupFooterArea(intGroupNumber).Sections
                    objGroupSection.Format.ConditionFormulas.RemoveAll()
                Next
                For Each objGroupSection In m_objReport.ReportClientDocument.ReportDefController.ReportDefinition.GroupHeaderArea(intGroupNumber).Sections
                    objGroupSection.Format.ConditionFormulas.RemoveAll()
                Next
                'm_objReport.ReportClientDocument.ReportDefController.ReportStyle
                m_objReport.ReportClientDocument.ReportDefController.ReportDefinition.GroupFooterArea(1).Sections(0).Format.ConditionFormulas.RemoveAll()
What am I doing wrong? Is there any other way of accessing these object ?

Jos,
Yes you can do what you are attempting to accomplish. You'll want to use the ReportSectionController's SetProperty method to change the entire SectionFormat object.
See the code below for a small sample of what you need to do.
ISCDReportClientDocument boReportClientDocument;
boReportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
boReportDocument.Load(Server.MapPath("CrystalReport.rpt"));
boReportClientDocument = boReportDocument.ReportClientDocument;
// Get the section that needs to be modified
CrystalDecisions.ReportAppServer.ReportDefModel.Section boSection = boReportClientDocument.ReportDefinition.Areas[0].Sections[0];
// Clone the SectionFormat so changes can be made
CrystalDecisions.ReportAppServer.ReportDefModel.SectionFormat boSectionFormat = boSection.Format.Clone(true);
// Get the ReportSectionController
CrystalDecisions.ReportAppServer.Controllers.ReportSectionController boReportSectionController = boReportClientDocument.ReportDefController.ReportSectionController;       
// Change the condition formula to its new value
boSectionFormat.ConditionFormulas[CrystalDecisions.ReportAppServer.ReportDefModel.CrSectionAreaFormatConditionFormulaTypeEnum.crSectionAreaConditionFormulaTypeEnableSuppress].Text = "false;";
// Use the SetProperty method on the section controller to modify the crReportSectionPropertyFormat
boReportSectionController.SetProperty(boSection, CrystalDecisions.ReportAppServer.Controllers.CrReportSectionPropertyEnum.crReportSectionPropertyFormat, boSectionFormat);
CrystalReportViewer1.ReportSource = boReportDocument;

Similar Messages

  • Group with formula schould show concrete figures

    I would like to create a group with formula, where I do not have database fields, but fixed figures, namely from 1 to 10. The result schlud be 10 rows.
    How to do that?

    If this is still an issue please re-post your question or purchase a support case on line and have a dedicated support engineer work with you directly.

  • Building a template - groups and formulas

    CR2008
    I'm trying to build a template to standardize some reports. I can get the header and the formatting fine: however, when I created a formula for Page M of N, the formula disappeared, and the field was replaced with one of the header fields. Does this just not ever work, or am I missing something?
    The documentation says "If an existing report is used as a template, these report objects will be applied to the new report: Fields, Groups, Summary fields". However, when I tried to save a grouping and apply it to an existing report, nothing happened - only the formatting came across.
    Thanks for any and all help!
    Edit: I added a TemplateField to my template and grouped on it, and applied it -- didn't work. However, when I then added grouping to the report, and re-applied the template, the new groups picked up the formatting from last time. When I added more groups than there were in the template, the newest groups were formatted the same as the last group I had specified. The Custom Group Name, which I had specified to be TemplateField2, (the same as the second grouping) still wasn't picked up, though. When I only specified a single TemplateField in the detail line, the Template Expert split the detail section into seven stacked detail sections, so that won't be much use.
    So, the other question remains: am I completely out of luck with formulas? And functions, for that matter? Thanks again!
    Edit again: I tried adding a Summary field to the template. While combining a text field and a summary field didn't work, dropping them next to each other did. Also, it only worked for the same summary: when I accidentally did a Sum instead of a DistinctCount, as the template was expecting, the formatting was ignored.
    Edited by: Garrett Fitzgerald on May 7, 2009 3:03 PM
    Edited by: Garrett Fitzgerald on May 7, 2009 3:34 PM

    Hello Rashmi,
    I'm not sure if I understood your question, but it seems you have to put your key figures in columns, together with time, if, for example, you want to show information like this:
    .........................................................                                                                           06.2008      07.2008 ...
    ..........................................................                                                 kf1 kf2....      kf1 kf2
    Org->Channel->customer->product  
    Please let me know if is this you are looking for.
    Best regards,
    Sue

  • Runtime acces to append structure

    Hi All!
    Do any of you gurus know if it is possible to add an append structure to a table allready imported into webdynpro, and then dynamically gain access to the field runtime?
    Our scenarios is that we have created an application that makes use of diffrent tables from R/3, but some of our customers have added aditional fields to theese via the append structure.
    So to avoid reimporting the RFC and making explicit customer version, is it possible to dynamically add theese append fields runtime using webdynpro code?
    Best regards,
    Ronni

    Hi
    I clearly mentioned  that take some input and find out some way.
    Ok, i answer one by one
    it is possible to add an append structure to a table already imported into webdynpro, and then dynamically gain access to the field runtime?
    We never import a table in webdynpro , this is one way of access the structure, so that we can work with
    DB (for standard CRUD operations and representation ). or talking other than webdynpro perspective if something we want to access from database it gives us a Arraylist further we make it representable for our UI
    Our scenarios is that we have created an application that makes use of diffrent tables from R/3, but some of our customers have added aditional fields to theese via the append structure.
    So to avoid reimporting the RFC and making explicit customer version, is it possible to dynamically add theese append fields runtime using webdynpro code?
    Then why Adaptive reimport function is there so that if some thing change in database after reimport it get reflected in our mapping structure also and of course when ever any changes in data base will happen (adding a new field , changes in datatype ) you must have to do modification in your structure also.
    I hope these inputs are sufficient.
    Best Regards
    Satish Kumar

  • Group Name Formula

    I have a Hierarchial table with ID,ParentID and CategoryName
    My report is grouped by ParentID, however I want change the Group Name to be the CategoryName where ID = ParentID.  Not having much luck as I am very new to CR.
    Thanks
    Brett

    Hi Panda,
    Not sure I understand what you mean...open select expert on report on on groupname?
    I tried groupname and got no results, same for report.  Please note ParentID and ID never match.
    For Parent Records columns would be as follows
    ID  |  ParentID | CategoryName
    1   |  null      | Food
    2   |  null      | Places
    3   |  null      | Events
    For child records colums would be as follows
    ID  |  ParentID | CategoryName
    15 |  1         | Beef
    16 |  1         | Pork
    17 |  1         | Poultry
    18 |  2         | Home
    19 |  2         | Business
    20 |  2         | Farm
    21 |  3         | Wedding
    22 |  3         | Concert
    22 |  3         | Contest
    So our whole table may look like this....
    ID  |  ParentID | CategoryName
    1   |  null      | Food
    2   |  null      | Places
    3   |  null      | Events
    15 |  1         | Beef
    16 |  1         | Pork
    17 |  1         | Poultry
    18 |  2         | Home
    19 |  2         | Business
    20 |  2         | Farm
    21 |  3         | Wedding
    22 |  3         | Concert
    22 |  3         | Contest
    So Group Names should be Food, Places, Events with associated child records listed in the details section.  If there is a better way to do this, please let me know....as before I am very new.
    Hope this helps....
    Edited by: Brett Slaght on Jul 7, 2008 6:24 PM

  • Grouping controls at runtime

    I have a group of controls that I would like to move at runtime as a group and maintain their relative position. Like a custom control that contains several controls. I know I could do it manually but it would be a real pain. IS this possible?
    Thanks,
    Bill F

    You can control each with a property node. It shouldn't be that hard.
    If your problem is that you don't want each of them to have a property node, you can collect their references into an array and use a for loop with one node, or you can place them into a cluster and move the cluster (functionality changed) or you can place them into a tab control and move the tab (no change).
    In any case, you should be aware of the toll this will take on your PC and not do it all the time.
    Try to take over the world!

  • Using Win2000 Group Policies to distribute runtime engine

    I have a Win2000 domain and would like to distribute the 7.1 runtime engine using Group Policies for a group of computers in the domain. I created the policy called LVRuntime and tried to add the 7.1 runtime MSI file to the policy under ComputerConfiguration\SoftwareSettings\SoftwareIns​tallation however I get the error message:
    "Add Operation Failed. Unable to extract the deployment information from the package. Run validation on the package to ensure the package is correct."
    MS has an article on this if the package is already installed on the system or if you are using a GPO of a different version, but neither are the case. I am creating the policy right on the Domain Controller just as I have many other policies like it.

    Hi Jordan,
    The MSI deployment through group policies is not supported for LabVIEW RTE. Although MSI is used as the outer layer, we use our own technology inside.
    Regards,
    Ankita A.
    National Instruments

  • No drilldown option for Formulas in structure

    Hi Experts, Could you throw some light on the following issue.
    My char structure is as follows,I have a grouping done on GL and when i drill down I shd see the GL only for selections and not for formula i.e. the formula should not drilldown and show GL's.see the below example.
    Example,
    A - SALES(GL grouping)
    B - TAX &DUTIES(GL grouping)
    C - Formula (SALES  + TAX & DUTIES)
    For summarised report ,the above display is OK but when I drilldown and see GL level data,is there anyway to supress and make the formula as static(no drilldown for formula).
    Kindly guide me if there is any way out .
    Regards
    Raja Premsingh

    I think you only want to see the values for key figures A, B and C in the result rows and not in the details when you have a drilldown on GL, am I right?
    What you could do, is create a new calculated key figure to determine the number of GL's. You could use a formula variable with replacement path for constant 1 on GL, or created a a copy of key figure A with aggregation level GL and counting all values <> 0.
    Once you have a column with the number of GLs, create a formula like ( number of GLs > 1 ) * key figure A. This way, only the result rows will show values.
    Kind regards,
    Alex

  • How to remove the 0 that is added to the formula result

    Hi,
           I have a formula field. i placed the formula field in the group footer. zero (0) is added to the formula result. if the formula result is 8 then i am getting 0.00 and 8 as data when i select the browse field data of that field . how to remove the zero. i also used supress formula for the field. but it is not working. any idea on this regard.
    Regards,
    Shanthakumar.

    hi,
      Formula : GRP1Focus
                  if ({@Grp1BrandName}={@All Brand Names})  then {@FocusValue NBSH}. when i right click the formula field and select browse data. 0.00 and 8 are displaying.
    Suppress formula
             GRP1Focus=0
    Regards,
    Shanthakumar

  • Set date grouping option at run time

    Is there a way to change the date field grouping options at runtime?  What I would like to do is have the user select a parameter for monthly or weekly grouping; then set the "The section willl be printed:" area on the date group to either "for each week" or "for each month" based on the value of the parameter.

    Try to create two formula in the report like this
    @Monthly:
    whilereadingrecords;
    if {?Parameter}="Monthly" then
    {date field}
    @Weekly:
    whilereadingrecords;
    if {?Parameter}="Weekly" then
    {date field}
    Now remove the existing group GH1 in the report and insert a group on formula @Monthly and select for each month for this group.
    Now insert another group GH2 on the formula @Weekly and select for each week for this group in group options.
    Now the report works dynamically according to the selected value in the parameter.
    Hope this helps!
    Raghavendra

  • Problem Using Inner Group Name

    Hi
    In my report design, I have 4 groups level created and all of them are based on Account number. Its like group and subgroup structure.
    All I wanted to do is , I want to supress the Footer of Inner most group(group 4) based on the group name.
    for example if the group4 name ="something" I need to supress group 4 footer section.
    I tried to put the above condition in Supress formula of group4 footer section. its not working.
    On the formula editor I choose the group4 name field avaiable under Report fields. Its comes as
    GroupName ({@Account Number})  in to the formula ( There is not mention of which group name its refers to).
    So by default its  apply the formula on the outter most group name(group 1). So my condition fails.
    Please help me.

    This my structure
    Group Header1                                                           Group 1 Name
        Group Header2                                                        Group 2 Name
           Group Header3                                                     Group 3 Name 
               Group Header4
                             Details                  AccoutNumber    Account Description       Amount
                Group Footer4                  textbox            Group4 name                      sum of Amount          
           Group Footer3
        Group Footer2
    Group Footer1
    I want to supress the Group Footer4 based on Group4 name.
         ASSETS
         CURRENT ASSETS
         1XXX   0092     CASH SAVINGS DBTCA     $172,868,975.44
                                                                          $172,868,975.44
         TOTAL     CASH & CASH EQUIVALENTS
         13XX   5555     A/R OTHER                           $5,423,705.50
                                                                          $5,423,705.50
         TOTAL     ACCOUNTS RECEIVABLE
         1XXX   0001     I/C REC MGMT LLC SAN FRAN     $8,878,791.16
         1XXX  0001     I/C REC MGMT CO SAN FRAN     $45,046,263.00
           TOTAL     INTER   COMPANY RECEIVABLE           $53,925,054.16
         1XXX  0000     DEFERRED TAX ASSET     $70,548,040.00
         $70,548,040.00
         TOTAL     NOTGROUPED
          302,765,775.10
    The bold lettered text are belongs to Group4 footer . I want to suppress it if the group 4 name is " NOTGROUPED"
    Edited by: Nivazz on Sep 9, 2009 5:16 PM
    Edited by: Nivazz on Sep 9, 2009 5:17 PM

  • Eliminating Group Tree Level in VS2010

    I need to have a variable number of levels in the group tree in VS2010, a technique I have used in CR for VS2005. I also saw this resolved for someone using VS2008 on thread 1493907 using the same method that I used in 2005. If, at the most detailed level, I group on a formula that I set to return a zero length string, that level still shows up in the tree and causes an error if the user tries to drill down that far.
    The 3 grouping furmulas:
    Group 1 formula
    select {?level}
    case 1 : {XXX.AGENCY_CD}
    case 2 : {XXX.REGION_CD}
    case 3 : {XXX.ORG_CD}
    default: ""
    Group 2 formula
    select {?level}
    case 1 : {XXX.REGION_CD}
    case 2 : {XXX.ORG_CD}
    default: ""
    Group 3 formula
    select {?level}
    case 1 : {XXX.ORG_CD}
    default: ""
    Summary
    If reporting from Level 1, then all levels of the tree are necessary. If reporting at level 4, I hide the group tree, since it is not necessary. If I want to report from level 3 (or 2), 2 (or 1) levels of grouping should be eliminated, but they are not.

    Don
    I set the grouping level to 3 (out of 1,2,3,4). If the level is 4, the tree makes no sense, so I hide it.
    If I run the program from the IDE:
    When I try to drill down in the GroupTree to the level that should not exist, Visual Studio breaks n allInOne.js with the error "Microsoft JScript runtime error: 'txtTooltipLyr' is null or not an object".
    If I view it in the Main Report Preview in the IDE:
    The 2 levels of nodes that should be eliminated are visible, but they do not do anything. The have no text and expanding the lowest level of the tree does nothing.
    If I deploy the web page and run it without using the IDE:
    The 2 levels of nodes that should be eliminated are visible, but they do not do anything. The have no text and expanding the lowest level of the tree does nothing, except that on the browser status bar there is an 'Error on page.' message.
    I have never exported to RPT format. I just tried it and I had to open it with visual studio. It acts just like Main Report Preview described above.
    DebugDiag does not show anything, I am guessing because the IDE is catching the error and nothing is really crashing.
    Chip
    Edited by: sandcrab72 on Feb 22, 2011 9:27 PM

  • 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!!!

  • Supressing sections when you're in the drill-down

    I'm sure I'm overlooking something simple, but I am a Newbie to Crystal, so please forgive my ignorance.
    I want to be able to supress a Page Header, Group Footer, and Report Footer when the user goes to the drilldown screen. The drilldown option is working just fine, I just need to clean up the superflous stuff from the original screen. Is there some sort of function that tells Crystal when the report is in drilldown mode that I can use in a supression formula? That would be pretty cool, and I've looked around but found nothing. Please help.
    Please let me know if I'm not being specific enough in my request, and thanx in advance for any help!
    -Tom

    Firstly, thanx so much for your responses. You are all a very kind and helpful bunch.
    I think Ashwin's solution hit the nail on the head. I simply put a
    DrillDownGroupLevel > 0;
    in the section supression formula for each of the sections that I don't want to display when user is looking at the drill down details. That seems to have worked perfectly. If anyone knows of a drawback to this that I'm not seeing, I'd appreciate you sharing it.
    Otherwise, I think that's exactly the function or call that I was looking for. I was going to resort to just checking on
    totalpagecount > 0
    but that would have messed me up if any of my drilldown sections ever ran only one page.
    Thanx again for all your suggestions and help!
    -Tom

  • Help needed with report grouping

    Post Author: David Waugh
    CA Forum: General
    I have a summary report that has three groupings - The groupings areas follow:
    Partner Group (Group1)Client Group (Group2)Actual Client (Group3)
    For instance, there are 9 Partners, and each Client Group can/could have numerous Actual Clients.
    The Details section is supressed.  There are two parameter fields (Start Date and End Date).  The summary is initally displayed at the Actual Client Group (Group 3) footer.  Then there is a summary total on the Client Group (Group2) level, for all of those clients that are within that same Client Group.
    I am able to sort all of the data at the Client Group (Group2) level either ascending or descending.  In the Actual Client Group footer there is a Running Total for the Invoices billed during the period provided via the two parameter fields.  Then there is an Invoice total for all of the clients that are within that same Client Group level (Group2).
    I need to setup another parameter that will sort via Client Group displaying the top 25 Client Groups per Partner.   Is this done via a Group Selection Formula?
    Any help is appreciated.
    Thank you,David

    Post Author: Jagan
    CA Forum: General
    Have a read in the help about TopN and about the group sort expert.
    Is there a reason you're using running totals rather than plain old summaries?

Maybe you are looking for

  • Error during import of business object BOREPMA (crystal reports)

    Dear Colleagues, we have a problem with importing of crystal reports into productive system, export works fine - I get .car files, but import finished with error : "Error occurred in data conversion". We could not find any reason for this error.....

  • What's the latest OS for 8900 Curve?

    I recently got the 8900 Curve and want to make sure I have the latest OS on my phone. Right now I have 4.6.1.315...is this the most recent one?

  • Data Modeler EA1:  Importing SQL Server Data Dictionary issue

    I am using the Data Dictionary Import Wizard to import the Schema of a SQL Server 2005 database (JDBC connection has "SQL Server 2005" as the Type) into the Oracle SQL Developer Data Modeler. In step 4 of the import, under the "Import to:" section, t

  • Problem with a field list.

    Hi people, When I check the code of my program the system tell me that: Unknown column name "TITLE_MEDI". not determined until runtime, you cannot specify a field list.           but the thing is that the table TSAD3 have this field and I dont know w

  • Logic in PCA extraction

    Hello, I need to add field MATNR to the extract structure for data source 0EC_PCA_1 (ISPCACST) in order to be able to report on material number. But how should the user exit for this be written? I know that the original table for actual PCA postings