Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Nested report structure Post Reply Post New Topic
Page  of 2 Next >>
Author Message
lowspark
Newbie
Newbie
Avatar

Joined: 27 Nov 2019
Location: United States
Online Status: Offline
Posts: 20
Quote lowspark Replybullet Topic: Nested report structure
    Posted: 19 Dec 2019 at 1:17pm
New to CR so I Appoloigize if this question is a little on the basic side, I am headed down the path of trying to create a masive report by breaking it down to lots of sub reports but i am having some issues. The goal is a report that is something like this"
Department      # of "Status*" work orders (WO)
            
----sub report of "Status*" WO by type and count of each

--------sub report of each WO by status and type

* Open Or Closed

so for exammple
Bike Department     34 closed work orders
                    52 open work orders
----
34 Closed Work Orders
     Tire Repair    5
     New Breaks     10
     New Cables     14
---------
Closed Work orders for Tire Repairs
WO # 4569    Bob Smith           2.4 hours
WO # 4575    Bruce Collins       2.4 hours
WO # 4968    Janna Robinson      2.4 hours
WO # 5236    Jason Grant        2.4 hours
WO # 6985    Jerry Garcia        2.4 hours



Sorry for the crazy lay out. I am having a hard time trying to Find out how to do this based on having a hard time explaining it in terms for CR. Thank you in advance for any guidance!!
       
Nothing left to do but Smile, Smile, Smile.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Dec 2019 at 8:40am
I don't think sub reports will work for you if you want to summarize the data from the SR into the main report. I would recommend rethinking this to just grouping.
IP IP Logged
lowspark
Newbie
Newbie
Avatar

Joined: 27 Nov 2019
Location: United States
Online Status: Offline
Posts: 20
Quote lowspark Replybullet Posted: 24 Dec 2019 at 6:01am
Is it possible to point me to some good resources on how I might pull this off with Grouping? Thanks for you guidance.
Nothing left to do but Smile, Smile, Smile.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 24 Dec 2019 at 6:08am
Same as your other request.
You need one data set that has all the data you need in it.
group 1
Group on Department
In a GHb
add a Crosstab or two running totals to get your department summary
Group 2
Group on Status (open/closed)
use a crosstab in gh2b to display the type counts
put distinct data in the details section
IP IP Logged
lowspark
Newbie
Newbie
Avatar

Joined: 27 Nov 2019
Location: United States
Online Status: Offline
Posts: 20
Quote lowspark Replybullet Posted: 26 Dec 2019 at 10:22am


I have moved over to Groups but now i have some issues with totals. This is where I am in the process:
Group 1 Department
   Group 2 Status and Count of WORKORDER.STATUS
-this count is a summary if Status and sum as count
      Group 3 Workorder (Hide Drill-Down ok)

At this point all is good. The idea is for group 3 to be clicked on and the all the info for Department+ Status is shown, so when it says:
Trash Department
     Closed             102
     Open               38
Click on Closed and the info for the 38 Workorders will then open.
The issue I am having is when I add to Group 3 like Description so that i now looks like..
Group 3 Workorder and Description (Hide Drill-Down ok)

The Count for Closed and Open change to 98 and 27 respectively. Not relay sure what the step is to make those numbers stick..   the 102 and 38 are the correct numbers based on some other QC reports i have created


Nothing left to do but Smile, Smile, Smile.
IP IP Logged
lowspark
Newbie
Newbie
Avatar

Joined: 27 Nov 2019
Location: United States
Online Status: Offline
Posts: 20
Quote lowspark Replybullet Posted: 26 Dec 2019 at 10:35am
So it seems that I have work orders that have more than one description on them so when I add description to the data to report it counts the the work order every time it comes up , i need to find out a way to count unique Work Order ID's
Nothing left to do but Smile, Smile, Smile.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Dec 2019 at 7:59am
do a distinct count of WorkOrderID as your summary at any group level
IP IP Logged
lowspark
Newbie
Newbie
Avatar

Joined: 27 Nov 2019
Location: United States
Online Status: Offline
Posts: 20
Quote lowspark Replybullet Posted: 30 Dec 2019 at 9:19am
all that seems to do is count all the Work Order ID's this is what i did :
Group 1:
@Department      _CountDC        Catogory_SUM

_______
@Department = if {WORKORDER.WOCATEGORY}= "VM" then "VEHICLE MAINTENANCE" else {WORKORDER.WOCATEGORY}

_CountDC = distinctcount({WORKORDER.WORKORDERID})

Catigiry_Sum = Summary on WO Category, Calculate as Count

---------- this is what it returns
Facilities     897      508
Parks          897      215
Streets        897      419

just not sure where I am going wrong
Nothing left to do but Smile, Smile, Smile.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Dec 2019 at 10:06am
The distinct count can be used at the report level (all)

or also at each group level say if you grouped by @department.
Or add a crosstab to your report header and add the column in the rows by your @programs and the summary field as the distinct count of WOid.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Dec 2019 at 10:08am
the group level would be
distinctcount({WORKORDER.WORKORDERID},{@Department})
IP IP Logged
Page  of 2 Next >>
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.008 seconds.