Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: how to display the minimum and maximum values Post Reply Post New Topic
Author Message
NewCRuser
Newbie
Newbie


Joined: 28 Jan 2014
Online Status: Offline
Posts: 7
Quote NewCRuser Replybullet Topic: how to display the minimum and maximum values
     Posted: 28 Jan 2014 at 2:37pm
Hi guys, Good day!

I am creating a report that will show the team / person whose ticket was assigned to. Hope you could help on this.

in the table, it includes the following fields: Task ID, resource_name, date assigned.

for example, i have ticket number 1001
Task ID     Assigned To
1               A
2               B
3               C

I can only display the minimum or the maximum value of Task_ID either 1 or 3 per line by using a formula.

My formula to get the last person assigned to ( which is "C" in our example ) is this : I created {@max} = maximum{taskid}, in suppress section in details, I made this condition: if {@max} - TaskID > 0 then true else false. ( note that the values of TaskID is not constant, it could only be 1 if the assigned team already resolved the issue )
Is it possible to display TaskID 1 and TaskID 3 in a single row but different columns? Here's the expected output of the report:
Task ID   Task ID    First_Assigned To    LastAssignedto
1             3          A                      C

Thanks in advance!
IP IP Logged
NewCRuser
Newbie
Newbie


Joined: 28 Jan 2014
Online Status: Offline
Posts: 7
Quote NewCRuser Replybullet Posted: 29 Jan 2014 at 12:28am
Kindly assist me on this please. Thanks.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 29 Jan 2014 at 5:09am
if this is just going to be 1 row per ticket, you could something like this:
in group header Ticket:
shared numbervar taskID:={table.taskID};
shared stringvar assignedTo:={table.assignedTo};
"" // hide the output

suppress the group header and details
in the group footer Ticket
you would display the current TaskID and Assigned To (drop the field from the datatable onto the report) and
create 2 formulas like:
shared numbevar taskID;

and
shared stringvar assignedTo;

drop the 2 formulas onto the report and this will give you the first and last task and assigned to.

HTH
IP IP Logged
NewCRuser
Newbie
Newbie


Joined: 28 Jan 2014
Online Status: Offline
Posts: 7
Quote NewCRuser Replybullet Posted: 29 Jan 2014 at 7:04pm
Hi Thanks for the reply. I think it will still display more than 1 row if TaskID>1

What I need to display is TaskID = 1 and Max TaskID in one row.
example:
Ticket 1 TaskID1   MaxTaskID

Thanks again for the reply.

IP IP Logged
NewCRuser
Newbie
Newbie


Joined: 28 Jan 2014
Online Status: Offline
Posts: 7
Quote NewCRuser Replybullet Posted: 29 Jan 2014 at 10:03pm
@lockwelle, I tried the formula, but it only displays 1 TaskID.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 30 Jan 2014 at 5:02am
there would be a total of 3 formulas. 1 in the group header and 2 in the group footer, you would also need to order your group by the task id for everything to work as expected.
IP IP Logged
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