select territoryId from request.qmd_oprTerritoryHierarchy where localMarket = 1 select distinct g.groupId from tbl_SEC_Groups g inner join tbl_FSpro_members m on m.fspro_userid = g.groupLeaderId and m.ownerId = g.ownerId and m.fsl_tablecode = g.fsl_tablecode inner join tbl_SEC_MemGrpLink mgl on mgl.groupId = g.groupId and mgl.fspro_userid = where g.OwnerID = and g.FSL_TableCode = select distinct m.fspro_userid teamMemberUserId, g.groupName from tbl_SEC_Groups g inner join tbl_SEC_MemGrpLink mgl on mgl.groupId = g.groupId inner join tbl_FSpro_members m on m.fspro_userid = mgl.fspro_userid and m.ownerId = g.ownerId and m.fsl_tablecode = g.fsl_tablecode where g.OwnerID = and g.FSL_TableCode = and g.groupId = select distinct m.fspro_userid from tbl_SEC_Groups g inner join tbl_SEC_MemGrpLink mgl on mgl.groupId = g.groupId inner join tbl_FSpro_members m on m.fspro_userid = mgl.fspro_userid and m.ownerId = g.ownerId and m.fsl_tablecode = g.fsl_tablecode where g.OwnerID = and g.FSL_TableCode = and g.groupId in ( ) select stageId from qmd_stages where statusCode = 'A' select stageId from qmd_stages where statusCode = 'C' select * from qmd_rawOpportunities where salesPersonUserId in ( ) select opportunityId, territoryId summaryId, territoryName summaryName, 'TER' summaryType, 1 soldOpportunities, incomeAmt SoldDollars, 0 activeOpportunities, 0.0 activeDollars from qmd_rawOpportunities where stageId in ( ) union select opportunityId, territoryId summaryId, territoryName summaryName, 'TER' summaryType, 0 soldOpportunities, 0.0 SoldDollars, 1 activeOpportunities, incomeAmt activeDollars from qmd_rawOpportunities where stageId in ( ) union select opportunityId, #_teamId# summaryId, '#_teamName#' summaryName, 'GRP' summaryType, 1 soldOpportunities, incomeAmt SoldDollars, 0 activeOpportunities, 0.0 activeDollars from qmd_rawOpportunities where stageId in ( ) and salesPersonUserId in () union select opportunityId, #_teamId# summaryId, '#_teamName#' summaryName, 'GRP' summaryType, 0 soldOpportunities, 0.0 SoldDollars, 1 activeOpportunities, incomeAmt activeDollars from qmd_rawOpportunities where stageId in ( ) and salesPersonUserId in () select distinct 0 opportunityId, g.groupId summaryId, g.groupName summaryName, 'GRP' summaryType, 'GRP' summaryType, 0 soldOpportunities, 0.0 SoldDollars, 0 activeOpportunities, 0.0 activeDollars from tbl_SEC_Groups g where g.OwnerID = and g.FSL_TableCode = and g.groupId in () and not g.groupId in ( ) select summaryId, summaryName, summaryType, sum( soldOpportunities ) soldOpportunities, sum( SoldDollars ) SoldDollars, sum( activeOpportunities ) activeOpportunities, sum( activeDollars ) activeDollars from qmd_opportunityXtab group by summaryId, summaryName, summaryType order by activeDollars desc, SoldDollars desc, activeOpportunities desc, soldOpportunities desc, summaryName
Business Plan Ranking Summary
TerritoryTeam Sold Opps Sold Dollars Active Opps Active Dollars
#htmleditformat( summaryName )# #lsnumberformat( soldOpportunities )# #rereplace( lscurrencyformat( round( val( SoldDollars ))), "\.\d\d$", "" )# #lsnumberformat( activeOpportunities )# #rereplace( lscurrencyformat( round( val( activeDollars ))), "\.\d\d$", "" )#
select m.fspro_userid teamMemberUserId, m.firstName, m.lastName from tbl_SEC_Groups g inner join tbl_SEC_MemGrpLink mgl on mgl.groupId = g.groupId inner join tbl_FSpro_members m on m.fspro_userid = mgl.fspro_userid and m.ownerId = g.ownerId and m.fsl_tablecode = g.fsl_tablecode where g.OwnerID = and g.FSL_TableCode = and g.groupId = select * from qmd_teamMembers where teamMemberUserId in () select opportunityId, salesPersonUserId, salesPersonFirstName, salesPersonLastName, 1 soldOpportunities, incomeAmt SoldDollars, 0 activeOpportunities, 0.0 activeDollars from qmd_rawOpportunities where stageId in ( ) and territoryId = and salespersonUserId in ( ) union select opportunityId, salesPersonUserId, salesPersonFirstName, salesPersonLastName, 0 soldOpportunities, 0.0 SoldDollars, 1, incomeAmt activeDollars from qmd_rawOpportunities where stageId in ( ) and territoryId = and salespersonUserId in ( ) select salesPersonUserId, salesPersonFirstName, salesPersonLastName, sum( soldOpportunities ) soldOpportunities, sum( SoldDollars ) SoldDollars, sum( activeOpportunities ) activeOpportunities, sum( activeDollars ) activeDollars from qmd_repXtab group by salesPersonUserId, salesPersonFirstName, salesPersonLastName select salesPersonUserId, salesPersonFirstName, salesPersonLastName, soldOpportunities, SoldDollars, activeOpportunities, activeDollars from qmd_repDetailRaw union select teamMemberUserId, firstName, lastName, 0 soldOpportunities, 0.0 SoldDollars, 0 activeOpportunities, 0.0 activeDollars from qmd_teamMembers where not teamMemberUserId in ( ) order by activeDollars desc, SoldDollars desc, salesPersonLastName, salesPersonFirstName select sum( SoldDollars ) SoldDollars, sum( activeDollars ) activeDollars, sum( soldOpportunities ) soldOpportunities, sum( activeOpportunities ) activeOpportunities from qmd_repDetail
Business Plan Ranking Summary
#qmd_repDetail.recordCount# Sales Persons
Sales Person Sold Opps Sold Dollars Active Opps Active Dollars
Total for #htmleditformat( summaryName )# #lsnumberformat( qmd_totals.soldOpportunities )# #rereplace( lscurrencyformat( round( val( qmd_totals.SoldDollars ) )), "\.\d\d$", "" )# #lsnumberformat( qmd_totals.activeOpportunities )# #rereplace( lscurrencyformat( round( val( qmd_totals.activeDollars ) )), "\.\d\d$", "" )#
#htmleditformat( salesPersonLastName )#, #htmleditformat( salesPersonFirstName )# #lsnumberformat( soldOpportunities )# #rereplace( lscurrencyformat( round( val( SoldDollars ))), "\.\d\d$", "" )# #lsnumberformat( activeOpportunities )# #rereplace( lscurrencyformat( round( val( activeDollars ))), "\.\d\d$", "" )#

No Matching Results

Options used for this Report
Manufacturer: All Manufacturers #htmleditformat( qmd_principal.mfrName )#
Grouping:#attributes.params.cdr_grp_opt#
Territory(ies): select territoryName from request.qmd_oprTerritoryHierarchy where territoryId in ( ) order by territoryName , #htmleditformat( territoryName )# #x#
Team(s): select groupName from tbl_SEC_Groups where groupId in () order by groupName , #htmleditformat( groupName )# #x# All Teams
Run By: #htmleditformat( client.user )# <#trim( htmleditformat( client.email ))#>