Concatinating Field value in Crystal report

hi all,
if we have four fields in report like
ItemCode        Item Name     Color     Thickness
111                 Abc               Green      1
111                 Abc               Gray        1
111                 Abc               Pink        1
three fields itemcode,itemname and thickness are having same values but value in color filed is not same that why returning 3 rows.
But I want to show the result in One row as
ItemCode  Item Name  Color                                  Thickness
111           Abc           Green,Gray,Pink                              1
How I can Do this.
Please Help Its Urgent
Thanks
Neetu

Group on Item Code and then create a string running total incuding a separator for the color in the details section and a display formula in the Group Footer to display the running total results. If there is going to be more than 1 Item Code in the report then you will need to create a formula to reset the running total value.
For example;
String Running Total in the details section;
WhilePrintingRecords;
stringvar clr:= clr + {color field} + ',';
mid(clr,length(clr)-1)
The last line will get rid of the comma separator at the end of the string.
Display Formula in the Group Footer;
WhilePrintingRecords;
stringvar clr;
{Item Code} + ' ' + {Item Name} + ' '+ clr + ' ' +
Reset Formula in the Group Header;
WhilePrintingRecords;
stringvar clr:= ''
Edited by: Graham Cunningham on Aug 1, 2008 7:48 AM

Similar Messages

  • Passing a table-field value in Crystal to a Store Procedure in SQL Server

    I have been checking all over the interenet via searches and although some seem to come close to this, its still not what I want.
    Essentially I need to pass value from Table-Field record (for each record read/selected) via a paramete to a Stored Procedure(SP) in SQL Server 2205/2008.  I do NOT want to be prompted for a value for this parameter each time the report is run, simple pass the value in which will be used along with other select criteria to bring back one value for the report to use in a calcuation per record.
    The value of the parameter is a date, but I understand it would be better to pass it in as a varchar(8) - 'YYYYMMDD' - and then reconvert it inside the SP, as follows:
    In Crystal Reports 2008 SP3, I have a formula defined as,
    trans_date = ToText ({F1ARS_STMT_WS_TRAN.TRANS_DATEI}, 'YYYYMMDD')
    and essential just want to pass this to the SP below ... i.e. trans_date  ---> @strTransDate
    I then link the key fields [EXCH_RATE_TABLE_NAME] and [TRANS_CCY_CODE] to other tables in the Database Expert, and put [EXCH_RATE_AMT] on the report and use it to calculate what I want.
    This works fine when the prompt comes up and I put in a proper date, but I don't what it to prompt, but simple pass the F1ARS_STMT_WS_TRAN.TRANS_DATEI in via the fornula/parameter and let teh SQL do the rest for each record selected..
    CREATE PROCEDURE [dbo].sp_GET_EXCH_RATE_AMT (@strTransDate varchar(8))     --use format 'YYYYMMDD' to represent the date as a string.
         -- Add the parameters for the stored procedure here
         -- @TransDate datetime = now
    AS
           declare @TransDate datetime
         set @TransDate = CONVERT(DATETIME, @strTransDate, 112)
    BEGIN
         -- SET NOCOUNT ON added to prevent extra result sets from
         -- interfering with SELECT statements.
         SET NOCOUNT ON;
        -- Insert statements for procedure here
    SELECT [EXCH_RATE_TABLE_NAME], [TRANS_CCY_CODE], [EXCH_RATE_AMT]
    FROM [F1CCY_EXCH_RATE]
    WHERE [MAJOR_CCY_CODE] = 'BBD'
    AND   [START_DATEI] =
         SELECT MAX([START_DATEI])
         FROM [F1CCY_EXCH_RATE]
         WHERE [MAJOR_CCY_CODE] = 'BBD'
         AND   [START_DATEI] <= @TransDate
    END
    GO
    GRANT EXECUTE ON sp_GET_EXCH_RATE_AMT TO PUBLIC
    GO
    Thanks for any help.  Can't tell the headache this has caused my both literally and figuratively.

    Hello,
    I moved your post to the Report Design forum. Lots of SQL help in here...
    I believe the problem is due to you using a Parameterized Stored Procedure. The first thing CR has to do is connect to your DB source which requires the date parameter before it can run the query to add the date filter, it's the SP that is prompting for the parameter. Therefore the report has not run so it can't get the field value from the report until you fill in the info for the SP. Catch 22 problem.... Which came first, the Chicken or the Parameter....
    The report will work as you have noted but I don't know of anyway to refresh unless parameter is filled in again....
    Jason has a lot of great solutions when it comes to these dilemmas, Possibly using a Command Object may help but I believe you will still run into the same issue....
    Only way I can think of is to not use a parameter in the SP and let CR do the filtering client side. Of course this means all data is coming back to the client PC as you are likely trying to find a work around for.
    Thank you
    Don

  • 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

  • Tool Tip Text for field values in ALV report

    Hi,
    How to get the tool tip text for the field values in ALV report.
    Thanks & Regards,
    Pallavi.

    Hi,
    In fieldcatalog specify the TOOLTIP.
    <b>
    LVC_S_FCAT-TOOLTIP
    </b>
    In this speicfyteh tooltip you want.
    Then append this to the fieldcatalog.
    Hope this solves ur problem.

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

  • Hiding a data field in SAP Crystal Reports 2011

    Hello,
    I am new to SAP Crystal Reports 2011 (Crystal Reports).
    Does any one know how to hide a Special Field in a Crystal Report?
    Specifically, I am trying to hide the Special Field, 'Record Number'  from displaying on my report.
    I need the Special Field, 'Record Number' to know how many records was printed on my report
    in order to limit the amount of records printed while I am testing this new report.
    Thanks for the help!
    Tony

    Hi Tony,
    Yes to hide specific field, follow abhilash suggestion..
    1. Limit the number of records displayed on your report like that:
    section expert -> particular your report section -> click on suppress -> write below formula
    RecordNumber > Limited number of records count..
    2. limit the number of records  per page on your report follow below link:
    How to limit the no of records per page in crystal reports 2008
    Thanks,
    DJ

  • How to use the distinct key in formula field in SAP Crystal Reports

    I want to use the distinct key in formula field in SAP Crystal reports.
    When i'm using it shows an error.
    Please suggest me....

    Hi,
    Use DistinctCount keyword directly for your calculation instead of count(distinct(....
    Alternatively, if you want to avoid duplicate records, under "File" > "Report Options" make the 'Select Distinct Records' as True.
    Thanks,
    Raghavendra

  • How can we read the screen field values from the report selection screen wi

    Hi expart,
    How can we read the screen field values from the report selection screen with out having an ENTER button pressed  .
    Regards
    Razz

    use this code...
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
    **Read the Values of the SCREEN FIELDs
    CALL FUNCTION 'DYNP_VALUES_READ'

  • 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

  • Hiding the Selected field in the Crystal reports 2011

    Hi Experts,
              I am new to the Crystal reports. How to hide the Selected Field in the Crystal report 2011.
    Thanks,
    Kavya.C

    Hi Kavya,
    You can right click on the field, go to Format Field -> Common Tab. Select/Check the option "Suppress". Or if you want to hide/ Suppress the entire section in a Crystal Report, for e.g. Detail section, right click on Details Section and select Section expert. You can select Hide/Supress accordinly.
    That should hide the filed/Section when you run the report.
    - Kuldeep

  • Passing value to paramater field in the crystal report

    Hai,
    I have done the following thing.
    1. Created SBO screen using screen painter.
    2. Added one text box, button in the screen painter.
    3. Created one Windows screen and attached Crystal report viewer.
    4. As soon as the button clicked in the SBO screen i am able to open the crystal report.
    But now i need values which i have typed in the text box should be passed to the crystal report. how this can be done . I have attached the code please let me know where is the error. I have also created paramater filed in the crystal report name "From_dt".
    As soon as the screen opened from SBO. It is asking for discreate value. But i have already passed the value from the SBO. I need to pass the value dyanamical from SBO screen.
              Dim oRpt As New Myreport
                            Dim myTable As CrystalDecisions.CrystalReports.Engine.Table
                            Dim oLI As New CrystalDecisions.Shared.TableLogOnInfo
                            For Each myTable In oRpt.Database.Tables
                                oLI = myTable.LogOnInfo
                                oLI.ConnectionInfo.Password = "sapb1@sql"
                                oLI.ConnectionInfo.UserID = "sa"
                                myTable.ApplyLogOnInfo(oLI)
                            Next
                            Dim Crviewer As New Frm_rptwaste
                            Crviewer.CrystalReportViewer1.ReportSource = oRpt
                            Dim ParameterField1 As New CrystalDecisions.Shared.ParameterField
                            Dim ParamterFields As New CrystalDecisions.Shared.ParameterFields
                            Dim ParamterDescreteValue1 As New CrystalDecisions.Shared.ParameterDiscreteValue
                            ParameterField1.ParameterFieldName = "From_dt"
                            ParamterDescreteValue1.Value = txtcode.Value
                            ParameterField1.CurrentValues.Add(ParamterDescreteValue1)
                            ParamterFields.Add(ParameterField1)
                            Crviewer.CrystalReportViewer1.ParameterFieldInfo = ParamterFields
                            Crviewer.CrystalReportViewer1.RefreshReport()
                            Crviewer.ShowDialog()

    Hi Suresh,
        Instead of Parameter, you try Formula field and assign desired value to formula.
    HTH
    B Ravi Shankar

  • 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

  • Get the parameter fields defined in crystal report

    I am porting my application from crystal 8.5 written in C++ to crystal 2008 in .net.
    Here I am not making use of crystal report viewer neither I am creating .rpt in .net code.
    I have a set of already created .rpt files.
    I have written a function in .net to export the crystal report.
    Its a generic function and will be called for multiple crystal reports.
    I am passing the parameter values to the report by making use of the following function :
         ReportDocument repDoc;
         repDoc.SetParameterValue(APPTYPE, strNextToken[0]);
         repDoc.SetParameterValue(COMPORROLETYPE, strNextToken[1]);
    Similarly I are setting other parameter values.
    The problem here is that, all the reports do not have parameter fields defined that I am trying to set.
    They may be present for one report and absent for another. In this case , if the report does not have a particular parameter
    field, then it gives error on setting parameters and subsequently fails.
    Now I want to find out through code what all parameter fields are defined in the report. Then I will only set those
    parameter fields?
    Please guide how can this be done.
    Thanks
    Sonam

    Not as trivial as you might think. You will have to loop through all the sections of the report looking for the objects you need. I don't have a code specific to parameters, but looping through al the sections would be something like the code below. But... this will only show you parameters in a section. It will not show you parameters used in a formula, record selection formula, group selection formula, text field or a conditional formula. In order to get those parameters, you's have to parse out each of those objects looking for parameters. And this is probably not an exhaustive list of places to look for a parameter in the report.  I get a headache just thinking about this...
    Dim crSections As Sections
    Dim crSection As Section
    Dim crSubreportObject As SubreportObject
    'set the crSections object to the current report's sections
    crSections = crReportDocument.ReportDefinition.Sections
    'loop through all the sections to find all the report objects
    For Each crSection In crSections
    crReportObjects = crSection.ReportObjects
    'loop through all the report objects to find all the subreports
    For Each crReportObject In crReportObjects
    If crReportObject.Kind = ReportObjectKind.SubreportObject Then
    'you will need to typecast the reportobject to a subreport
    'object once you find it (***you'd go to setting the parameter here - or not...)
    crSubreportObject = CType(crReportObject, SubreportObject)
    'open the subreport object
    crSubreportDocument = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)
    'set the database and tables objects to work with the subreport
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • 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

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

Maybe you are looking for

  • Help with getting GB to recognise Yamaha NP30 via Tascam US-122MKII?

    I am using a midi OUT connection from my Yamaha NP30 keyboard to the midi IN of a Tascam US-122mkII interface. The Tascam is connected to my Mac via USB (port 1). Tascam software is installed correctly. When I open GB and select 'Piano' in 'New Proje

  • New Infinity Connection Slow and Keeps Dropping ou...

    Hi all, I had Infinity installed on Friday and am not 100% sure on the time it takes to become stable. Basically I checked my hub page yesterday and found it had dropped out at 3am Sat morn, today I have checked again and it dropped out at 8am Sun mo

  • Mouse position outside of the top-most container

    I know how to acquire the position of the mouse through either the MouseListener or MouseMotionListener interfaces by calling the getX() and getY() of the MouseEvent class. But if the mouse is moved outside of the top-most container, eg. a JFrame, th

  • An error occurred while attempting to communicate with the AirPort Express

    I have an Airport Base Station (ABS) and 2 Airport Express (AES) units spread through my apartment connected in a WDS network. The ABS was using version 5.5.1 and the Express units were using 6.1.1 because I had read these versions had less problems

  • Saving iTunes Music Before Reinstall

    I am unable to launch iTunes - receive same message others have reported . . . that iTunes has encountered a problem and needs to close, sorry for the inconvenience. Window sometimes refers to iTunes Helper Module but message is the same - has to clo