Crystal report: How to concatenate the string whilereadingrecords?

I have description field in the database and I need to concatenate the value of the filed into one line. How to do that? I tried as below
Stringvar strtitle="";
whilereadingrecords;
if Mid({OrderDtl.PartNum},1,2)="T3" Then
strtitle & "T3- Background Music,"
Else if Mid({OrderDtl.PartNum},1,2)="T6" then
strtitle & "T6- Dance"
This is not working and showing only last value instead of concatenated string. I am very new to Crystal report and i am using Crystal report 2008
Thanks,
Raj

Hi Raj,
I guess you're trying to concatenate the descriptions so that they appear on a single line, perhaps, on the report footer?
Try this formula:
whilereadingrecords;
stringvar strtitle;
strtitle := strtitle + ">" + {description_field_from_database}
The ">" sign is to separate the records from each other; you may choose to remove this from the formula or use another separator.
Place the above formula in the details section and suppress the section.
Create this formula to display the result and place it in the Report Footer section:
evaluateafter(@Name_of_the_above_formula);
stringvar strtitle;
Let me know how this goes!
-Abhilash

Similar Messages

  • Crystal Report: How to make the fixed height box in all pages.

    Post Author: WTech
    CA Forum: Crystal Reports
    I want to make the height of box fixed size in all pages. The box in outside the detail section. Currently the size of the box changes according to the content of the detail section. Could anyone suggest me how should i achieve it ?  

    Hi srinivasan,
    If you want to keep "Save" and "Stop" common, Why do you want to keep them on Tab control? Is your tab control taking entire space on Front panel? If so, you can have SAVE and STOP on other vi, and you can call this vi (MODAL).
    Gaurav k
    CLD Certified !!!!!
    Do not forget to Mark solution and to give Kudo if problem is solved.

  • How to concatenate a string with single quotes

    Hi all,
        how to concatenate a string with single quotes to a variable.
    Sathya

    Hi sathyabama,
    1. simple
    2. use TILDE character <b>(`)</b>
       (just left to the '1' key)
    <b> `'mystring'`</b>
    3. just copy paste
    report abc.
    data : m(100) type c.
    concatenate `'amit mittal'` 'hello' into m separated  by space.
    write m.
    regards,
    amit m.

  • Hyperlink on Crystal Report: how to popup a window without menubar?

    Hyperlink on Crystal Report: how to popup a window without menubar?
    Hello Experts!
    I'm using VS2003 with Crystal Reports for VS2003.
    I need to show a popup window clicking a hyperlink text object on my crystal report.
    On the CrystalReportViewer I have set up HyperlinkTarget=_blank, and it's working fine.
    But when I click on the hyperlink and shows the popup window, how can I show the popup window without menubar, toolbar, directories, etc.
    Something like:
    window.open('../MyPage.html?id=id001" + Cad + "',null,'menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=yes,status=yes')

    Adam is correct. The closest you can get is setting the CrystalReportViewers HyperlinkTarget to _blank. It was seen as a potential security vulnerability to allow you to run scripts from a Crystal Reports. In our Enterprise product you can use a reg key called EncodeHTMLForSingleLineFieldObjects to control whether this can be turned on or off.
    Unfortunately this was never ported over to our .NET CrystalReportViewer.
    This is referenced in notes 1202803, 1219298, and 1219301.
    https://www.sdn.sap.com/irj/sdn/businessobjects-notes
    Edited by: David Hilton on Jul 16, 2008 4:17 PM

  • Crystal report from JSP using the JRC

    Hi, I am trying to call crystal report from JSP using the JRC.
    But i am getting the Error as 'Logon Failed'. my web.xml entry is
    <env-entry>
    <env-entry-name>jdbc/Test</env-entry-name>
    <env-entry-value>!oracle.jdbc.driver.OracleDriver!jdbc:oracle:thin:{userid}/{password}@//10.0.0.1:1521/TestDB</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    i am setting the userid and password in the code. Please see the below code for your reference. Please help me to solve the issue.
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@ page import="com.crystaldecisions.report.web.viewer.CrystalReportViewer"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
    <%@ page import="com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSourceFactory2" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSource" %>
    <%@ page import="com.crystaldecisions.reports.reportengineinterface.JPEReportSource" %>
    <html>
    <head>
    <title>Crystal Report with Database Logon information</title> </head>
    <body bgcolor="#ffffff">
    <%
    try
    String report = "/TEMPLATE.rpt";
    IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
    JPEReportSource reportSource = (JPEReportSource) rptSrcFactory.createReportSource(report, request.getLocale());
    CrystalReportViewer viewer = new CrystalReportViewer();
    viewer.setReportSource(reportSource);
    viewer.setHasRefreshButton(true);
    IConnectionInfo newConnInfo = new ConnectionInfo();
    newConnInfo.setUserName("TEST");
    newConnInfo.setPassword("TEST");
    ConnectionInfos newConnInfos = new ConnectionInfos();
    newConnInfos.add(newConnInfo);
    viewer.setDatabaseLogonInfos(newConnInfos);
    viewer.setEnableLogonPrompt(false);
    viewer.setOwnPage(true);
    viewer.setOwnForm(true);
    out.println("Connection Information: "+viewer.getDatabaseLogonInfos().getConnectionInfo(0).getAttributes().toString());
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(),null);
    viewer.dispose();
    catch(Exception e)
    throw new JspException( e);
    %>
    </body>
    </html>

    I never really had much luck with this approach.
    Mind you I was using Crystal Reports 10, and as far as I recall it didn't allow setting/changing of database at this level.
    Things to check
    - can you create a database connection on your page with this URL/username/password?
    - what server are you using? Tomcat? WebLogic?
    I found this in your other post:
    Connection Information: {Server Name=ee6rpt, Connection String=DSN=s(ee6rpt);User ID=s(ee62test);Password=;UseDSNProperties=b(false), Database Name=, Database DLL=crdb_odbc.dll}That would indicate it is using odbc to connect to the database (crdb_odbc.dll). ODBC is a bad idea with java.
    The way I have got it to work for me (after much trial and error) was to in Crystal Reports to connect using the Oracle Driver, and specifying a tnsname - eg define REPORT_DS in tnsnames.ora.
    When running through the JRC, it looked for a JNDI datasource under that same name "REPORT_DS".
    Don't know if that will help you or not.
    Good luck,
    evnafets

  • Crystal report not showing all the table in SAP CRM

    Hi
    I am connecting crystal report 2008  using open sql connectivity (SAP table, cluster or Function ) with SAP CRM system. It is showing some of custom tables under "DD" but not all.
    Wanted to understand what setting make a new custom table (transparent) to show under DD in SAP table, cluster or function connection
    Help is greatly appreciated
    Thanks
    Padmanabh

    Hi Rao,
    Try to edit the following registry and check
    HKEY_CURRENT_USER\Software\Business Objects\Suite 12.0\Crystal Reports\FetchOptions\NTablesMax
    Give the value as 20000
    Thanks,
    Sastry

  • Vista/Adobe 9/sql image Error in Crystal Report:Failed to Export the Report

    When I try to export my Crystal Report (v2008) from a Vista machine (using Crystal RDC export methods) as a PDF, I get the following error:
    Error in Crystal Report:  Failed to export the report.
    This only happens when a particular subreport (that contains a sql image) prints (based on an input parameter).  We have other subreports (within this same report) that print a sql image just fine.  But, when this subreport prints, the above error appears.
    I can run the same report on an XP machine without error.
    Exportmodeller.dll and crtsv.dll are both installed and registered to the
    C:\Program Files\Common Files\Business Objects\3.0\bin folder
    I have tried opening the report, removing the image, and then adding it back in again to the subreport.
    Still receive the same error.
    Any suggestions?

    >
    Don Williams wrote:
    > RDC is no longer shipped in CR 2008. You are using the embedded designer used within the Visual Studio .NET IDE and is not licensed for distribution.
    >
    > Upgrade to the .NET components and post your question to the .NET forums.
    >
    > Also, those old dll's will not work in CR 2008. Last patches will give you the option to export to Excel in Legacy mode. We built it into our export dll.
    Don,
    Can you please clarify?
    Our VB6 app that uses Crystal XI RDC runtime components.  Our Crystal reports are edited in CR2008 SP1 developer edition (not through the VB.NET embedded report designer).  We have deployed the CRXIRelease 2 runtime components (via the merge module) to our client machines in order to execute the RDC.
    We can print/preview/export to excel, but the pdf creation is failing with this error.
    We are only using the RDC (which we know is no longer supported) because of huge issues with the Crystal for .NET methods we are having with our customers (I have an active case for this issue).  Therefore, we have to rollback our .NET product and revert to the RDC code. 
    Vista is failing to create a PDF for a report developed in the CR2008 SP1 developer edition when using the RDC.
    When you say  "Also, those old dll's will not work in CR 2008. Last patches will give you the option to export to Excel in Legacy mode. We built it into our export dll.", what do you mean by "will not work in CR2008"?
    Thank you

  • How to capture the string values

    Hi Gurus,
    Could you plz suggest me how to capture the string value.
    My requirement is.
    I have a structure field called  cnj_stat-sttxt_int and it is storing a value like "REL CDRT AVAC". AND the moddile value CDRT will change according to condtions. now i required to write a logic like if cnj_stat-sttxt_int field contain 'REL' and 'AVAC'.  I HAVE TO THROW SOME ERROR.
    SO please give some idea about on it...
    Its urgent..
    points will be rewarded...
    Thanks in advance!!!!
    Thanks & regards,
    Kranthi.

    if cnj_stat-sttxt_int field contain 'REL' and 'AVAC'. I HAVE TO THROW SOME ERROR.
    if cnj_stat-sttxt_int CS 'REL' and cnj_stat-sttxt_int CS 'AVAC'.
    THROW SOME ERROR.
    endif.

  • How to split the string by datetime in sql

    Hi,
    How to split the string by datetime in sql, I've a table with comments column stores comments by datetime, while selecting I want to split and show as in rows by each jobref.
    can anyone help me in this please.
    Thanks,

    declare @callcentre table (comments varchar(max),lbiref varchar(200))
    insert into @callcentre
    select '(28/10/2014 14:56:14) xyz ..... call  logged   (28/10/2014 14:56:58) xyz ..... call updated   (28/10/2014 14:57:41)xyz ..... call updated','Vi2910201'
    insert into @callcentre
    select '(29/10/2014 14:56:14) xyz ..... call  logged   (29/10/2014 14:56:58) xyz ..... call updated   (29/10/2014 14:57:41)xyz ..... call updated','Vi2910202'
    insert into @callcentre
    select '(30/10/2014 14:56:14) xyz ..... call  logged   (30/10/2014 14:56:58) xyz ..... call updated  
    output:
    1) 28/10/2014 14:56:14, (28/10/2014 14:56:14) xyz ..... call  logged ,'Vi2910201'
     2) 28/10/2014 14:56:58 ,(28/10/2014 14:56:58) xyz ..... call updated ,'Vi2910201'
    3) 28/10/2014 14:57:41,  (28/10/2014 14:57:41)xyz ..... call updated,'Vi2910201'
    4) 28/10/2014 14:56:14, (28/10/2014 14:56:14) xyz ..... call  logged ,'Vi2910202'
     5) 28/10/2014 14:56:58 ,(28/10/2014 14:56:58) xyz ..... call updated ,'Vi2910202'
    6) 28/10/2014 14:57:41,  (28/10/2014 14:57:41)xyz ..... call updated,'Vi2910202'
    7) 28/10/2014 14:56:14, (28/10/2014 14:56:14) xyz ..... call  logged ,'Vi2910203'
     8) 28/10/2014 14:56:58 ,(28/10/2014 14:56:58) xyz ..... call updated ,'Vi2910203'
    Thanks,
    See this illustration
    declare @callcentre table (comments varchar(max),lbiref varchar(200))
    insert into @callcentre
    select '(28/10/2014 14:56:14) xyz ..... call logged (28/10/2014 14:56:58) xyz ..... call updated (28/10/2014 14:57:41)xyz ..... call updated','Vi2910201'
    insert into @callcentre
    select '(29/10/2014 14:56:14) xyz ..... call logged (29/10/2014 14:56:58) xyz ..... call updated (29/10/2014 14:57:41)xyz ..... call updated','Vi2910202'
    insert into @callcentre
    select '(30/10/2014 14:56:14) xyz ..... call logged (30/10/2014 14:56:58) xyz ..... call updated','Vi2910203'
    SELECT LEFT(p.u.value('.[1]','varchar(max)'),CHARINDEX(')',p.u.value('.[1]','varchar(max)'))-1) AS [Date],
    '(' + p.u.value('.[1]','varchar(max)') AS comments,
    lbiref
    FROM
    SELECT lbiref,CAST('<Root>' + STUFF(REPLACE(comments,'(','</Data><Data>'),1,7,'') + '</Data></Root>' AS XML) AS x
    FROM @callcentre c
    )t
    CROSS APPLY x.nodes('/Root/Data')p(u)
    and the output
    Date comments lbiref
    28/10/2014 14:56:14 (28/10/2014 14:56:14) xyz ..... call logged Vi2910201
    28/10/2014 14:56:58 (28/10/2014 14:56:58) xyz ..... call updated Vi2910201
    28/10/2014 14:57:41 (28/10/2014 14:57:41)xyz ..... call updated Vi2910201
    29/10/2014 14:56:14 (29/10/2014 14:56:14) xyz ..... call logged Vi2910202
    29/10/2014 14:56:58 (29/10/2014 14:56:58) xyz ..... call updated Vi2910202
    29/10/2014 14:57:41 (29/10/2014 14:57:41)xyz ..... call updated Vi2910202
    30/10/2014 14:56:14 (30/10/2014 14:56:14) xyz ..... call logged Vi2910203
    30/10/2014 14:56:58 (30/10/2014 14:56:58) xyz ..... call updated Vi2910203
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Crystal Report Formula for traversing the Hierarchy

    Hi Friends,
    I have a Hierarchy Node Variable in Query Designer and I use the same in my Crystal Report.
    I need to create a formula, which will traverse and find all of the child nodes of the selected Hierarchy Node (through the variable). Could you please let me know if this is possible and send me the code.
    Thanks in Advance!
    Regards,
    Vinaya Paulraj.

    Hi Vinaya
    In Crystal, under the 'Report' menu, there is an item called ''Hierarchical Grouping Options'. This item allows you to sort information based on the relationship between two fields.
    For example:
    The following example is based on using the sample database called Xtreme that ships with Crystal Reports and Xtreme's Employee table.
    There is an {Employee ID} field and {Reports to} field in the Employee table. These fields both contain an Employee ID number. There can be employees with employees that report to them. In other words, there can be employees that report to a higher level of management. You want to see the overall hierarchy of the employees. To do so, you would use the 'Hierarchical Grouping Option' in Crystal Reports.
    To view the employee hierarchy from the Employee table, complete the following:
    1. Create a group and group on {Employee ID}. You want to group on {Employee ID} because you want to see the overall hierarchy of employees.
    · From the 'Insert' menu, select 'Group'.
    · From the 'Insert Group' dialog box, select {Employee.Employee ID} in the first drop-down list.
    · Click 'OK'.
    2. Create a hierarchical group.
    · From the 'Report' menu, select 'Hierarchical Grouping Options'.
    · Select 'Sort Data Hierarchically'.
    · Select {Reports to} from the drop-down list for 'Parent ID'. In this example, the {Reports to} field is the parent field; therefore, we must select it in the 'Parent ID' field.
    3. Indenting the hierarchical group, you must enter a value between 0 and 4 inches.
    The 'Group Indent' setting only affects the display of the report. If you enter a value other than zero (0) the various levels of hierarchy will appear indented when the report is previewed. Thus making it easier to see the various groups of employees, managers, etc.
    For more information, search the online help for 'Grouping data hierarchically'.
    Regards
    Girish

  • How To Split the String for "."

    Hi Friends
    I am Using Following Code to Split one String.
    String str = "Jeetendra.choudhary";
    String[] sp_str = str.split(".");
    wdComponentApi.getMessageManager.reportSuccess(str[0]);
    wdComponentApi.getMessageManager.reportSuccess(str[1]);
    but its throwing null pointer exception. 
    when i am using following code its working fine.
    String str = "Jeetendra/choudhary";
    String[] sp_str = str.split("/");
    wdComponentApi.getMessageManager.reportSuccess(str[0]);
    wdComponentApi.getMessageManager.reportSuccess(str[1]);
    what may be the issue and how to split the string with "." ?
    Thanks & Regards
    Jeetendra

    "." is a special character.
    Use
    str.split("\\.");
    Regards
    Benjamin
    Edited by: Benjamin Hansen on Dec 29, 2009 7:52 AM

  • How to Splilit The String Into Single Column using Comma As Delimiter ?

    How to Splilit The String Into Single Column using Comma As Delimiter ?
    using Function

    refer my thread ,code is also available see if that helps you
    error while executing the sp ORA-21779: duration not active

  • Disable Crystal reports grey fields in the preview

    Dear forum users, I've got an application not written by me (so I do not have source code) that displays a Report in a standard Crystal Report Viewer. In the preview when I click on a field it gets rounded with a grey border, filled with a grey background.
    This is causing me some problems when I use the application via Remote Desktop Connection.
    Since I don't like this feature the question is: can I disable this feature (maybe by changing an entry in the Registry Editor)?
    Best regards
    Alessandro

    Hi Alessandro,
    I think maynot be. whats the screen resolution of your system? If you change it probably you can see that particular grey box clearly.
    or
    try to export that file to excel or pdf. probably you will see the file with you vagueness.
    Regards
    Usama

  • Need a Crystal Report formula to concatenate strings during reading records

    I have a report that takes partnumbers and cross references them with other partnumbers.
    I have this information in the details
    Partnumber   XRef                          I need this as the string
    A                  B                              B
    A                  C                              B,C
    A                  D                              B,C,D
    And then start the a new string when it gets to a new partnumber.  Does anyone know how to do this?
    Thanks
    siboyd

    Hi,
    please create a formula field named "MySharedVariableTestGroupHeader" with the following code:
    shared StringVar mySharedVar := "Start";
    Then create a second formula field named "MySharedVariableTestDetails" with the following code:
    shared StringVar mySharedVar;
    mySharedVar := mySharedVar + " Next ";
    Now create a thrid formula field named "MySharedVariableTestGroupFoot" with the following code:
    shared StringVar mySharedVar;
    mySharedVar;
    Insert the newly created formula fileds in your report as follows:
    MySharedVariableTestGroupHeader -> Group header section
    MySharedVariableTestDetails -> Details section
    MySharedVariableTestGroupFoot -> Group footer section
    Watch what is displayed in your group footer.
    I hope I am able to give you an idea about what you can do by using shared variables in Crystal Reports.
    Regards,
    Stratos

  • ISQL*PLUS dynamic reports - how to pass connect string in the URL

    When we run dynamic reports thru ISQL*PLUS, does anyone know how
    to pass the connect string info in the URL
    The following is the code from ISQL*PLUS users guide but it
    dosen't show how to pass the connect string
    when I tried to pass hr/your_secret_password@dbserver for userid
    I got an error msg
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    <HTML>
    <HEAD>
    <TITLE>iSQL*Plus Dynamic Report</TITLE>
    </HEAD>
    <BODY>
    <H1>iSQL*Plus Report</H1>
    <H2>Query by Employee ID</H2>
    <FORM METHOD=get ACTION="http://host.domain/isqlplus">
    <INPUT TYPE="hidden" NAME="userid"
    VALUE="hr/your_secret_password">
    <INPUT TYPE="hidden" NAME="script"
    VALUE="http://host.domain/employee_id.sql">
    Enter employee identification number: <INPUT TYPE="text"
    NAME="eid" SIZE="10">
    <INPUT TYPE="submit" VALUE="Run Report">
    </FORM>
    </BODY>
    </HTML>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Thanks
    Jay

    The form you use should work when your change
    "hr/your_secret_password" to a valid username, password
    and connect identifier like "hr/hr@MYDB". Don't forget to
    configure MYDB in your tnsnames.ora file on the machine that has
    the iSQL*Plus server.
    What was the error you got?
    The full URL syntax did seem to go missing from the 9.0.1 doc.
    See below for the full syntax. This should be appearing in a
    forthcoming FAQ.
    - CJ
    What syntax can I use to run an iSQL*Plus Dynamic Report?
    You can run a dynamic report by entering the report URI in the
    location field of your browser, or by making the report server a
    link or the action for an HTML form. The iSQL*Plus 9i Release 1
    documentation has examples of these.
    The general syntax for running a dynamic report is:
    {uri}?[userid=logon&]script=location[&param...]
    where uri
    Represents the Uniform Resource Identifier (URI)
    of the iSQL*Plus Server, for example:
    http://host.domain/isqlplus
    where logon
    Represents the log in to the database to which you
    want to connect:
    {username[/password][@connect_identifier]}
    where location
    Represents the URI of the script you want to run.
    The syntax is:
    http://[host.domain/script_name]
    The host serving the script does not have to be
    the same as the machine running the iSQL*Plus server.
    where param
    Specifies the named parameters for the script you
    want to run.
    Named parameters consist of varname=value pairs.
    iSQL*Plus will define the variable varname to equal value prior
    to executing the script e.g.
    ...script=http://server/s1.sql&var1=hello&var2=world
    This is equivalent to the SQL*Plus commands:
    SQL> define var1=hello
    SQL> define var2=world
    SQL> @http://server/s1.sql
    iSQL*Plus, SQL*Plus and SQL keywords are reserved
    and must not be used as the variable names (varname). Note also,
    that since variables are delimited by the ampersand character,
    there is no requirement to enclose space delimited values with
    quotes. However, to embed the ampersand character itself in the
    value, it will be necessary to use quotes.
    For compatibility with older scripts using the &1
    variable syntax, varname may be replaced with the equivalent
    variable position as in:
    ...script=http://server/s1.sql&1=hello&2=world
    Note the & is the URL parameter separator and not
    related to the script's substitution variable syntax.
    Commands and script parameters may be given in any
    order in the dynamic report URI. However, please note that if any
    parameters begin with reserved keywords such as "script" or
    "userid" then it may be interpreted as a command rather than a
    literal parameter.

Maybe you are looking for

  • Oracle ebs installation on windows 2008 R2

    Hi Hussein, I am doing oracle EBS installation on windows 2008. As per installation doc below are the pre-requisite The Prerequisites Software are: 1.Chose and Operating System windows 2008 (32 bit): Select the Windows Operating system and install it

  • ITunes Freezing when I try and Close it

    I just downloaded iTunes 7 for my Windows PC and it constantly freezes when I try and shut it down. This problem only happens when I am in the middle of playing a song and I try to shut iTunes down. What happens is the windows Dr. Watson error messag

  • How to rescale correctly a .flv videoclip?

    How to rescale correctly a .flv videoclip? I installed the Adobe MasterCollection CS4. I rendered a video with 3dsMax2010 at this resolution: 1024x576pixels, progressive scan, pixel aspect ratio 1,0 square. I want insert this video on a website, init

  • In contacts number why - symbol is used in between numbers it's becom very difficult for me to copy the contacts number

    As you can see in below pictur there is - in between numbers so is there any ways  I can remove it

  • LVM + LUKS + TRIM @ root partition

    Hi. I'm installing a fresh arch linux PC right now with LVM + LUKS and TRIM because i have one SSD , and UEFI mobo. SSD has a physical partition for the /boot and the rest one used with LVM where a virtual group created called "lvmRootPool" which con