Member Status Chart =================== This is a simple pie chart that shows a breakdown by the various Member Statuses in your database. You will follow the step by step directions and copy the :ref:`code below ` to paste into your database. Sample Chart When you hover over one of the sections you will see the total number and the percent of the whole. .. figure:: https://i.tpsdb.com/2017-10-11_10-20-08.png :target: # Create Member Status Chart -------------------------- Step 1 Go to `Administration > Setup > Special Content > Python Scripts`. Step 2 Click the green `+ New Python Script File`, enter name the file ``MemberStatusChart`` and click `Submit`. Step 3 :ref:`Copy all the code below` and paste it into the new file. Click `Save Script`. Step 4 Click `Run Script`. After running it you can Add to Menu. .. _MemberStatusChart: .. code-block:: python model.Header = 'Member Status' data = q.SqlNameCountArray("test", ''' SELECT Name = ms.Description, Cnt = COUNT(*) FROM dbo.People p JOIN lookup.MemberStatus ms ON ms.Id = p.MemberStatusId GROUP BY ms.Description ''') model.Script = ''' '''.replace("@data", data) print "
" | | +--------------------+------------------+ | **Latest Update** | **11/13/2020** | +--------------------+------------------+ Modify image link with secure protocol.