Report Count IIF Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SusanK4305
    New Member
    • Sep 2010
    • 88

    Report Count IIF Help

    I have a Count IIF statement that needs to be fixed.
    This is in an unbound txt field in Report1.

    Report1's Record source is qurReport1 (combined by 2 tbls...tblPosit ion Data and tblAction Log).

    Field of the query are...
    tblPosition Information_ID: ID (Auto #)
    Position (dropdown from tblPosition Choices)
    Program Element (dropdown from tblProgram Element Choices)
    Reinvestigation (yes/no check box)
    Action Type (dropdown from tblAction Choices)
    Action Date( date/time field but only an input mask of mm/dd/yyyy)

    This is what is in the Controle Soucer of the txt box:
    =Sum(IIf([qurReport1]![Position Information].[Position]='Contractor',[tblAction Log].[Action Type]="Delayed",1,0) )

    I started out w/ =Sum(IIf([tblAction Log].[Action Type]="Delayed",1,0) ) but need to add more criterias. (i.e. Position= Contractor)

    I have also tried: =Count(IIf([tblAction Log].[Action Type]="Delayed",1,0) )... but jut get the total number of records no matter what I put for Action Type.
    What is the best way to get a report that will count all Action Types between [start date] and [end date] that meet both criterias (Contractor and Action Type=Delayed)
  • SusanK4305
    New Member
    • Sep 2010
    • 88

    #2
    Thanks for ya'lls help. I have fig. it out. It was one of those things that you just want to kick your self for not seeing it.

    This is what I did.
    I used the wizard to create 2 sub reports "Report Position" and "Report Program Element" in side an unbound Report "Report1".
    In the wizard I ues the matching query for the sub reports. (i.e. "qurPositio n" was uesed for "Report Position")My date field in both queries are CountOfAction Date.
    ** How you get a CountOf field... open your qur, and rt click where your date is (or what ever group you want to count)then sellect Total. In the "Total:" line select "Count" and there you go**

    Grouping selections are Position and Action Type then finished making the report.
    I then opened the report and added a nother Sorting and Grouping. I added CountOfAction Date. Changed the Group heading to "Yes" and left the rest as defualt settings.
    ** the CountOfAction Date field should be placed under the assigned header (i.e. CountOfAction Date Header).

    All that is left to do is place the sub reports in your unbound reprot if you didn't create it there to start with.

    Comment

    Working...