Counting records in crosstab report

I am very new to the reporting world so apologies if this seems so simple.
I am trying to understand how count records that meet certain criteria and I am at a loss as to how to make it work (Crystal Reports 2008)
I am setting up a cross tab report where I am want to count records that vwSubscription.status="Active" AND vwSubscription.isDues=True
I think I should be creating a Formula Field that tests the status and dues record and when they both meet the correct criteria then have the Formula Field in the Summarized field of the Cross Tab Expert...
make sense? please help

Yes. You should create a formula like this
IF vwSubscription.status="Active" AND vwSubscription.isDues=True THEN
1
And in Cross tab Create A Sum  of this field under Summary fields.
If you want this value to be displayed based on some group, cross tab will be a good option, else you can create a sum of this field and place it in Report header to get the total.
HTH,
Jyothi

Similar Messages

  • Invalid Leaf Count Record

    When I repaired my startup disk with Disk Utility, an invalid leaf count record error was reported. From looking at other posts, it appears that one of the recommended things to do for this is trying to repair the issue with Disk Utility. I tried this using Disk Utility 4.1. I replaced my directory with the rebuilt directory. Unfortunately, when I started back up from my install CD and ran Repair Disk, the invalid leaf count record error was reported again.
    Any advice would be much appreciated... maybe I did something wrong.
    Thanks

    First, I realized that I had the error message wrong. I should have wrote "Invalid Leaf Record Count" originally instead of "Invalid Leaf Count Record". I doubt this makes a difference, but just in case there it is.
    Secondly, I am running 10.3.9 and have been doing so for quite some time. My understanding based on this is that DiskWarrior 4.1 should work. I took your advice and tried running DiskWarrior again. As I did previously, I simply booted from DiskWarrior because the disk I am trying to fix is my startup disk. I rebuilt and replaced the directory with DiskWarrior 4.1 again. As a matter of fact, I ran it multiple times while I had it going. I even ran it under the scavenge mode.
    After doing this, I restarted the computer, ejected the DiskWarrior disc, and put in my install disc that came with my iMac. I booted from this CD and reran "Repair Disk" with Disk Utility. The error stills shows up. One thing to note is that my install disc came with 10.3.5 on it. Could this somehow cause a problem? My understanding is that you should always use an install disc for the major OS version you are running to run the "Repair Disk" function of Disk Utility. For example use an install disc for 10.3 if you are trying to repair a disk running 10.3.x or use an install disc for 10.4 if you are trying to repair a disk running 10.4.x.
    Prior to ever running DiskWarrior, I used the fsck command from single-user mode. Interestingly, the error did not show up here. I thought the "Repair Disk" function with Disk Utility was similar to this command, but maybe there is enough variation to cause the difference. Do you guys have any idea, which one I should trust?
    Let me know if any of this is incorrect. Any other suggestions regarding this error would be welcomed. I don't really understand what the error itself means. For now, I guess I will just leave it since I don't really know what else to do. Maybe in the future it will get worse and DiskWarrior will recognize it... I know that's asking for a problem!

  • How to count records from 2 tables and show in RDLC Report

    hi all,
    its being a one day searching for the solution but No Luck.
     I have two SQL tables tblstudetail and tblfeereceiptdetail.
    i just want to count records from both tables and show in RDLC report.
    I tried SQl Query Like This:
    select a.session, a.course,
    Count(CASE a.ADstatus WHEN 'OK' THEN 1 ELSE 0 END ) AS Admission,
    Count(CASE s .I_receiptstatus WHEN 'OK' THEN 1 ELSE 0 END) AS Feeprint
    from
    tblstudetail a
    FULL join
    tblfeereceiptdetail s on s.studentID = a.studentID
    where a.session = '2015' AND s.Fsession = '2015' AND a.adcat = 'Regular'
    GROUP BY a.session,a.course
    ORDER by a.course
    The result Show the Same Value in Both columns
    Session    Course      Admission       FeeDetail
    2015          B.A. I               275              275
    2015          B.A. II              307             307
    2015         B.A. III             255            255
    2015          B.Sc. I             110             110
    2015           B.Sc. II           105            105
    2015          B.Sc. III            64               64
    Actully I want to Count How many ADMISSION have been Taken(FROM tblstudetail) and How many FEE RECEIPT have been Print (From tblfeereceiptdetail).
    please guide me for this as soon as possible.
    thanks in advance...

    I am counting 'OK' in both the table columns I.e 'ADstatus' in tblstudetail and 'feereceiptstatus' in tblfeereceiptdetail
    please suggest me

  • COUNTING RECORDS AND DETERMINING AVERAGES IN REPORT WRITER

    I HAVE 10 GROUPS. I WANT TO BE ABLE TO COUNT RECORDS AND DETERMINE THE AVERAGE DAYS FOR EACH GROUP. I GET DAYS BY SUBTRACTING THE RECEIVED DATE FROM THE RESULT DATE. I WANT TO DETERMINE THE AVERAGE DAYS AND THE NUMBER OF RECORDS IN THE TOP 10%, THE TOP 20%, THE TOP 30%, THE TOP 40%, THE TOP 50%, THE TOP 60%, THE TOP 70%, THE TOP 80%, THE TOP 90%, AND THE TOP 100%. HOW DO I CODE MY LOOP IN PLSQL TO DO THIS? CAN I DO THIS IN REPORT WRITER?

    I am not sure about the exact thing that you are requiring. but you can get the top 100 and top 20 or top 300 etc. by using the ROWNUM function in sql statement.
    thanks

  • Crystal Repts XI - Adding labels to summary fields in crosstab report

    I have a crosstab report where
    Columns
    first-level are priority or non-priority schools
    second-level are priority type
    Rows
    First-level: month
    second-level: count of calls opened this month; sum of time spent; opened prior to reportstart and still open, closed this month
    The row label for sum of time spent specifies that the time is in hours.  However, our Curriculum and Instruction department wants each data cell in that row to include the abbreviation hrs.  In other words, the row label would say Time spent on requests closed this month(hrs) and each cell would say 10.5 hrs  2 hrs, etc.  Can anyone help with this?

    Thank you!  This solved my problem.  It took me awhile to find where I could change the currency sign to display on the right but once I did it worked like a charm (we're and educational system, we rarely get to report on money).
    For others who don't know where to find this:
    - right click the field and select Format Field
    - on the Number tab of the format editor, select Display Currency Symbol
    - click Customize
    - click the Currency Symbol tab of the Custom Style Editor
    - in the Position menu choose the selection with the currency symbol on the right
    - in the Currency Symbol box type hrs.
    Save, save, and done!

  • Count( ) function in BIP Report

    Hello,
    Can someone please help me with my count( ) function in BIP reports? I have this code in my RTF template below that only count 1 per ssImageType
    <?xdofx:if (ssStatus='Closed') and (ssGroup='EDS OPS') then count((/ssAction=/ssImageType))?><?end-if?>
    The undesired result is coming up below:
    Image Type A = 1
    Image Type A = 1
    Image Type A = 1
    Image Type B = 1
    Where we wanted it to come up as
    Image Type A = 3
    Image Type B = 1
    Image Type C = 0
    Any help would be greatly appreciated.
    Thank you

    What is the item that you want to count? I don't understand what you are trying to do here: count((/ssAction=/ssImageType))?
    If status is closed and ssGroup = EDS OPS, and ssAction = ssImageType, then you want to count the number of records?
    If you want to, send me the rtf and xml file to [email protected] and I can take a look. Send me the exact specification..
    Thanks,
    Bipuser

  • Need help Updating Records in a Report Region

    We have created some javascript to check a drop down used in a report region.
    This is the way the report is supposed to work:
    The first time the user comes to this screen he will go down the list and select a value of '1' or '2' for col2.
    When col2 drop down has a value of 1 then we want to disable col3 and col4.
    Then the user will click on the Submit button.
    When he clicks on the Submit button then we want to set col4 to have a value of sysdate in the database table for any record where col2 had a value of 1.
    The next time the user comes to this screen he will select values for col3 and col4 of the records that col2 had a value of 2 (meaning col3 and col4 are enabled)
    This works fine if there is only one record in the report region.
    The problem is when we have more than one record.
    for example:
    Say we have two records...
    for record1 the user selects '1' for col2 and for record2 the user selects '2' for col2.
    When the user clicks on the Submit button col3 and col4 get disabled and col4 gets set to sysdate for record1, while col3 and col4 remain available but empty (because the user has not made a selection for these columns at this point) for record2.
    When the user comes back to this screen he now selects a value for col3 and picks a date for col4 for record2. When he clicks on the Submit button the value for col3 and the date entered in col4 for record2 should get updated in the database table and it is but the col3 value and the col4 date is being inverted with record1's data for some reason.
    Can you please tell me how to fix this?
    This is what the user has selected on the screen:
    (COL2) (COL3) (COL4)
    Requested? Granted? Response Date
    Record1 NO - 13-APR-09
    Record2 YES YES 20-APR-09
    After the user clicks on the Submit button this is how the screen displays it back:
    (COL2) (COL3) (COL4)
    Requested? Granted? Response Date
    Record1 NO YES 20-APR-09
    Record2 YES N/A 13-APR-09
    I am including the code from my update staement below:
    DECLARE
    A_ID NUMBER;
    requested NUMBER;
    grnted NUMBER;
    respdate DATE;
    f01 = AID ID
    f02 = REQUESTED YES OR NO
    F03 = GRANTED YES OR NO
    F04 = RESPONSE DATE
    BEGIN
    FOR i IN 1..HTMLDB_APPLICATION.G_F01.COUNT LOOP
    BEGIN
    A_ID      := HTMLDB_APPLICATION.G_F01(i); -- this is hidden
    requested := HTMLDB_APPLICATION.G_F02(i); -- (YES or NO)
    grnted := HTMLDB_APPLICATION.G_F03(i); -- (YES or NO)
    respdate := to_date(HTMLDB_APPLICATION.G_F04(i),'MM/DD/YYYY');
    EXCEPTION
    WHEN OTHERS THEN
    A_ID      := HTMLDB_APPLICATION.G_F01(i); -- this is hidden
    requested := HTMLDB_APPLICATION.G_F02(i); -- (YES or NO)
    grnted := 3; -- (YES or NO)
    respdate := sysdate;
    END;
    UPDATE TBL_AIT
    SET b_requested_id = requested,
    b_granted_id = grnted,
    b_response_date = respdate
    WHERE ait_id = A_ID;
    END LOOP;
    END;

    Hi,
    Any disabled items are not submitted with the page - therefore, your f03 and f04 collections would be one value short. This is a browser feature rather than an Apex feature.
    You can get around this by enabling all items before the submit takes place. Have a look at: Re: A better method of handling tabular forms with variable column type? This is for disabling items mainly, but includes an enableItems() javascript function that should help you.
    Andy

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

  • Drill down in crosstab report

    I'm working with a crosstab report displaying summary accounts on each row & current and prior year on each column. I'd like to create a drill down function for each of the summary accounts rows so that when I click on a summary account, the dept# that made up this summary total will be displayed either on a separate report or below the summary account that I click.
    Any help would be greatly appreciated.  Thank you.
    This is what I want to create:
    SUMMARY ACCOUNT               FY2014     FY2013
    600001 - SALARIES               500        380    (i.e. able to drill down to dept below when 600001 is clicked)
        701000 - ER DEPT            200        175
        757000 - CATH LAB           150        210
        848000 - INFO SYSTEM        100         65
        851000 - ACCOUNTING          50         50
    710002 - BENEFITS               150        140
        881000 - HUMAN RES          135        130
        900000 - OTHERS              15         10
    711003 - SUPPLIES               XXX        XXX

    Thank you for the referenced thread.  I've copied your answer on the thread to this reply below.
    However, I do have a few question in following thru your instructions:
    1.  How do you procede with the 1st 3 bullets below?
    2.  What or where is the Business Object Platform?
    3.  What or where is the "Repository"
    Please advice.  Thank you.
    Here are a few ways you can drill-down into a cross-tab (all of them are workarounds by the way).
    The first method is using Report Parts or ‘Another Report Object’ and the second method is using an ‘OpenDoc’ URL
    Both the methods need the target report (report that is opened when drilled into) to have the same groups as the Crosstab
    The ‘Another Report Object’ can be setup in the following way:
    The target report needs to saved to the BusinessObjects Platform first
    Open the target report in the Crystal Report designer from the ‘Repository’
    Assuming the groups have been setup properly, click on any field in the details section and ‘Copy’ (Ctrl+C)
    Open the Report with the Crosstab
    Right-click the Summary Field on the Crosstab and go to ‘Format Field’ > Hyperlink
    Then Check ‘Another Report Object’ and click on ‘Paste’
    All the required information should be populated automatically
    This is how the Data Context should look like:
    “/”+GridRowColumnValue(“Customer.Country”)+”/”+ GridRowColumnValue(“Customer.Region”)+”/”+ GridRowColumnValue(“Customer.Customer Name”)
    Where “Country” and “Region” are rows in the Crosstab, “Customer Name” is a column in the crosstab.
    Similarly, “Country”, “Region” and “Customer Name” are groups on the target report
    So, the above formula would make sure the report drills-down to the last group
    The next method using ‘OpenDoc’ makes use of the opendocument URL and passes values from the Crosstab to the target report’s parameters
    Here’s how we can set this up:
    The basic design of the Main report and the target report would be the same as in above, however we would need to create parameters that correspond to the groups on the target report
    In this case, we would create three parameters – Country, Region and Customer Name
    We would use these parameters as filters on the target report and our record selection formula would look like this:
    {Country} = {?Country} and {Region} = {?Region} and {Customer Name} = {?Customer Name}
    We would then link the Main reports ‘Country’, ‘Region’ and ‘Customer Name’ with these parameters
    Now on the Main report Right-click the Summary Field on the Crosstab and go to ‘Format Field’ > Hyperlink
    Check the option ‘A Website on the Internet’ and click on the formula button in ‘Hyperlink information:”; the formula should be as follows:
    “/OpenDocument/opendoc/openDocument.jsp?iDocID=6472&lsSCountry=”&GridRowColumnValue(“Customer.Country”)&” &lsSRegion=”&GridRowColumnValue(“Customer.Region”)&” &lsSCustomer+Name=”&GridRowColumnValue(“Customer.Customer Name”)
    When any summary value is clicked in the Cross-tab, the corresponding Country, Region and Customer Name are passed as values to the parameters of the target report
    Hope this helps!
    -Abhilash

  • Data missing in Crosstab report with calculated field via case when

    I use the Oracle 10g discoverer. When I create a crosstab report with a calculate field via function case when and put it as datapoint, some of the data is not showing. I tried to not use the case when function for the calculate field, then all the data show.
    I really do not the reason. Could anybody help me out with many thanks?

    Let me explain more.
    I have the original data below.
    Work order, Team, Hours_worked, date
    800001, S1, 5, 2012/01/01
    800001, S1, 15, 2012/01/10
    800001, S2, 4, 2012/01/04
    800002, S1, 3, 2012/01/15
    There are multipul records for the same work order, team on the same day or different.
    Finally I want to set the start date and end date as the parameter to create a crosstab report format like
    start date>=2012/01/01 and close date<=2012/01/05
    Team
    Total hours total hours within the range
    Work order S1 S2 ... S1 S2 ...
    800001 20 4 5 4
    800002 3 0 0 0
    in order to do it, I create two parameters independently start date and close date. Then I create a calculate field hours_worked_withinrange via
    Case when date>=:start date and date<=:end date then Hours_worked else 0 end
    This calculated field is correct in the tabular format report in discoverer desktop. But when I duplicate the list as crosstab. Some data is missing in crosstab data point.
    I checked once I change the calculate field defination not use case when. (For example, C1=hours_worked*2). Then everything runs correct.

  • How to inlcude all records in a report, with a formula result of 0 or 0?

    I'm reporting on classes scheduled for a certain location, and calculating the number of available seats per class. A formula will give me the net seats available (Max seats-count of students). BUT if there are no students enrolled, class does not appear on the report. Formula is {SCHEDULES.qy_sch_max} - Count ({WAITING_LISTS.no_emp}, {SCHEDULES.cd_crs)
    What am I missing? Currently using Crystal 8.5 and reporting against a SQL database.
    Appreciate your help.
    christi

A: How to inlcude all records in a report, with a formula result of 0 or >0?

thanks, Sanjay - been there done that.
basically, I need to show the net result for the open seats available,which will be the same as the max seats offered.
I tried the following:
If Isnull{WAITING_LISTS.no_emp}
then {@Open}={SCHEDULES.qy_sch_max}
else
{SCHEDULES.qy_sch_max} - Count ({WAITING_LISTS.no_emp}, {SCHEDULES.cd_crs})
and got a message "Missing the then".  (@Open is the formula title)

thanks, Sanjay - been there done that.
basically, I need to show the net result for the open seats available,which will be the same as the max seats offered.
I tried the following:
If Isnull{WAITING_LISTS.no_emp}
then {@Open}={SCHEDULES.qy_sch_max}
else
{SCHEDULES.qy_sch_max} - Count ({WAITING_LISTS.no_emp}, {SCHEDULES.cd_crs})
and got a message "Missing the then".  (@Open is the formula title)

  • How can I numbered the records in the report

    Hi, can anyone please show me how do I number the records in the reports in the Report Builder?
    Thank you.

    Hi,
    Follow the following steps:
    1. Create a summary column in the data model of the report.
    2. Select the function as Count.
    3. Select the source for which you want to generate the serial no.
    4.Reset the column at Report level.
    5. Now create a field in the paper layout of the report and select this summary column as the source. The field should be in the same repeating frame as its source.
    This will generate the nos. as reqd.
    Swati

  • Count records based on detail row containing a null date field

    i need to count the no of rows where a date field is null and print the result in each group footer. the formula isnull works well in details section  but not when I create a running total to count records where evaluate condition is based on a formula and when i test isnull(field) ?
    works in detail section:
    Global NumberVar numOpen;
    if (IsNull({db.DateField}))
    then numOpen := numOpen + 1;
    does not work in group footer?
    IsNull({db.DateField})

    Abhilash Kumar wrote:
    Well, what database are you reporting off and how did you insert a NULL value to the date column?
    In my case, I have worked with Oracle, Access, and now SQL.,
    and have used several different versions of Crysal (but never XI)
    I/we don't put anything into the date...  the field is simply empty and I use 
    IsNull({datefield})
    also for numbers (&currency)
    IsNull({numberfield})
    For text fields I now use
    IsNull({textfield}) or {textfield} not equal ""
    as SQL is a little funny about the empty text fields. Sometimes one works and sometimes the other so I use both.
    Debi

  • Showing zero values in crosstab report

    Hello.
    I have a crosstab report (in desktop) that is used as a raw data extract to populate an excel spreadsheet.
    In order for this to work without having to adjust the spreadsheet every time the columns have to be the same, each time it's exported across.
    However, when a particular column doesn't have any data for that month Discoverer doesn't show it, which means the columns that go across to excel are in a different order and the formulas are out of sync.
    I'm sure I've come across a setting to show all columns, including those with no data, but I can't find it and I'm starting to think I imagined it?
    Thanks in advance

    Hi,
    I'm sure I've come across a setting to show all columnswhat you described is no settings issue.
    its the data you have or actually don't have.
    the cross tab is dynamic display so that if you do not have data in the database it will not be displayed.
    however you can manipulate the table by adding dummy records to your table so that you will still see it,
    for example if you want to see a record for Jan-12 then add a dummy record for this month with every other columns as NULL or 0 (depends on your business logic).
    Tamir

  • Crosstab report with null or wrong totals

    I have a crosstab report that when I put a field in an item report area and setting <all> for values I get null values and with other fields I get wrong results (less than I wait). If there's no report item, it's return the correct results.
    I have checked the SQL and it not return any null value.
    I believe that the crosstab try to aggragate and sum the null values of the empty cells in my crosstab.
    Anyone knows how to fix it?
    I'm using Discoverer 10g Desktop.

    can you send your xml data and template to [email protected]

  • Maybe you are looking for

    • Error while validating flat file schema

      Hi, I have the flat file schema which is character delimited on '|'. It has Details and Tralier. Trailer starts with a "Tag Identifier" as 'T' and can have one value as "Total Records" i.e. T|3. Details is also delimited on the base of '|' and but ha

    • Safari 5.1.5 not redirecting (10.6.8)

      Today, I have been having problems with Safari on a local WiFi spot (which Firefox doesn't have problems with) - with Firefox, I get the iniitial screen with a login button, click on that, get asked about it redirecting (to the - firewall? - server,

    • How to move text in a text box

      Please help me put to move text inside a text box to move smoothly If anybody can provide me with the code, I will be thankful to him.

    • Is sign/pre-signing for your device necessary?

      Hi, I'm an American living overseas and I recently bought an ipod online. The ipod will be shipped to a forwarding address in the U.S. The problem is that I can't sign or pre-sign for the delivery. Is there anything else I can do? Thanks.

    • Possible classpath errors

      Hello all first off i'm not new to java, but i am wroking on a linux machine here and having problems running my java code. The code compiles properly however when i attempt to run i get the no callDefFound error. I know i'm spelling everything corre