fix pivot report bug, added server functionality