Keeping the Count in detail section

Post Author: Swapna
CA Forum: Formula
Hi Iam new to the crystal reports and  here are my issue's
In my database i have 336 records and i want to keep this count in my details section and when i did the following thing its priting my count for 336 times in my details section which i do not want that i want to print the count of total records in the detail section for only once.
Under the formula fields i have written something like this
Count({Command.TRACKNUM}); This is working fine but only problem is its printing for 336 times
Second question is In My database i will be having records with different statuses like completed,prepared,incompleted so i also want to count the records with the diffrent statuses and print them in the detail section
My report should be like this
             Total Samples            Comppleted Samples         InCompleted Samples          Prepared Samples     ///Will be in the page header section
                           336                               300                            18                                        18              //Was suppose to be in the detail section
to have a conditional count i have written some this like this in the formula field
({Command.status}="Prepared"
Count({Command.TRACKNUM});  Which does not worked
I Appreciate your help and Thanks in Advance.

Post Author: yangster
CA Forum: Formula
I think you are confused about the details.  If you put that formula in the detail section it will obviously be repeated for every single row.if what you want is a page header with the details that's fine but your summary should go into a group header/footer or the report footer.You've already got the total record count which is fine.if you want a quick and simple way to evaluate completed, incomplete, prepared samples simply create 3 simple formulas and place them in the details section (you can suppress them if you wish not to view them)@completedif status = "prepared" then 1 else 0@incompleteif statues = "incomplete" then 1 else 0@pepared_sampleif status = "prepared" then 1 else 0simply insert summary's for each of the above formulas and you will have your desired results

Similar Messages

  • Setting the height of detail section with RAS SDK

    Hi, all,
    is it possible to locate a section (CrystalDecisions.ReportAppServer.ReportDefModel.Section) in a reportk you and set its maximum height?
    When I find a detail section in question like so section = reportClientDocument.ReportDefController.ReportDefinition.DetailArea.Sections[counter];
    it just gives me the height of one row.
    Is there a way to set a maximum size of it?
    Thank you!

    Hi Jelena,
    see the below sample to add a new section to the report.
    http://scn.sap.com/docs/DOC-6025
    in the sample, see below code how the section properties are set.
    //Set the properties for the section
        boSection.Kind = CrystalDecisions.ReportAppServer.ReportDefModel.CrAreaSectionKindEnum.crAreaSectionKindDetail;
        boSection.Name = "Detail2";
        boSection.Height = 1000;
        boSection.Width = 11520;
    Refer to above sample and write your own code to identify the section and then set the properties.
    Othe RAS SDk samples are here.
    http://scn.sap.com/docs/DOC-28646
    - 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.

  • How to change the high of detail section?

    <p>I&#39;m creating a report for a invoice:</p><p>It header section is the customer information, and  detail contain all about products..</p><p>My problem is with the High of the detail section, because it is so much high, and i need to put more information in the footer section but it apear near to end of paper!</p><p> </p>

    Can you maybe give a bit more information about the problem?  It sounds like you have many detail sections that are repeating and this is pushing your group footer to the end of the page.... Is this as simple as needing a longer page size?

  • How many instruction keys can we declare at the vendor bank details section?

    I understand that if the vendor is being shared across company codes, the instruction key will be available to the relevant companies. If company A's instruction key is different from company B's instruction key, how do we accomodate both companies' instructions to the bank then?

    Hi Ethan,
    Instruction keys you can maintain in Vendor/Customer Master Record, general data section, and your question how we can accommodate by company code:
    1. You can maintain Instruction Key in House Bank Master data, under Data Medium Exchange tab, T.Code FI12, which is company Code specific, in this way you can maintained company code wise different instruction keys. If the instruction key is not maintained in vendor/customer master data, then the default instruction key defined for the house bank is used.
    2. You can also enter Instruction key at document level, in vendor/customer line item or it can be overwritten
    Regards
    Javed

  • Blank space in the report detail section

    Hi ,
    I have data for ten columns and after that i am getting a blank space, so my report is scrolling to right side without any data.How shall i remove the blank space.Any suggestions.For one more i am getting this only at the second page (Detail section)
    Regards,
    Rajasekar

    Thanks James for the reply,but i am not getting it correctly.
    I have a year column which is the last column in my detail section.If i don't get any value for that year column then i am not getting these blank space at the right side of my report.If i have value for the year column then i am getting blank space double the times to my report detail section.
    Any suggestions
    Regards,
    Rajasekar

  • Unrelated data in master detail sections of a custom BIP  report deployed in R12 EBS

    We have a custom Master Detail BIP report generated by calling XDO APIs from a custom Java concurrent program (common_report_attachment) . This Java concurrent program is called from another custom concurrent program (po_validation) that processes a batch of POs in a single concurrent request.
    PO_Validation Program (processes a batch of POs per request) -> Java Concurrent Program -> BI Publisher Report APIs
    BIP report generates data for master detail sections based on two sql queries (given below) that have 'where' clause based on a common external parameter "P_TRX_HDR_ID".
    NOTE: No explicit data link is used NOR an output column of parent query is used in the where clause of detail query as bind parameter.
    - <dataTemplate name="NAPPB2BPORPT" description="Data Template for B2B PO Report" version="1.0">
    - <properties>
      <property name="xml_tag_case" value="upper" />
      <property name="db_fetch_size" value="200" />
      <property name="scalable_mode" value="on" />
      </properties>
    - <parameters>
      <parameter name="P_TRX_HDR_ID" dataType="number" />
      </parameters>
    - <dataQuery>
    - <sqlStatement name="Q_PO_HDR">
    - <![CDATA[
    SELECT poh.po_number                                     PO_NUMBER
              , poh.quote_number                             QUOTE_NUMBER
              ---- other columns -----
             FROM nappcust.napp_o2i_po_headers poh
                ,napp_aso_quote_headers_v naqv
               WHERE 1=1
               AND naqv.quote_number=poh.quote_number
               AND poh.header_id = :P_TRX_HDR_ID
      ]]>
      </sqlStatement>
    - <sqlStatement name="Q_LINES">
    - <![CDATA[
    SELECT  pol.item                                            ITEM
          , pol.partner_part_number                             PARTNER_PART_NUMBER
          -- other columns --
       FROM napp_o2i_po_lines pol
       , napp_o2i_po_headers poh
       , aso_quote_lines_all aqla
       , mtl_system_items_b msib
    WHERE 1=1
      AND poh.header_id               = pol.header_id
      AND pol.header_id               = :P_TRX_HDR_ID
      AND aqla.quote_header_id        = poh.QUOTE_HEADER_ID
      AND msib.inventory_item_id      = aqla.inventory_item_id
      AND msib.organization_id        = aqla.organization_id
      AND (pol.quote_line_number       = aqla.quote_line_id
           OR pol.quote_line_number    = aqla.quote_line_id||1)
      ]]>
      -- Added for the defect 13954
      </sqlStatement>
      </dataQuery>
    - <dataStructure>
    - <group name="G_PO_HDR" source="Q_PO_HDR">
      <element name="PO_NUMBER" value="PO_NUMBER" />
      <element name="QUOTE_NUMBER" value="QUOTE_NUMBER" />
      --- mappings for other columns of "Q_PO_HDR"
      - <group name="G_LINES" source="Q_LINES">
      <element name="ITEM" value="ITEM" />
      <element name="PARTNER_PART_NUMBER" value="PARTNER_PART_NUMBER" />
        --- mappings for other columns of "Q_LINES"
      </group>
      </group>
      </dataStructure>
      </dataTemplate>
    Issue: Sometimes when the parent concurrent request runs for a batch with multiple POs the report generated for the last PO has inconsistent data in the master and detail sections. To elaborate, the detail section is having correct data pertaining to the PO identified by the parameter "P_TRX_HDR_ID". However, the master section is having data pertaining to the previous PO processed from the same batch.
    This issue is not occurring consistently and is not reproducible at will. I
    'm suspecting this could be because of not having data link between the queries but confirm from someone who has experienced this issue.
    Regards,
    Srinath

    is there any way from the page, can we pass the some values, which can identify the page level data?
    if so pass the parameter to BIP report query.

  • Getting counts from detail tables

    I have multiple record bock that displaye a list of cell ids and their attributes; each record also displays record counts of its 3 detail tables.
    Originally, the POST-QUERY trigger select the counts (3 detail tables) as part of the data block for each record (or cell id). There are over 16K records, so each record query issues 3 selects. The whole query toke over a minute. I was asked to improve the retrieval time.
    At first I thought perhaps I could put the 3 counts in 3 separate data blocks and issue one query each in a "select cell_id, count(*). . . group by cell_id" but scrolling would not synchronize with the other blocks. So I dropped that idea.
    Next, I added a program unit from which the WHEN-NEW-FORM-INSTANCE trigger calls after execute_query. It issues "select cell_id, count(*). . . group by cell_id" (one for each detail table) and fills the count columns in the original data block. However I need to set the block property Query All Records to YES so that the cell ids and attributes are filled first. That means that before the form comes up it has to retrieve all records. That saves me about 10-15 seconds od retrieval time and I lose the ability to quickly bring up the form.
    Then I looked at using dfferent Query Data Source Types. I don't think I could do one query with counts of detail tables. Besides, some items (attrinutes) of the cell are upate-able.
    Any ideas and suggestions will be appreciated.

    Yes. I suggested adding columns to the master tables and introduce stored triggers.
    Since the change is not trivial, according to management, they put in on hold.I'm not sure if you misunderstood my suggestion or were responding to a different post. The query I wrote was for counting the detail records on the fly rather than populating new columns. If you include the counting in your main query then you will probably not have a much slower query than if you don't show any counts at all. Scrolling through the block will be no slower than if you had no counts, because no extra processing needs to be done. (You'll still have to fetch the detail blocks for each row, so moving to the last record will still be slow - that's a bad indicator of the performance of a query.)
    For example, fetching the objects for each user takes 5 seconds. When I include the number of tables, indexes and constraints for each user within the query the time only goes up to just under 9.
    SQL> set autot trace stat
    SQL> set timing on
    SQL> SELECT
      2    owner,
      3    object_name,
      4    object_type
      5  FROM all_objects ao;
    39062 rows selected.
    Elapsed: 00:00:05.13
    Statistics
           4656  recursive calls
              0  db block gets
          85106  consistent gets
              0  physical reads
              0  redo size
        1469372  bytes sent via SQL*Net to client
          29021  bytes received via SQL*Net from client
           2606  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          39062  rows processed
    SQL> SELECT
      2    owner,
      3    object_name,
      4    object_type,
      5    (SELECT Count(*) FROM all_tables WHERE owner = ao.owner) count_tables,
      6    (SELECT Count(*) FROM all_indexes WHERE owner = ao.owner) count_indexes,
      7    (SELECT Count(*) FROM all_constraints WHERE owner = ao.owner) count_constraints
      8  FROM all_objects ao;
    39062 rows selected.
    Elapsed: 00:00:08.86
    Statistics
           4656  recursive calls
              0  db block gets
         270299  consistent gets
              0  physical reads
              0  redo size
        1684042  bytes sent via SQL*Net to client
          29021  bytes received via SQL*Net from client
           2606  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          39062  rows processed
    SQL> If you populate the counts in post-query then the process is similar to the block below. I tried to get a timing and stats for this but it took over 15 minutes so I shut it down.
    DECLARE
    ct NUMBER;
    ci NUMBER;
    cc NUMBER;
    BEGIN
      FOR ao IN (SELECT owner, object_name, object_type FROM all_objects)
      LOOP
        SELECT Count(*) INTO ct FROM all_tables WHERE owner = ao.owner;
        SELECT Count(*) INTO ci FROM all_indexes WHERE owner = ao.owner;
        SELECT Count(*) INTO cc FROM all_constraints WHERE owner = ao.owner;
      END LOOP;
    END;Creating a view on the query and writing the "instead of" triggers is hopefully a trivial enough operation that management won't get in the way. Then you'll be able to update the block.

  • 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

  • How to count records in a page which are in detail section

    Hi
    Is there a option to count records in detail section and so that based on that can apply a formula.

    Hi
    can i place the below two formulas in section experpt ?
    my report is like
    gh#1 
    details-----which contains transactions related to above group for a country
    group footer#1contains line '--
    if for india there are 3 records in the same page there can be 2 or 3 records in detail section. like that a page can contain more than one country. if number of records are more and coming in next page then the whole section should be moved to new page.
    that is my req. can u suggest accordingly.....
    i want to count the number of records in detais which will vary also how can i put formula when they are going to next page?

  • How to keep details grouped together when have more than 1 details section

    I want to create a report that has two different detail sections, and then have the report first print all of the results of the first detail section (DETAIL A), followed by the results of the second detail section (DETAIL B).
    But CR prints the first line of DETAIL A, followed by the first line of DETAIL B. It then goes on to the second line of DETAIL A, followed by the second line of DETAIL B, and so on.
    Can anyone tell me how to keep DETAIL A together, followed by DETAIL B?
    thx, jon

    Assuming the data for the two formats are not in the same record, add a new field to the data record (or calculate it based on the record's data) with a value of A or B, then group by it.
    If the data IS in the same record (i.e., one data record generating both formats), subreports are the only way that I can think of...
    HTH,
    Carl

  • Keep Together when we have two detail sections

    Post Author: achaithanya
    CA Forum: General
    Hai,
    I have two Detail Sections and when you look at the report data is split and is displayed in two pages. It should be  together. If we have single section then we use Keep Together option. I have tried with this option also.
    1st page end
    AAAA
    BBBB
    aaaa
    bbbbb
    2nd page start
    cccc
    dddd
    Data should not split as above and it should displayed in any one of those pages.
    Thanks in advance,
    Regards,
    Chaithanya.

    Post Author: [email protected]
    CA Forum: General
    keep together is good for that section only. unless there is a parent section that you could turn keep together on,  i don't know of a way

  • Fill the blank detail section with dates

    Hello,
    I'm using Crystal reports X1. I have group by "Ticket Number". In the detail section of the ticket number I have a field that stores a date called "SevDate"
    This is how it looks like
    Ticket Number    SevDate
    IM44-0023546
    IM44-0023546   03/20/2010
    IM44-0023546
    IM44-0023546
    IM44-0023546  
    What I'm trying to do is get this date repeated or filled in the next detail section of the Ticket Number.
    so, basically I'm trying to see the report like this and this should be in a date format so I can do some other calculation.
    Ticket Number    SevDate
    IM44-0023546
    IM44-0023546   03/20/2010
    IM44-0023546   03/20/2010
    IM44-0023546   03/20/2010
    IM44-0023546   03/20/2010
    How can I achieve this task? Please assist...
    Thank you
    Angel

    Let me count the ways...
    1)  If you want the same date for all records for a given ticket number (which actually is not what's shown), then you could group on ticket number and use Maximum(, ) as the field displayed.
    2)  If you want the last non-null SevDate (apparently), you could use a formula like (basic syntax):
    global sevDate as date
    if Not isNull({SevDate}) then
      sevDate = {SevDate}
    end if
    formula = sevDate
    3)  You could change the generation of the data set (use an SQL Command) to return the date you want in each record.
    Which one to use will depend on your requirements...
    HTH,
    Carl

  • When i export library,will it keep the play count?

    when i export library,will it keep the play count so it is the same when i add to another itunes?
    PS iTunes 7 Scuck thats why I want to keep play count so it stays the same when I unistall 7 to put 6 on.
      Windows XP  

    This problem has also been plaguing me today. Here are my specifics and how I solved it (Expanding on what Quentin Holmes mentioned)
    CONFIRMED WORK AROUND! The .m4v file gets created while encoding, but Adobe Media Encoder does not re-pack it back into the .mp4 unless you select the "Export Audio" in Adobe Premier export prior to queuing. If you don't want audio, mute the individual tracks and still export audio.
    My details:
    Just bought a GH4, shooting 4k 25fps MOV, trying to simply trim a few clips and export them as H.264 .mp4 with no audio. (By the way it would be nice if we could export 4k .MOV files from the camera back into .MOV once finished editing, but in premier that frame resolution is not supported)
    Specs: Mac Mini, Quad Core i7, 16GB Ram, OSX 10.9.4, Adobe Premier Pro CS6 6.0.5, Adobe Media Encoder 6.0.2.81
    Hope that helps anyone with the same prob

  • Counting the number of detail records at target side...

    Hi
    I have a requirement where i need to caluclate the number of detail records formed and add it in trailer section...both at target side...
    The output will look like this :
    <Detail>
        <Field></Field>
    </Detail>  
    <Detail>
        <Field></Field>
    </Detail>
    <Detail>
        <Field></Field>
    </Detail>
    <Trailer>
       <Count> 3 </Count>
    </Trailer>
    Basically, In trailer the Count field will contain the number of Detail records.
    Can this be achived by a UDF?? Please help!!!

    Actually teh detail node formation at target depends on a lot of nodes of source side...using Count I have already done it but due to lot of nodes @ source side it becomes kind of a mesh...
    Hence I was trying to figure out a way in which if I can count the number of detail nodes at target side I can remove the present mapping...
    Corect me if I am wrong but can't we declare this target detail node as global variable and then use 'Count' function to capture its occurence???
    P.S : In XI 3.0 we used to have a tab to declare global variables but here in 7.1 we have Functions tab...could anybody tell me how to declare the variable in 7.1?

  • I had a MobileMe account before... after upgrading to iOS 5, should I keep my account info under iCloud (settings) AND under mail, contacts and calendars (in Settings as well) or only keep the info under the new iCloud setting section?

    I had a MobileMe account before... after upgrading to iOS 5, should I keep my account info under iCloud (settings) AND under mail, contacts and calendars (in Settings as well) or only keep the info under the new iCloud setting section?

    That's not the correct port. It should be 993 for incoming.
    If you signed into iCloud from the System Preferences, it should automatically create the iCloud account for you in Mail. Sounds like it is an account you already had set up for MMe in Mail.
    Open Mail preferences, open the Accounts tab, disable that account in the advanced pane.
    Open Sys Prefs, open the iCloud tab, and sign out of iCloud. Then sign back in and see if a new iCloud account is automatically created.

Maybe you are looking for

  • No data in Portal Report but have data in Bex Analyzer

    Hi experts, I have problem regarding portal reports. When you view the report using the bex analyzer, there is data. But when you view the report in the portal from iview, there is no data. Please help experts. Thanks

  • JDBC Sender Adapter for AS/400 DB2 (V5R1) Error

    Hi, I'm trying to create a connection to an DB2 database on an AS/400 (V5R1) server. First does anyone know what JDBC driver I should use for this... I am trying to use the DB2 Universal type 4 JDBC driver... But have a suspicion I should be using th

  • Recovering Recorded Files in GB3

    I switched over from STPro to GB3 for my latest Podcast episode to take advantage of the ability to drop chapters in more seamlessly for Enhanced. What is good about ST Pro is that all files you record go into a "Recording Sessions" folder in case yo

  • How can I turn off the blue tips that pop up every time I start Adobe Reader?

    Every time I start Adobe Reader XI, or every time I double-click a PDF file from another program, a blue bubble pops up under the "Open" portion of the toolbar that says "Easily open all your files across devices" and I cannot make it stop. I have: -

  • Is recognized but won't sync

    My new Ipod shuffle keeps saying its corrupted. I tunes recognizes it (icon shows under devices) but it won't allow me to sync. It prompts for me to restore it and when I do it still says appears to be corrupted.