AnnetteB1305
Technical User
Hello,
I have already posted re this chart but this is a new issue. I have a report which now has 5 sub reports the sub reports are graphs and crosstabs based on various data. It is the final section which is giving me issues. This final section of the report is to show the number of calls that were still open by day in the last 8 days. These are then split into priority and also calls that are placed on hold. So the graph currently shows a count of the calls for High,Med and Low priority calls and then a bar which shows the total of these three priorities per day. Showing 4 risers per day.
The cross tab which is on a separate sub report is actually a manual cross tab as there are so many formulae, it was the only way I could get it to work. On the cross tab there is as the graph but there is also a row which shows the calls that were on hold in that day and I need this on the graph also.
The sub report that the graph is formed from is on a command which is as follows:-
SELECT `opencall1`.`priority`,`opencall1`.`callref`, `opencall1`.`priority`, `opencall1`.`logdate`, `opencall1`.`closedate`, `mdis_status1`.`status_description`, `opencall1`.`cust_id`, `opencall1`.`suppgroup`, `updatedb1`.`updatetxt`
FROM (`swdata`.`opencall` `opencall1` INNER JOIN `swdata`.`updatedb` `updatedb1` ON `opencall1`.`callref`=`updatedb1`.`callref`) INNER JOIN `swdata`.`mdis_status` `mdis_status1` ON `opencall1`.`status`=`mdis_status1`.`status_code`
WHERE `opencall1`.`priority`<>'NL-MDIS SALES OFF SEND'
and (`opencall1`.`closedate`='' or
(concat(substring(`opencall1`.`closedate`,7,4),'-',substring(`opencall1`.`closedate`,4,2),'-',substring(`opencall1`.`closedate`,1,2),' ',
substring(`opencall1`.`closedate`,12,2),':',substring(`opencall1`.`closedate`,15,2),':',substring(`opencall1`.`closedate`,18,2))
>date_format(date_add(curdate(),interval -8 day),'%Y-%m-%d %H:%i:%S')
) =1)
union all
SELECT 'All',`opencall1`.`callref`, `opencall1`.`priority`, `opencall1`.`logdate`, `opencall1`.`closedate`, `mdis_status1`.`status_description`, `opencall1`.`cust_id`, `opencall1`.`suppgroup`, `updatedb1`.`updatetxt`
FROM (`swdata`.`opencall` `opencall1` INNER JOIN `swdata`.`updatedb` `updatedb1` ON `opencall1`.`callref`=`updatedb1`.`callref`) INNER JOIN `swdata`.`mdis_status` `mdis_status1` ON `opencall1`.`status`=`mdis_status1`.`status_code`
WHERE `opencall1`.`priority`<>'NL-MDIS SALES OFF SEND'
and (`opencall1`.`closedate`='' or
(concat(substring(`opencall1`.`closedate`,7,4),'-',substring(`opencall1`.`closedate`,4,2),'-',substring(`opencall1`.`closedate`,1,2),' ',
substring(`opencall1`.`closedate`,12,2),':',substring(`opencall1`.`closedate`,15,2),':',substring(`opencall1`.`closedate`,18,2))
>date_format(date_add(curdate(),interval -8 day),'%Y-%m-%d %H:%i:%S')
) =1)
ORDER BY 1
The graph is then made up as follows:-
Advanced Bar chart which I have had to swap series and groups and colour by series
On change of command.all and then I have show values as follows
Distinct Count of @count1
Distinct Count of @count2
Distinct Count of @count3
Distinct Count of @count4
Distinct Count of @count5
Distinct Count of @count6
Distinct Count of @count7
Distinct Count of @count8
The count formula are as follows:-
If {@logdate}<=dateadd("d",-8,CurrentDate)and (isnull({Command.closedate}) or {@Closedate}>dateadd("d",-8,CurrentDate))
then {Command.callref} else tonumber ({@@null})
and so on up to Day before current date
The crosstab subreport sql query is as follows:-
SELECT `opencall1`.`callref`, `opencall1`.`priority`, `opencall1`.`logdate`, `opencall1`.`closedate`, `mdis_status1`.`status_description`, `opencall1`.`cust_id`, `opencall1`.`suppgroup`, `updatedb1`.`updatetxt`
FROM (`swdata`.`opencall` `opencall1` INNER JOIN `swdata`.`updatedb` `updatedb1` ON `opencall1`.`callref`=`updatedb1`.`callref`) INNER JOIN `swdata`.`mdis_status` `mdis_status1` ON `opencall1`.`status`=`mdis_status1`.`status_code`
WHERE `opencall1`.`priority`<>'NL-MDIS SALES OFF SEND'
ORDER BY `opencall1`.`priority`
The onhold formulae on my cross tab are as follows:-
//@OnHold1
If date({Command.logdate})<currentdate and ({@Closedate}>dateadd("d",-8,currentdate) or {Command.closedate}='')
and{Command.updatetxt} like "*placed on hold*"
then {Command.callref} else tonumber ({@@null})
and so on again till @onhold8 which is the date before the current date.
Obviously I have just tried to add them to the report but it does not make any sense.
So is this possible to add to my chart or am I trying to blow crystal up or maybe there is a simpler formula and then it would make it possible. I have been known to try and make things more complicated than they are or need to be!!
Any help would be greatly appreciated but if you think this is impossible, please let me know
Thanks in advance
Annette
Final section of report attached
I have already posted re this chart but this is a new issue. I have a report which now has 5 sub reports the sub reports are graphs and crosstabs based on various data. It is the final section which is giving me issues. This final section of the report is to show the number of calls that were still open by day in the last 8 days. These are then split into priority and also calls that are placed on hold. So the graph currently shows a count of the calls for High,Med and Low priority calls and then a bar which shows the total of these three priorities per day. Showing 4 risers per day.
The cross tab which is on a separate sub report is actually a manual cross tab as there are so many formulae, it was the only way I could get it to work. On the cross tab there is as the graph but there is also a row which shows the calls that were on hold in that day and I need this on the graph also.
The sub report that the graph is formed from is on a command which is as follows:-
SELECT `opencall1`.`priority`,`opencall1`.`callref`, `opencall1`.`priority`, `opencall1`.`logdate`, `opencall1`.`closedate`, `mdis_status1`.`status_description`, `opencall1`.`cust_id`, `opencall1`.`suppgroup`, `updatedb1`.`updatetxt`
FROM (`swdata`.`opencall` `opencall1` INNER JOIN `swdata`.`updatedb` `updatedb1` ON `opencall1`.`callref`=`updatedb1`.`callref`) INNER JOIN `swdata`.`mdis_status` `mdis_status1` ON `opencall1`.`status`=`mdis_status1`.`status_code`
WHERE `opencall1`.`priority`<>'NL-MDIS SALES OFF SEND'
and (`opencall1`.`closedate`='' or
(concat(substring(`opencall1`.`closedate`,7,4),'-',substring(`opencall1`.`closedate`,4,2),'-',substring(`opencall1`.`closedate`,1,2),' ',
substring(`opencall1`.`closedate`,12,2),':',substring(`opencall1`.`closedate`,15,2),':',substring(`opencall1`.`closedate`,18,2))
>date_format(date_add(curdate(),interval -8 day),'%Y-%m-%d %H:%i:%S')
) =1)
union all
SELECT 'All',`opencall1`.`callref`, `opencall1`.`priority`, `opencall1`.`logdate`, `opencall1`.`closedate`, `mdis_status1`.`status_description`, `opencall1`.`cust_id`, `opencall1`.`suppgroup`, `updatedb1`.`updatetxt`
FROM (`swdata`.`opencall` `opencall1` INNER JOIN `swdata`.`updatedb` `updatedb1` ON `opencall1`.`callref`=`updatedb1`.`callref`) INNER JOIN `swdata`.`mdis_status` `mdis_status1` ON `opencall1`.`status`=`mdis_status1`.`status_code`
WHERE `opencall1`.`priority`<>'NL-MDIS SALES OFF SEND'
and (`opencall1`.`closedate`='' or
(concat(substring(`opencall1`.`closedate`,7,4),'-',substring(`opencall1`.`closedate`,4,2),'-',substring(`opencall1`.`closedate`,1,2),' ',
substring(`opencall1`.`closedate`,12,2),':',substring(`opencall1`.`closedate`,15,2),':',substring(`opencall1`.`closedate`,18,2))
>date_format(date_add(curdate(),interval -8 day),'%Y-%m-%d %H:%i:%S')
) =1)
ORDER BY 1
The graph is then made up as follows:-
Advanced Bar chart which I have had to swap series and groups and colour by series
On change of command.all and then I have show values as follows
Distinct Count of @count1
Distinct Count of @count2
Distinct Count of @count3
Distinct Count of @count4
Distinct Count of @count5
Distinct Count of @count6
Distinct Count of @count7
Distinct Count of @count8
The count formula are as follows:-
If {@logdate}<=dateadd("d",-8,CurrentDate)and (isnull({Command.closedate}) or {@Closedate}>dateadd("d",-8,CurrentDate))
then {Command.callref} else tonumber ({@@null})
and so on up to Day before current date
The crosstab subreport sql query is as follows:-
SELECT `opencall1`.`callref`, `opencall1`.`priority`, `opencall1`.`logdate`, `opencall1`.`closedate`, `mdis_status1`.`status_description`, `opencall1`.`cust_id`, `opencall1`.`suppgroup`, `updatedb1`.`updatetxt`
FROM (`swdata`.`opencall` `opencall1` INNER JOIN `swdata`.`updatedb` `updatedb1` ON `opencall1`.`callref`=`updatedb1`.`callref`) INNER JOIN `swdata`.`mdis_status` `mdis_status1` ON `opencall1`.`status`=`mdis_status1`.`status_code`
WHERE `opencall1`.`priority`<>'NL-MDIS SALES OFF SEND'
ORDER BY `opencall1`.`priority`
The onhold formulae on my cross tab are as follows:-
//@OnHold1
If date({Command.logdate})<currentdate and ({@Closedate}>dateadd("d",-8,currentdate) or {Command.closedate}='')
and{Command.updatetxt} like "*placed on hold*"
then {Command.callref} else tonumber ({@@null})
and so on again till @onhold8 which is the date before the current date.
Obviously I have just tried to add them to the report but it does not make any sense.
So is this possible to add to my chart or am I trying to blow crystal up or maybe there is a simpler formula and then it would make it possible. I have been known to try and make things more complicated than they are or need to be!!
Any help would be greatly appreciated but if you think this is impossible, please let me know
Thanks in advance
Annette
Final section of report attached