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

Similar Messages

  • Only the Largest number from a field in the details section

    I have one field that contains numbers dictating the number of entries in an assignment i.e. A call can be assigned to one person at a time, and once a call has been dealt with by a person they can close it or resign it to someone else......every time a call is assigned it gets and number.
    So if it is not assigned, then = 0
    Assigned once, then = 1
    Assigned twice, then = 2
    Assigned three times, then = 3
    Etc
    How can I run a report to only show me the details of the highest number?

    Hi,
    Formula for restricting records
    Similiar post..Check it out.
    Regards,
    Salah

  • Fitting alot of fields in the details section [overflow]

    Hi,
    I am trying to create a simple report. I need to place 12 database fields on the report. These are going to go in the "details" section one beside the other. Unfortunately, I have run out of space in the details section and am left with 3 database fields not on the report. Is there a way in which i can fit these fields on the report?
    thanks
    J

    Hi James,
    You may increase the page size by going to File>>Page Setup and select landscape as orientation.
    Another option is to connect to a plotter (printer) which is known to have wide page sizes
    Thanks

  • Fill an Array from textFields

    Hi, I'm very new to this so bear with me... I need to fill an array from values that are submitted from textfields. Can anyone help me out? Thanks in advance.

    Sounds like you might be dealing with a servlet or a jsp. If so,
    array[0] = request.getParameter("textfield1");
    array[1] = request.getParameter("textfield2");
    The names of the textfields correspond to elements in the form that's being submitted. i.e,
    <form...>
    <input type="text" name="textfield1">
    ...

  • Master Detail Form - How 2 update a field in the Detail form using a query?

    Hello,
    I have a master detail form with, each master record having a fixed(6) number of detail records. One of the fields in the detail record is the PART_DESCRIPTION field. I am trying to update this field by querying Table_X. TABLE_X is in the format of (desciption id, description). Description id runs from 1 to 6.
    When the form displays, the PART_DESCRIPTION field for the 6 detail records needs to be automatically populated with the six values of description stored in Table_X. How can this be done?
    Tried using session storage objects, but made no headway.
    Would greatly appreciate pointers on how to go about doing this.
    Thanks.
    Dev

    If you are on a Portal Version lesser than 3.0.9.8.3, then please try the following to populate
    the PART_DESCRIPTION field.
    Steps:-
    1> Edit the form and go to the Additional PL/SQl section and put the following code in the
    "...after displaying the page area" :-
    declare
    type t_vc_arr is table of varchar2(4000) index by binary_integer;
    l_arr_desc t_vc_arr;
    l_form_name varchar2(200);
    l_form_state varchar2(500);
    begin
    l_form_name := p_session.get_module().get_name();
    l_form_state := p_session.get_value_as_varchar2(
    p_block_name => 'MASTER_BLOCK',
    p_attribute_name => '_FORM_STATE'
    if l_form_state = 'QUERY_AND_SAVE' then
    select description
    bulk collect into l_arr_desc
    from <schema>.table_x;
    htp.p('
    <script>
    var descArr = new Array();
    var Fidx = 1;
    var formObj = document.WWVM'||p_session.get_id()||';
    var fieldName = "'||l_form_name||'.DETAIL_BLOCK.PART_DESCRIPTION.0";
    for i in 1..l_arr_desc.count loop
    htp.p('descArr['||to_char(i-1)||']="'||l_arr_desc(i)||'";');
    end loop;
    htp.p('
    for (var i=0; i < formObj.length; i++){
    if (formObj.elements.name == fieldName+Fidx){
    formObj.elements[i].value = descArr[Fidx-1];
    ++Fidx;
    htp.p('</script>');
    end if;
    end;

  • CProjects - Adding a new field to the detail screen of object link

    Hi All,
    I've a requirement of adding a new field to the detail screen of object link. But the field is a combination of 3 other standard fields.
    Please let me know how could i realise this functionality?
    Thanks in advance.

    Hi Srini,
    Thanks for your Reply
    I have kept 01 against the field BSEG-AUGDT and selected the preselect check box also.
    But still that field is not visible in the dynamic selection screen.
    Thanks
    Ajay.D

  • Master Detail Form - Update Statement for Column in the Detail Section

    Hello,
    I've posted a demo application to apex.oracle.com
    Application# 49298
    Application Name: Street_Inventory
    Basically, on page 3 I have a Master Detail Form. In the Detail section, I want the value of On_hand to save to table ITEMS. Here's my code below.
    SOURCE
    select
    "CONSUME_DETAIL"."CONSUME_DETAIL_ID",
    "CONSUME_DETAIL"."CONSUME_HEADER_ID",
    "CONSUME_DETAIL"."ITEM_ID",
    "CONSUME_DETAIL"."CONSUMED_QUANTITY",
    ("ITEMS"."ON_HAND" - "CONSUME_DETAIL"."CONSUMED_QUANTITY") as "ON_HAND"
    from "CONSUME_DETAIL",
    "ITEMS"
    where "CONSUME_HEADER_ID" = :P3_CONSUME_HEADER_ID
    and "CONSUME_DETAIL"."ITEM_ID"="ITEMS"."ITEM_ID"
    UPDATE INVENTORY PROCESS
    UPDATE ITEMS
    SET ON_HAND = :P3_ON_HAND - :P3_CONSUMED_QUANTITY
    WHERE ITEM_ID = (select     ITEM_ID
    from     CONSUME_DETAIL
    where CONSUME_DETAIL_ID = :P3_CONSUME_DETAIL_ID);
    My code isn't working. What am I doing wrong?

    WReed,
    The first thing I see "off the bat" is that you don't have items named P3_ON_HAND and P3_CONSUMED_QUANTITY which are referenced in your code. Although it's possible to do what you want with just SQL, I updated your code with a little PL/SQL to make it easier to understand...
    As you'll see the problem now is that the design/db model is not quite right as your getting a too many rows error.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen

  • Project Server - Projects does not show up in the detail section of the resource availability view!!!

    Hi,
    I click resource center in PWA 2010 and select a resource; then click resource assignments and a list of projects along with the task which the selected resource is assign is listed. I then click on resource availability and set the date
    option and units for the selected resource and the resource availability and capacity is visible in the details section but not the list of projects that the resource is assign.
    How can I get the list of projects to show up in the details section under the resource name?   
    A. Williams

    Hi A. Williams,
    Could you post a screenshot of BOTH upper (graph) and lower (detailed grid) parts of our resource availability page?
    It would be very weird that you can see workload in the upper part but not in the detailed grid. This is what we need to know to help you:
    Are you not seeing at all the assignments in both graph and detail grid of the resource availability page? In this case the issue comes from your assignment, not from the resource availability page.
    Are you seeing the assignment in the graph but not in the detail grid?
    In case this is an assignment issue, some reasons could be:
    you're not looking at the right period
    date range selection has not been applied clicking on the button "apply"
    the assignments are proposed (versus committed)
    the assignment has not been publish (column publish to "yes" in MS Project Pro)
    the assignment owner is not the resource
    Here is (sorry, it is in french) my upper part (graph) with 1 resource selected, 3 weeks and a 7hrs assignment on the 2nd week (note that you have to apply the date range once selected) :
    Then the lower part (detailed grid) where is have exactly the same information (same assignments, same resources, same date range):
    Hope this helps.
    Guillaume Rouyre - MBA, MCP, MCTS

  • How to fix the height of the details section in crystal reports.

    hi all
    How to fix the height of the details section in crystal reports.

    Thanks for your reply
    i didnt get the clear idea about your answer can you explain it once with example
    why iam asking is when i add a new details section according to you answer maintaining same height of the two details sections and i see the preview the iam getting gap between each record. this is so because one record from details section1 and another empty space from details section2
    like
    Details section A-contains records
    Details section B- no records
    Details section A-contains records
    Details section B-no records
    Then how will i solve my issue
    Thanks in advance

  • How to force multiple columns in the Details section

    Hello,
    My report has a lot of data in the Details section, but it could fit on one page if I could put it in three columns. Is there a way to do this?
    The Details section has setting: Force the new page after certain number of visible records. This would be perfect for me if instead of multiple pages I could use multiple columns.
    Thank you,
    Peter

    Thank you.
    I think I see now how to format the columns.
    Peter
    Edited by: Peter Afonin on Sep 10, 2010 2:34 PM

  • Report - Centre a subreport in the detail section

    Hi all
    With my Access 2013 DB I do have a Report representing an invoice.
    There is a subreport in the detail section representing the items, VAT plus Total amount.
    I do have text elements in the footer sections.
    I'm looking for the right event and vba code to centre the subreport within the detail section before it gets sent to the printer.
    Thanks for any help.
    Martin

    The best way is position it yourself in design mode and leave it that way. There is the Move x,y fuction and you can also set the subreports left and top positions, but when you start fooling around with positioning objects in code, you are asking for trouble
    if users change the report margins or other settings that are printer-dependent. As far as I know, there is no "Centering" ability in code, for form or report objects.

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

  • Why I can't set the Detail Section of a form at onLoad event?

    Hi,
    I'm having a silly problem with Access 2010. I can't modify the Detail section ("Corpo" in Italian) of a Form or a Report.
    Neither using the onLoad nor the onOpen events.
    What am I doing wrong? I load a micro example in my
    one drive, if you would spend some time helping me.
    Thanks in advance, Lauro

    Hi,
    I'm having a silly problem with Access 2010. I can't modify the Detail section ("Corpo" in Italian) of a Form or a Report.
    Neither using the onLoad nor the onOpen events.
    What am I doing wrong? I load a micro example in my
    one drive, if you would spend some time helping me.
    Thanks in advance, Lauro
    You should be able to size the detail section of the Form in the open event or onload event.
    I don't have 2010 on my PC. Why not post the sample code here?

  • First occurence of a value from a  field in the internal table.

    How to select the first occurence of a value from a field in an internal table ?
    I don think , we can use select query .
    Any suggestions?
    provide syntaxs also .

    Hi...
    You have to use this code.
    DATA : Begin of IT_MARA occurs 0,
                 mtart type mara-mtart,
                 matnr type mara-matnr,
                 meins type mara-meins,
              END OF IT_MARA.
    START-of-SELECTION.
      SELECT MTART MATNR MEINS FROM MARA INTO TABLE IT_MARA.
    END-OF-SELECTION.
    LOOP AT  IT_MARA.
    <b>  AT NEW MTART.      "This will trigger for every first/new value of the field
                 <<<<WRITE YOUR CODE here>>
       ENDAT.</b>
    ENDLOOP.
    You can also use.
    LOOP AT  IT_MARA.
    <b> <b>  ON CHANGE OF IT_MARA-TART.   
                 <<<<WRITE YOUR CODE here>>
       ENDON.</b></b>
    ENDLOOP.
    <b>Reward if Helpful.</b>

  • Insert data from a field into the subject of an email generated form a form

    Hi,
    Is there a way to have the contents of a field come up in the subject of an email that is made when a submit by email button is clicked.
    The data we want is from a date field for a 'week commencing'.
    We have a text string that is entered on the button's properties - email subject, but we'd like to add the contents of a field on the form onto this.
    any ideas?
    thanks,
    declan.

    Try this code in the click-event of the mail-button (you will have to adjust it of course):
    var anrede;
    if (xfa.form.Formular.Beratungsprotokoll.Kunde.Anrede.rawValue == "Herr") {
    anrede = "Sehr geehrter Herr "; }
    else {
    anrede = "Sehr geehrter Frau "; }
    var mailText = anrede + xfa.form.Formular.Beratungsprotokoll.Kunde.Name.rawValue +
    "\nPlease print this form and mail it to me!" +
    "\n\nTo speed up processing you can also click on the button 'ok'. " +
    "This will generate an e-mail. Please send this e-mail to me." +
    "\n\nThank you" +
    "\nYour agent";
    event.target.submitForm({cURL:"mailto:" +
    Formular.Beratungsprotokoll.Kunde.EMail.rawValue +
    "?subject=consulting minutes&body=" + mailText,
    cSubmitAs:"PDF",cCharset:"utf-8"});

Maybe you are looking for