Sum duplicate values in crystal reports XI

Post Author: Stuart
CA Forum: Formula
Hi All
As you probably know I'm very new to crystal reports.
Apologies but it seems my previous question was unclear as no one has been able to respond.
What I need is a formula that can recognise a name in field1 is a duplicate and then the amount in field2 for both rows should be sum together thus creating only one row with the same name in field1 but with the two values sum in field2.
I've had a look around and I can see how to remove the duplicates but I want to sum the duplicates into one row not two or three, etc.
Hope to hear from you,
Kind Regards,
Stuart

Post Author: Stuart
CA Forum: Formula
Hi
Thanks for your assistance,
There could be several duplicates,
My data will look like as follows;
Firstname    Surname     Amount
Thomas       Brown        $100
Thomas       Brown        $200
Andrew       Slater          $400
Andrew       Brown          $100
Kelly           Smith         $50
With the formula which I hope you can help me with I would expect the results to be;
Firstname    Surname     Amount
Thomas       Brown        $300
Andrew       Slater          $400
Andrew       Brown          $100
Kelly           Smith         $50
Notice in the above the first and surname have to be unique in order to sum.
There are alot more names hence I cannot list everything,
hope you can help me further,
Kind Regards,
Stuart

Similar Messages

  • How to store the value of sum of group in Crystal Report at the runtime!

    Hello all,
    I creates a Formula Field that hold the value of Sum of Group in Crystal Report. I would like to know how to store it in a variable and pass it to store procedure. Is it an option in Crystal report to do it. I knew that Crystal Report can cache the report for sharing. My detailed issue as following:
    - Created a Formula Field named TOTAL AMOUNT that calculated the complex expression. This TOTAL AMOUNT is dynamic based on group and variables.
    - I would like to store that value from TOTAL AMOUNT and pass it to the stored procedure parameter IN.
    Any helps are much appreciated. Thanks.

    I doubt that this is possible since it would only calculate this value once the report has data.  This sounds more like a report design question that should be asked over [here|SAP Crystal Reports;

  • How sum values on crystal report?

    hi,
    i want sum same values on my report for example
    for display like this
    page 1
    hi1 = 100
    hi2 = 150
    hi3 = 300
    hi1 = 100
    hi2 = 150
    hi3 = 300
    hi1 = 100
    total of page=1200
    page2 & final page
    hi2 = 150
    hi3 = 300
    hi1 = 100
    hi2 = 150
    hi3 = 300
    total of all = 2200
    i have tryed this:
    sum({total.count})
    but i have the total of values in first page the solution is using this line
    if PageNumber<>TotalPageCount then
    but even using this i get the total of values on first page 
    how can i do that?
    anyone?
    thanks a lot for your help

    You should be able to just drag your running total to the page footer to get it to display for each page.

  • Passing Value from Crystal Report (special function) to Business View parameter

    Friends,
                 Í have a scenario where i need to pass value from Crystal Report to a Business view's parameter.
    Eg : CurrentCEUsername (func in crystal report)-- gives login user  which i should pass to parameter in a Business view (used in the same report).
    Will be able to explain more if required.
    Thanks in Advance,
    Bharath

    I guess you got the picture wrong.  User_id is not a report_level parameter .
    In Data Foundation, below query is used..
    select Acc_Number, Account_Group,User_id  from Accounts where user_id={?User_id}
    where in {?User_id}  is the BV parameter...
    The Filter was a solution. But it takes long time to Query all the data from DB and then filter at BV level.
    How do i pass the CurrentCEUsername to {?User_id}
    Value should ve CurrentCEusername always. so that query will be
    select Acc_Number, Account_Group,User_id  from Accounts where user_id=CurrentCEusername
    It will restrict the data pulled from DB to BV .. right?

  • How to assign a variable value to crystal report viewer formula with CR2008

    Hi ,
    I am using crystal reports 2008 and i am not able to find how to assign  variable value  to crystal report viewer formula.
    In CR 8.5 , i used to have crystalreport1.Formulas(0) = variable1
                                             crystalreport1.Formulas(1) = variable2
    but, i don't find similar kind  in crystal reports 2008.
    How can i achieve the same functionality using crystal reports 2008.
    Thanks in Advance
    Regards,
    Ramnath

    Hi,
    Can i anyone help me out with this.
    I am generating crystal reports in vb6 using CR 8.5 and vb6 and below is the code snippet for the same
    CrystalReport1.Formulas(0) = "PrintTitle= '" & strMyTitle & "'"
    CrystalReport1.Formulas(1) = "FromDate= '" & MskFromDate.Text & "'"
    CrystalReport1.Formulas(2) = "ToDate= '" & MskToDate.Text & "'"
    Please let me know how the same functionality can be achieved in VB.Net using Crsytal reports 2008
    Any code snippet would be of great Help.
    Thanks in Adnvance.
    Ramnath

  • Range Value in Crystal Report

    Hello Experts,
    I want to include a range value in crystal report. Currently the report is used for printing AR invoice with one invoice at time, wherein user inputs invoice number which he wants to print. I want to include invoice number range in the report, but that option is disabled in the parameter field. In present report Invoice number is taken as static value and then connected to db to get the data of that AR invoice number, advise how to
    - Activate "Allow Range Value option"
    - How to set up the multiple invoice printing
    Setup details : SBO 2007B, CR 2008, SQL 2005
    Regards
    Deepak

    Hi Deepak........
    Sure........
    Hope your query report is perfect and for Parameter Range goto Report Expert in Tool Bar of the Crystal Report you can find it by yellow coloured Flask Symbol. Click on that and just define the range of parameters........
    Regards,
    Rahul

  • Suppressing NuLL values in Crystal Report

    Hi....
    I m facing a problem,i use asp.net and  I have designed a Crystal Report.I had to place Text Objects in the the details section along with the corresponding Records from Database as per the Reports Design needed. Now i want that the NULL values in the report should be suppressed and should be disappeared  along with the static Text Objects. Like as it happens in Grid view in ASP .net
    Please Help me to solve this issue..
    Thank you

    I think i have been able to do it with little compliated suppress logic.
    When i design the report this is how it looks in design mode:
    Line1  Field1
    Line2  Field2
    Line3  Field3
    and when Field 2 is null or contains a blank string the output should look like:
    Line1  Field1
    Line3  Field3
    1. Initially just design the text fields and db fields without any suppress.
    2. Check Suppress for Line 2 and use the formula: isnull({Table.Field2}) . Do nothing to Field2. This should suppress Line2 when Field2 is null, you can also add StrCmp({Table.Field2}, "") = 0 for checking blank strings.
    3. Now copy Object Line3 and Field3 and place on top of Line2 and Field2 respectively so that their positions match. Let these newly copied objects be Line3_1 and Field3_1 respectively.
    4. Line3_1 and Field3_1 should be suppressed if Field2 contains a non null value. So for both of them Click Suppress checkbox and add the following in the format formula editor not isnull({Table.Field2})
    5. If Line3_1 and Field3_1 are visible = Field2 is null\empty -> Line3 and Field3 should be suppressed or the output would be like:
    Line1 Field1
    Line3 Field3
    Line3 Field3
    So to remove the duplicate:
    For both of them Click Suppress checkbox and add the following in the format formula editor isnull({Table.Field2})
    Hope this helps. I will see if I can attach a sample report based on xtreme here.

  • Freed goods item too in Value in crystal report

    Hi,
    iam invoicing SAP out put in Crystal format, now i required the free goods item  too in value( only in crystal report).
    Pls throw some light on this issue.
    Regards
    Shafique

    you need to total the pricing good and free goods? correct
    you should use manual running totals to calculate the values
    RESET               whileprintingrecords;
                   Numbervar  X := 0;
    CALCULATION          whileprintingrecords;
                   Numbervar  X := x + ;
    DISPLAY               whileprintingrecords;
                   Numbervar  X;
                   X
    im sure you have a group by invoice number in there.
    you will need to create 1 set of the above formulas for each total. (1 pricing, 1 free)
    reset placed in group header or report header dependent on where you want the values displayed
    calculation placed where it should be calc, details usually unless you have a group by goods
    display where you want the values to display in the report.
    the calculation formula may need to use a formula to capture good type

  • Null Value in Crystal reports

    Dear all,
    I have a SQL report created in SAP, which has "where " condition to only show records having null in a field.
    i.e.
    Select  Field1, Field2, Field3
    from T0
    where Field1 is null
    The query works fine in SAP and SQL server management studio.
    I am trying to create the report in Crystal reporter, but the syntax of Null is not accepted.
    I have tested that
    Field1=""
    Isnull(Field1)=True
    Isempty(Field1)=True
    Those records with no value in the field just didn't display ...
    What is the right Syntax to use?
    Many thanks
    Yang

    Hi Gordon and Mark,
    Thank you for both of your suggestions.
    At the end, I found out that "convert Null to default" had been ticked in report options. I unticked it, and isnull() condition worked.
    But I was surprised that with the option ticked the conditions of "equal to 0/""/" " "all didn't work ...
    Many thanks
    Yang

  • How to set Default DateTime values in Crystal Reports 2008

    Hi All,
    I'm using Crystal Reports 2008. I have two fields FromDate and ToDate in reports. While running report, FromDate field should be displayed with CurrentDate + 00:00:00 in the UI and for ToDate it should be displayed with CurrentDate + 23:59:59 format.
    I have tried the below things, But still I want to set CurrentDate + 00:00:00 time in DateTime field.
    "In CR 2008 you would set the time portion to 00:00:00 in this way:
    1) Edit the date/time parameter and look for the 'Default Value' option; it would be blank
    2) Set this to 00:00:00
    This would default the calendar to 12/30/1899 00:00:00. The only worry here is, when you click on the calendar icon you would be presented with the calendar for the year 1899 and it is painstaking to scroll all the way to the current year."
    I found one solution in SAP forum and I have added the below lines in Record Selection formula,
    {@FromDate} = date(@CurrentDate)+time(00,00,00)
    {@ToDate} = date(@CurrentDate)+time(23,59,59)
    When I run the report, I still getting the empty values in the input parameters screen.
    Am I missing anything? Kindly help
    Thanks,
    Ramesh Kumar G.

    See the following for samples:
    Java (Crystal Reports for Eclipse) SDK - Business Intelligence (BusinessObjects) - SCN Wiki
    BusinessObjects Enterprise / SAP BusinessObjects Business Intelligence Platform 4.x Java SDK Applications
    Business Objects / BI Unmanaged Java RAS SDK Sample Applications
    Developer Help Files:
    Crystal Reports SDK
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Getting only Blank Values in Crystal Reports

    Hello Experts,
    I have crystal Reports on top of R/3. I am using table called EKKO, When I dragged the LIFNR (Vendor Number) in the report, It's bringing only blank values, I checked in SAP and it has 7000 records.
    For testing I created report with only this EKKO table, but the same thing, it's bringing only 91(Blank) records, I don't have any conditions or anything in my report.
    We are using Business Objects XI3.1, Crystal Reports 2008.
    Could anyone please help me?
    Thanks
    Ravi

    Yes, I created crystal report with only EKKO table. I haven't used any conditions or any parameter, I just dragged LIFNR (vendor Number) in the report and I see only blank values. When I checked in SAP, I have around 8000 records out of 91 records are blank values. So It is bringing only blank values.
    Thanks,
    Ravi

  • Passing formula values to Crystal Reports from c#

    in an old vb 6 application we used to be able to call a function called PESetFomula in the Crystal Reports viewer and pass it the name of the parameter and the value.
    How do we do that now using Crystal Reports for VS 2013. I don't mean to set the criteria just to pass over parameters and values.
    Bill

    Hi Bill,
    Moving the thread to Crystal reports for Visual Studio Space.
    Using the .net SDK you could use the ReportDocument class to pass the parameter values to the report.
    See the sample applications here:
    http://scn.sap.com/docs/DOC-6929
    http://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports+for+.NET+SDK+Samples
    The developer guide and the API reference guide is here.
    http://scn.sap.com/docs/DOC-7824
    - Bhushan
    Senior Engineer
    SAP Active Global Support
    Follow us on Twitter
    Got Enhancement ideas? Try the SAP Idea Place
    Getting started and moving ahead with Crystal Reports .NET applications.

  • Sum the sum of fields in crystal report

    In crystal report 2008, i have rows of data grouped by document number. Sum of each document (RTotal1) display at Group Footer.
    At the Report Footer level, I want to display the Grand Total. In formula workshop, I tried to add a formula to sum RTotal1 above. However, error message indicated 'this field cannot be summarized'.
    Second try: In Running Total Fields, I tried to add RTotal1 above to the field but error message indicated 'invalid field selection'. Any idea what's the proper way to sum the sum of fields?

    You need to use a variable, create 3 formula
    @reset
    whileprintingrecords;
    global numbervar GTotal:=0;
    //place this in report header, or higher grou header as appropriate
    @Eval
    whileprintingrecords;
    global numbervar GTotal:=GTotal + Sum( valuefield, groupfield);
    // place this in group footer where your sum shows
    @display
    whileprintingrecords;
    global numbervar GTotal;
    //Place this in report or higher group footer
    Ian

  • Pass querystring parameter value to crystal report

    Post Author: hani1426
    CA Forum: .NET
    Hi all,
    I am new in using crystal reports
    I want to print an invoice with it's items in a crystal report,I have aseparated page which contains a GridView of invoices and it has a hyperlink field column which parse the ID of the invoice to the page of the crystal report
    In my crystal report I am using "Microsoft OLE DB Provider for SQL Server" Connection which connects to my local instance of SQL server express edition and then add a "command" to obtain the invoice details
    BUT: when adding a parameter to my command it gives an error which description is: "Must declare the scalar variable @ID"
    please how can I add this parameter
    thanks for any help
    bye

    I responded to your other thread:
    pass parameters from vb.net to crystal report
    Please do not cross post. See the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]
    Closing and locking this thread.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Need to sum max values in a report with Hidden groupings

    I have looked all over and have not found my exact situation, so I am posting my first question.  I have a report that I have grouped on multiple levels.  So my report has a customer/header/detail/release grouping.  I have written a custom
    expression so that only a single value, which is the max value in the group, is shown in the detail, with all values showing in the release.  I have then set my visibility toggle to toggle on header, then detail, then release and I need to sum up those
    max values into a field on the report.  The custom expression that I have written works correctly when you are showing on the detail level.  It gives the correct value, which is the max value in each release.
    What I then need the report to do is to sum only that max value and roll that up into the header group, so that I get a total of the max values.  
    I have tried using the MAX function in my expression to get the correct max value, but I cannot get SSRS 2008 R2 to sum that, and I have tried writing a custom expression that will calculate the max (Non-zero values divided by number of non-zero records) and
    both ways work correctly until I try to rollup and sum to the next group level.
    I have also tried using a group variable and custom code to get the value and save it to a variable, but I have not had any luck in setting or getting that value correctly back to my report.
    At its most basic it feels like I should be able to set a Sum(Max(Fields!ValueColumn.Value) and let SSRS handle how that should be broken out, but after trying that repeatedly I have still had no luck.  I cannot adjust the SQL as I need the level of detail
    that the report shows, although I could add more fields as long as I don't add any groupings or totals that would reduce the granularity of that data being returned.
    Any new avenue to explore would be very helpful.
    Thank you in advance,
    Chad
     

    Ok, after continuing to search the internet I finally found the extra piece that I was missing that gave me the results I needed. The new expression looks like this:
    =runningvalue(Sum(Max(IIF(LEFT(Fields!JobNum.Value,1)="S" AND Fields!Week1STol.Value<>0, CDBL(Fields!Week1STol.Value), 0),"JobItem"),"JobItem"),SUM, "JobItem")
    In this I wrapped the original expression of Max in both a Sum and a runningvalue both at the JobItem level to get this rollup value. Now when I open the grouping I get the correct running value at each level.
    What this really gives to me is a running total at each of four groupings, even with a "max" value at the detail level. This also allows me to total a max value inline on the report, without needing a hidden row, or report footer.
    Thank you to everyone who looked at this, I hope it helps someone else. If this answer is not clear enough, please don't hesitate to add to the comments and I will try to clarify.
    Thank you, Chad

Maybe you are looking for

  • Apache fop classloading problem in EAR file

    HI, I am deploying a big EAR in WL 6.1 on solaris and I am bundling FOP 1.20.3 within it, I am also including avalon 4.0 and logkit 1.0 jars within it as they are needed by fop.jar. Whenever I try to construct a "Driver()" class I get a NoClassDefFou

  • F.05 Foreign Currency Valuation

    Hi, My user had problem when run F.05, Foreign Currency Valuation.  It was mentioned that no batch input data for screen SAPMF05A 0700 but it was noted that some transaction had taken place & posted. As not all the transaction had been posted success

  • Digital Audio Outs not mentioned in manual.

    I have a Pavillion p6140f PC. Below the monitor connector, above the mouse and keyboard inputs are "Digital Audio Out" RCA jacks. My manual doesn't mention these, whatsoever. I tried plugging them into my Yamaha mixer inputs with no success. Is there

  • What are all scenarios we will open the database in open resetlog mode

    what are all scenarios we will open the database in open resetlog mode..please advise

  • Crystal Reports 2008 - ERROR when changing datasource

    Hi, I have a report that is connected to a test database that needs to have the datasource changed to the production database. The Crystal Report has 2 "on-demand" subreports that the datasource has been changed for as well. SQL 2000 Databases on 2 d