Displaying Array values in Details section

Hi All,
I am having trouble with Arrays in Crystal Reports.
I have made a Shared string array in my main report and am using the same in a sub report. In the sub report I need to print the values in the array one below another like a table.
Say the array MyArray has values (INDIA, USA, CHINA, JAPAN, UK)
Right now I have made a formula in which I iterate through each of them and use Join(MyArray[i], ChrW(10))
ChrW(10) as you might know is used to make a new line. So the formula output essentially looks like the way I want it, that is
INDIA
USA
CHINA
JAPAN
UK
But its still a formula and acts like a single cell. If I export it into Excel, all the values will come in single cell. Moreover, When I use it like this, I cannot do proper formatting on it either.
Is there any way to make Array behave like a table and use the same in Detail section. I do not want to hit the DB again for this purpose.
Thanks

Hi Antony,
The only way to display the values on the Detail section is to 'get those values from the database'.
Instead of using a shared array variable, use a comma separated string. Here's what you need to do:
1) In the Main Report, open your existing shared variable formula and add a new variable:
shared stringvar array <exisiting variable name>;
stringvar new_variable;
existing code line 1
existing code line 2
existing code line 3
new_variable = Join(array_variable_name, ",");
2) Right-click the Subreport > Select change Subreport Links > Move the above formula to the pane on the right > Uncheck the option at the bottom right that says 'Select data in Subreport based on field'.
3) Get into the Subreport and use this as the Record Selection Formula:
{database_field} IN Split({@Pm-formula_name}, ",") //Replace {@Pm-formula_name} with the parameter name that is automatically created in the Subreport.
-Abhilash

Similar Messages

  • Avoid repeating values in details section

    Hi,
    I have a report with a lot of formulas - depending on certain values in a certain Oracle database table values are summed up.
    The fields are therefore placed in the report footer.
    As I now have to insert a grouping I need to move the fields into the details section. However, I don't want to display each value there but only the sum - I would like to avoid repeating values in the details section.
    A formula looks like this:
    stringvar A1;
    if {OUR_TABLE_FIELD} = 1 then A1 := {OTHER_TABLE.OTHER_FIELD}
    Else A1:=A1;
    A1;
    Thanks!

    Add a suitable group and then display data in this group footer, suppress detail section. It will effectively show the last detail line and thus eliminate duplicates from view. However, data is still there so if you want to use summaries you will need to use Running totals to ensure duplicates are not counted/summed
    Ian

  • How to display array values in textfield?

    i am creating student details with mysql database using JSON to get values and display in xcode.i got json array values from php and converted to NSMuatable array. my array result
        firstName = hari;
        lastname = krishna;
        age=10;
        fathername=ragav;
        firstName = priya;
        lastname = amirtha;
        age=8;
        fathername=ravi;
    now i want to display values iwhen i am enter firstname other field values display  in  textfiled  on button click.how to do that .help me .thanks in advance.
    i am very new to xcode.

    Hi,
    I think that its necessaries to use AJaX.
    I am implemeting something like that.
    I have a input text that works like a filter and depends on what my user types in input text I populate my table with some information.
    In order to do that, I put in my JSP a div with an Id and I used ajax, like that:
    function ajaxFunction()
              var xmlhttp;
              if (window.XMLHttpRequest)
              xmlhttp=new XMLHttpRequest();
              else if (window.ActiveXObject)
              // code for IE6, IE5
              xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
              else
              alert("Your browser does not support XMLHTTP!");
              xmlhttp.onreadystatechange=function()
                                                      if( xmlhttp.readyState==4 )
                                                           document.getElementById("tabelaResponsaveis").innerHTML = xmlhttp.responseText;
         var resp = "<f:invokeUrl var='solicitacao' methodName='getResponsaveis'/>";
         xmlhttp.open("POST",resp,true);
         xmlhttp.send(null);
    getResponsaveis is a method inside my BPM that returns a HTML code (the table HTML code with all the information that I need to show.
    I Hope to help
    Thanks Marcos

  • Is it possible to have a Summary section display above every grouped Details section in a report?

    I'm trying to create a report that displays a "Summary" section above every grouped Details section.
    Is this possible in SSRS?  If so, what is the best way to do it?
    Thanks!

    Hi mmw_pdx,
    In order to achieve your requirement, we can use two tables to separately display summary data and detail data. Then use a list to combine the two tables based on the Name group. For more details, please see:
    Drag a table to design surface, add a group grouped by Food.
    Right-click the first column to insert a column with Inside Group-Right, then insert the corresponding values.
    Drag another table to design surface, insert the corresponding values.
    Drag a list to design surface with current dataset, then drag the two tables in the list.
    Add a group grouped by Name in the list.
    The following screenshot is for your reference:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • How do I display array values in a text field?

    Hi there-
    I have a small Flash movie I'm trying to complete, it's my
    first go around with Flash 8 so I appreciate your patience:
    I built an array with some actionscript which seems to work
    fine (I can trace it and all is well in the trace window). Now I'm
    simply trying to display it to my Flash movie screen and I've built
    a dynamic text window which is working, except that I only ever get
    the last array element to appear in the dynamic text window. I've
    traced the code and see all of my array values, but when I use
    "myResults_txt.text=picker_array;" I only see the last position's
    value in my array. I tried playing with the "multiline" attribute
    for the text field, it didn't seem to make any difference.
    I'm sure it's probably something silly that I've missed, but
    how do you display an array, with all of it's values to a dynamic
    text field (I even tried using the textArea component but ran into
    the same problem).
    Thanks in advance for any help-
    rich

    Thanks for your input. I tried just about everything but
    ended up re-writing the contents of the array to a var and looping
    through the var. Not my first choice but it got me to done.
    Thanks again,
    Rich

  • How to display array values in jsp of screen flows

    Hi,
    can u please help me .
    I am having one array variable i have stored all the values but i have to display that in JSP page .how to display
    Edited by: user12171025 on Nov 4, 2009 11:11 PM

    Hi,
    I think that its necessaries to use AJaX.
    I am implemeting something like that.
    I have a input text that works like a filter and depends on what my user types in input text I populate my table with some information.
    In order to do that, I put in my JSP a div with an Id and I used ajax, like that:
    function ajaxFunction()
              var xmlhttp;
              if (window.XMLHttpRequest)
              xmlhttp=new XMLHttpRequest();
              else if (window.ActiveXObject)
              // code for IE6, IE5
              xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
              else
              alert("Your browser does not support XMLHTTP!");
              xmlhttp.onreadystatechange=function()
                                                      if( xmlhttp.readyState==4 )
                                                           document.getElementById("tabelaResponsaveis").innerHTML = xmlhttp.responseText;
         var resp = "<f:invokeUrl var='solicitacao' methodName='getResponsaveis'/>";
         xmlhttp.open("POST",resp,true);
         xmlhttp.send(null);
    getResponsaveis is a method inside my BPM that returns a HTML code (the table HTML code with all the information that I need to show.
    I Hope to help
    Thanks Marcos

  • Filling an array from a field in the details section

    Hi.
    I'm a Crystal newbie. I'm using Crystal 11 Dev. I have some basic understanding of programming but I am clueless as to the organization and syntax used in Crystal scripts.
    Here's what I need to do. (I don't expect anyone to solve this for me, but just a starting point would be great.) I have a field in the details section, let's call it field-A. The details section is under group field, let's call it groupedField-A. For each groupedField-A there are zero to many field-A's which get looped through and displayed in the details section. Instead of just listing the values for field-A in the details section, I would like to display them in a string seperated by commas.
    I figure I need to create an new array for each new groupedField-A, then add the values from field-A to the array as the details section loops through them. Then, I figure I concatenate the array values into a string in the details section or maybe the group header or footer.
    Will this work in Crystal? If so, I need some help with the syntax. OR, is there another way to approach it?
    Any ideas would be greatly appreciated.
    Thanks
    Chuck W.

    hey Chuck,
    instead of using an array you may wish to use a string running total. an array is limited to 1000 values whereas a string running total is 64k.
    details section formula:
    whileprintingrecords;
    stringvar srt:= srt + + ",";
    group header section formula for reset:
    whileprintingrecords;
    stringvar srt:= "";
    group foot section formula for display:
    whileprintingrecords;
    stringvar srt;
    srt[1 to length(srt) - 1]
    hope this helps,
    jw

  • How to work in detail section

    Post Author: Linux Guy
    CA Forum: General
    hi guys
    i m new  for crystal reports and i want to know that how to maintain detail section with multiple columns, i mean , i want to display 100 records in detail section , in first column it should be display 1 to 25 and then 2nd column 26 to 50 and so on... but when i m tring to display all those record it displayed all the records on the same column (from top to bottom)... i want to display in this formatt ....like
    Srno    Price     Srno    Price   Srno     Price
    1           xyz        26       xyz       51         xyz
    2           "            27        "          52          "
    3           "            28        "          53          "
    n          "             n         "           n           "
    25         "            50        "          75           "
    so how can i do this . im using Crystal Reports 10, i would really appreicate if someone give me that solution
    thankx

    Post Author: Linux Guy
    CA Forum: General
    thanks alot 

  • Shared Variable in DETAILS section reports value of previous item.

    I have a report with a subreport in the details section. I have set up a shared variable in the subreport to pass a value to the main report. For some reason, the value of the variable for the first detail line item, shows up in the field for the second, the value for the second shows up in the third and this pattern repeats. How can I get the shared variable to display in the correct record?

    It's because the data in the details line is evaluated/diplayed before the subreport executes.
    Split the details into two sections and place SR in top one and display formula for var in lower one.
    If there is data in the subreoprt you want on same line as the var then in section expert set the upper detail section to underlay.
    Ian

  • Detail sections not displayed with Crystal Reports 2010 Runtime (SP1 also)

    I have migrated a VB app from RDC 9 to Crystal Reports 2010 and I'm experiencing a very strange issue.
    In a report with 6 nested groups, the detail part is splitted in 7 section, and the whole detail has the "keep together" flag activated. At runtime, some detail sections are not displayed. There is no suppress condition on the detail section. The missed sections are those near bottom of the page. I suppose that when there is no room to print the section on the page and it should go on the next page, Crystal forget to display it.
    I exported the report in Crystal format and reopened with Crystal Reports designer and the missed section are displayed.
    The same report is displayed correctly using RDC 9.
    If I show the group tree and select the missed section group, the section is correctly displayed on a separate preview page.
    I've some screenshot to better demonstrate the problem.
    I hoped SP1 will resolve the issue but unfortunately it didn't.
    Pier Alberto Guidotti

    This issue has been escalated for a fix. tracking number is TE5000325237. For anyone wanting to attach to this thread with a similar issue, please note the behavior as decribed in the TE below. If the description does not match your issue exactly, please create a new thread.
    Description - Steps to Reproduce;
    1) Run the report in the CR 2008 designer - note the second page
    2) Run the report in VS2010 app using CRVS2010 SP1:
    CrystalReportViewer1.ReportSource = <path to report>
    3) Look at page 2 and compare to page 2 from the CR2008 designer (also, see attached compare.jpg file which is a screen shot of both views) - note missing group on page 2
    4) Export to PDF, DO, RTF - same issue
    5) Print to printer using the viewer print button - same issue
    6) Same issue print to printer using code:
    Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
    crReportDocument.Load("C:\Crystal\Test\Forum tests\Alberto missing detail section\Crystal Issue\Distinta di Taglio CR 2010.rpt")
    crReportDocument.PrintToPrinter(1, 1, 1, 2)
            MsgBox("Done")
    7) Same issue print to printer using code:
    Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
    crReportDocument.Load("C:\Crystal\Test\Forum tests\Alberto missing detail section\Crystal Issue\Distinta di Taglio CR 2010.rpt")
    Dim rcd As ISCDReportClientDocument
            rcd = crReportDocument.ReportClientDocument
            rcd.PrintOutputController.PrintReport()
            MsgBox("Done")
    8) Export to RPT file format - view this export in the CR2008 Designer - report looks as it should
    9) Add report to the .NET2010 project. trying to view the repor tin the .NET2010 IDE results in .NET crashing.
    - Ludek

  • CRVS2010 beta -  date field not display in details section

    I use Visual stdio 2010 so i install crystal report 2010 for report.
    It work fine .
    but in report detail section there is date field then it will not be display.
    alos if we do group on date field it will give error when we try to open report.
    Plese geve me possible soluction for date field problem.
    Edited by: hitesh_tatva1 on Jun 22, 2010 11:35 AM
    Edited by: Don Williams on Jun 22, 2010 7:20 AM

    Solution Found
    Don't install sp2it sucksclassic case of the cure being worse than the disease.
    Downloading and installing the SP3 redisist fixed the issue.
    This link is probably appropriate:
    https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/bobj_download/main.htm
    Software Product->select Crystal Reports
    Version->select Crystal Reports 2008
    important part
    Software Type->Utility Click Search Download the redist install.
    Not very intuitive, but you'll need to do this so you download the runtime and not the full version.
    Hope that saves you the 5 hours it took me to figure this darn thing out...I hate unintuitive products--they aren't very professional.
    +
    SAP, where do I send the bill for supporting your own product?
    I too have the same problem. Hopefully we can get a solution to this soon as the delayed release of the 2010 runtime has us in a difficult place.
    The problem: I upgraded my project to Visual Studio 2010; therefore, I upgraded to the Crystal Reports for Studio 2010 beta.
    Everything worked fine until I modified the app.config so that I could deploy the application into our test environment. We do not have Visual Studio installed in this environment, so we needed to have a Crystal Reports Runtime. According to the SAP website deployment guide, currently the only way to deploy a 2010 app is to use the 2008 runtime by modifying the app.config file to redirect the bindings.
    __Now, none of my date fields appear on the reports.__
    Just to test, in my development environment, I commented out the redirects in the app.config and the dates appeared. I uncommented the redirects so that the 2008 runtime would be used and then my dates disappeared from the report.
    Here is the entry I put into the app.config:
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.CrystalReports.Engine" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.2000.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.Shared" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.2000.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.ReportSource" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.2000.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.Windows.Forms" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.2000.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.Enterprise.Framework" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.1100.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.Enterprise.InfoStore" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.1100.0"/>
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    Your help is much appreciated.
    Thanks,
    Michael
    Edited by: SaganDraxan on Jul 16, 2010 8:23 PM

  • Display or array values all on one line

    This is my code it gives a strange out come!!!, how do I display the values of the array?
    System.out.println("hi " + array2[0] + array2[1] + array2[2] + array2[3] + array2[4]);

    Lemme help you out
             '-.\|':':' `"` ':':'|/.-'
             `-./`. .-=-. .-=-. .`\.-`
               /=- /     |     \ -=\
              ;   |      |      |   ;
              |=-.|______|______|.-=|
              |==  \  0 /_\ 0  /  ==|
              |=   /'---( )---'\   =|
                `\= '--`   `--' =/'
                  `-=._     _.=-'
                       `"""` 

  • Details section values

    Hi All,
    I have a field month in details section.Suppose if the month values are Jan ,Feb,Mar.Then in page header section (where I have all the headers)
    I have to show the same values horizontally.
    Is it possbile ? PFA
    Please help

    Hi Kalyan,
    Just place a crosstab on the report header and align it with the other column headings.
    The column of the crosstab would be the Month field with nothing in the Rows and Summary.
    -Abhilash

  • 12.1.3 BI Publisher report not displaying the detail section on first page

    Hi,
    As part of our R12.1.3 upgrade, I designed a Purchase Report as a RTF template.
    Header and footer sections generate fine, but for some reason the detail (text body of the RTF template) does not display on the first page but starts on the second page (this is a PO with many lines). I am using MS Word table to display the detail section.
    Is there something I can check?
    Thanks,
    Sinan

    can you send me your template and xml . i can check at my side .
    email:[email protected]
    there may be some spaces in the beginning .

  • Display Javascript array value OnChange instead of Bean value

    I intially loop through a collection of employees display the values within the employee loop I have a select statement that i loop through a collection of programs that has on OnChange. I want to display the javascript value instead of the bean value onChange. The following code displays the bean value initally and onChange it displays both because the if is never false?
    *<c:if test="${programs[programIndex] != emps.department}">${emps.department}</c:if>*
    * <div id="programText"> </div>*
    * <input name="department" type="hidden" id="department">*
    JSP page
    <jsp:useBean id="programs" scope="request" class="java.util.Collection"/>
    <jsp:useBean id="employeeList" scope="request" class="java.util.Collection"/>
    <script language="JavaScript" type="text/javascript">
    var programs = new Array();
    function setProgramFields() {
    nameField = document.getElementById("programList");
    idx = nameField.selectedIndex;
    emField = document.getElementById("programText");
    emHiddenField = document.getElementById("department");
    emField.innerHTML = programs[idx];
    emHiddenField.value = programs[idx];
    <c:forEach var="emps" items="${employeeList}">
    <td width="170px">
    *<c:if test="${programs[programIndex] != emps.department}">${emps.department}</c:if>*
    * <div id="programText"> </div>*
    * <input name="department" type="hidden" id="department">*
    </td>
    <td width="275px">
    <div class="selectBorder">
    <select name="programName" type="text" class="searchProgram" id="programList" onChange="setProgramFields()">
    <c:set var="programIndex" value="0"/>
    <c:forEach var="sp" items="${programs}">
    <c:if test="${sp.programName == emps.programName}">
    <option value="${emps.programName}" selected="selected">${emps.programName}</option>
    </c:if>
    <c:if test="${sp.programName != emps.programName}">
    <option value="${sp.programName}">${sp.programName}</option>
    </c:if>
    <script language="JavaScript" type="text/javascript">
    programs[${programIndex}] = "${sp.department}";
    </script>
    <c:set var="programIndex" value="${programIndex + 1}"/>
    </c:forEach>
    </select>
    </div>
    </td>
    </c:forEach>
    Edited by: kmb_ms on Sep 15, 2008 2:38 PM

    Apologize for not formatting the code. I used the status.index the code as suggested. The code if more efficient but the results are the same and I still have the same problem.
    <select name="programName" type="text" class="searchProgram" id="programList" onChange="setProgramFields()">
    <c:forEach var="sp" items="${programs}" varStatus="status">
    <c:if test="${sp.programName == emps.programName}">
    <option value="${emps.programName}" selected="selected">${emps.programName}</option>
    </c:if>
    <c:if test="${sp.programName != emps.programName}">
    <option value="${sp.programName}">${sp.programName}</option>
    </c:if>
    <script language="JavaScript" type="text/javascript">
    departments[${status.index}] = "${sp.department}";
    </script>
    </c:forEach>
    </select> How can I access the value of the array to compare with the value of the bean.
    <script language="JavaScript" type="text/javascript">
    var departments = new Array();
    function setProgramFields() {
    nameField = document.getElementById("programList");
    idx = nameField.selectedIndex;
    emField = document.getElementById("departmentText");
    emHiddenField = document.getElementById("department");
    emField.innerHTML = departments[idx];
    emHiddenField.value = departments[idx];
    </script>The following code displays both the value of the bean and the value of the array onChange b/c the if statement is always true???? This is where I need help.
    <td width="170px">
         <c:if test="${departments[idx] != emps.department}">${emps.department}</c:if>
         <div id="departmentText"> </div>
         <input name="department" type="hidden" id="department">
    </td>

Maybe you are looking for

  • How do i find out my notebook\'s capacity?

    I want to upgrade to newer windows version, but I need to know if I have enough space to do a custom install or if I need to purchase a larger hard drive. How do I check my notebooks capacity? I have an hp mini 1030nr running windows xp professional

  • How do I get my contacts back that have been lost

    How do I get contacts back that have been lost

  • Problem in installing Agent10 on Linux box

    Hi, I have tryed to install Agent10g on a linux box abd tryed to connect it to the OMS running on Windows XP. I choose the installation option agentDeploy option by running agentDownload.linux it worked fine by downloading all the files and used the

  • Pass data from BSP to WebDynpro Abap

    Hi, Can anyone pls tell how to pass the data from BSP to WD4A Application. I am trying to call the WDA URL using the class CL_GUI_FRONTEND_SERVICES in BSP,but it is giving a run time error. How to call the WDA URL from the classes in BSP & not using

  • Desktop Integration Suite Document Profile selection?

    Is there a way with the DIS (10g) to pre-set or allow the user to select a particular Document Profile so that the Check-In form presented is tailored to the user? Right now the Standard Check-in form is presented which includes meta data information