dkmartini Posted March 30, 2007 Report Share Posted March 30, 2007 Hi, I started w/ this script ----- $SQL = "SELECT DISTINCT sr_status as Status, COUNT(*) AS TicketsFROM v_CBI_Open_TicketsWHERE (Company_Name <> 'ConnectWise') GROUP BY sr_status" invoke-sql -server cw -database cwwebapp_connections -sql $sql | out-chart -template opentickets -caption "Open Tickets" -Title "Open Tickets" -sidebar tickets -group tickets -name "Open Tickets" -drilldown_script allTicketsDrillDown.ps1 -drilldown_parameter {$_.status} ------ changed it to this script to be able to specify the colors of each bar in the chart ------- function getColor{ if ($args[0] -eq 'Enter Time') { return 'Yellow' } if ($args[0] -eq 'Scheduled') { return 'Green' } if ($args[0] -eq 'Completed') { return 'Green' } if ($args[0] -eq 'Done Yet?') { return 'Red' } return 'Blue'} $SQL = "SELECT DISTINCT sr_status as Status, COUNT(*) AS TicketsFROM v_CBI_Open_TicketsWHERE (Company_Name <> 'ConnectWise') GROUP BY sr_status" $items = invoke-sql -server cw -database cwwebapp_connections -sql $sql$clr0 = getColor $items[0].Status$clr1 = getColor $items[1].Status$clr2 = getColor $items[2].Status$clr3 = getColor $items[3].Status$clr4 = getColor $items[4].Status$clr5 = getColor $items[5].Status$clr6 = getColor $items[6].Status$clr7 = getColor $items[7].Status$clr8 = getColor $items[8].Status$clr9 = getColor $items[9].Status$clr10 = getColor $items[10].Status$clr11 = getColor $items[11].Status$clr12 = getColor $items[12].Status $items | out-chart -allseries_multiplecolors true -points_0_color $clr0 -points_1_color $clr1 -points_2_color $clr2 -points_3_color $clr3 -points_4_color $clr4 -points_5_color $clr5 -points_6_color $clr6 -points_7_color $clr7 -points_8_color $clr8 -points_9_color $clr9 -points_10_color $clr10 -points_11_color $clr11 -points_12_color $clr12 -template opentickets -caption "Open Tickets" -Title "Open Tickets" -sidebar tickets -group tickets -name "Open Tickets" -drilldown_script allTicketsDrillDown.ps1 - drilldown_parameter {$_.status} --------------- Now my drilldown doesn't work. What am I missing? Thanks dkm Quote Link to comment Share on other sites More sharing options...
dkmartini Posted March 30, 2007 Author Report Share Posted March 30, 2007 sorry for the braindead - extra space got between the "-" and the drilldown parameter Quote Link to comment Share on other sites More sharing options...
mytech Posted April 5, 2007 Report Share Posted April 5, 2007 It looks like this is a feed into open tickets in connectwise. Have you gotten this working.... Would you be interested in sharing/selling you work? Do you have screen shots? I am new to gadget development and looking to the ability to pull live data from CW to both with gadgets and Sharepoint. Lyf Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.