How to customise Reports - Technical Version

Root > 3. Customisation

 

 

    Follow WiredContact on Twitter
 

This document is in-depth look into WiredContact Reports. 

It is intended to serve as a guide to customizing the report templates and assumes you know something about HTML. If you do not want to get into HTML your usual WiredContact Business partner can help you or a Regional office will be able to assist, if on the other hand you are up for a little "cut and paste" and understand that you can leave you original in tact and work on a copy and you want to have a go then you may find this article of more value in the short term as it will let you ammend the report you already have right now.

The following topics are covered.

  • Introduction to Reports
  • Common Elements
  • Wizard Reports
  • Example:  Contact Wizard
  • Static Report Links

To use this guide and follow along with the examples, you should have WiredContact installed.   

Introduction to Reports
The reports are launched from the Reports.html template as shown below. This file is located in your default folder which could for example be C:\inetpub\wirede it will be referring to the reports folder in the same location.  The two main categories of reports are Static (pre defined-one click reports) and Wizard, or customizable reports.  You can customize the Reports.html template add both Static and Wizard templates.

Currently there are five types of reports:  Contact, Sales, History, Timeline and Activity.  Each type contains a Wizard and one of more Static reports. 

All Reports are accessed from Reports.html
User permissions can be used creatively to ensure that users all see the reports they need based on the job they do and the department they are in.


Using Layouttest based on a userfield the user can be directed toward a specific set of report options this could for example remove the ability to export (see below)

<#layouttest evaluate="<#sysuserfield field=level>=1" file="Reports_Level1.html">
<#layouttest evaluate="<#sysuserfield field=level>=3" file="Reports_Level3.html">
<#layouttest evaluate="<#sysuserfield field=level>=4" file="Reports_Level4.html">
<#layouttest evaluate="<#sysuserfield field=level>=5" file="Reports_Level1.html">
 
The HTML image above is achieved as shown here
Here is the HTML in the Reports.html for the first row under “Open Sales Reports”:
 
<tr>
<td bgcolor="#FFFFFF" align="left" width="100%" class="text" valign="middle" bordercolor="#FFFFFF">
<#WIZARD page="reports/saleswizdates.html" table=wce_sales NAME="OpenSalesOpps-Rep.html" height=450 width=700  USERS=ALL TEXT="Open Sales By Banker |" default="reports\sales\Scoped\OpenSalesReport_ByRep.html" templates="reports\sales\Scoped\OpenSalesReport_ByRep.html"> |
<#WIZARD page="reports/saleswizdates.html" table=wce_sales USERS=ALL height=450 width=700 NAME="OpenSalesbyRep-ThisMonth.html" TEXT="This Month |" default="reports\sales\Scoped\OpenSalesReport_ByRep.html" templates="reports\sales\Scoped\OpenSalesReport_ByRep.html"> |
<#WIZARD page="reports/mysaleswizdates.html" table=wce_sales NAME="OpenSalesOpps-MyRegion.html" height=450 width=700  TEXT="My Region |" default="reports\sales\Scoped\OpenSalesReport_ByRepRegion.html" templates="reports\sales\Scoped\OpenSalesReport_ByRepRegion.html"> |
<#WIZARD page="reports/mysaleswizdates.html" table=wce_sales NAME="OpenSalesOpps-MyGroup.html" height=450 width=700  TEXT="My Group" default="reports\sales\Scoped\OpenSalesReport_ByRepGroup.html" templates="reports\sales\Scoped\OpenSalesReport_ByRepGroup.html">
</td>
        </tr>
 
You can also modify the Wizards and reference different Wizards to scope on different fields / users / date fields depending on what the report is for.  For example, if it’s a Won Sales Opportunity, the default scope is on “Actual Close Date”.  If it’s an Open opportunity, the default scope is “Forecast Close date”.  Here is the Report.html for the “Sales Report by Status” section:
 
<tr><td class=text bgcolor="#FFFFCC"><Span class=olbl> Sales Reports by Status</span> <i>(Select Dates/Bankers/Criteria)</i></td></tr>
<tr>
<td bgcolor="#FFFFFF" align="left" width="100%" class="text" valign="middle" bordercolor="#FFFFFF">
<#WIZARD page="reports/Wonsaleswizdates.html" table=wce_sales NAME="WonSales.html" height=600 width=700  USERS=ALL TEXT="Won Sales by Banker" default="reports\sales\Scoped\WonSales.html" templates="reports\sales\Scoped\WonSales.html"> |
<#WIZARD page="reports/Wonsaleswizdates.html" NAME="Won_Sales <#date start=thismonth format=mm/yy>.html" TEXT="This Month" TEMPLATE="reports\Sales\Scoped\wonsalesthismonth.html"> |
<#WIZARD page="reports/myWonsaleswizdates.html" table=wce_sales NAME="WonSales-MyRegion.html" height=600 width=700  TEXT="My Region" default="reports\sales\Scoped\WonSalesRegion.html" templates="reports\sales\Scoped\WonSalesRegion.html"> |
<#WIZARD page="reports/myWonsaleswizdates.html" table=wce_sales NAME="WonSales-MyGroup.html" height=600 width=700  TEXT="My Group" default="reports\sales\Scoped\WonSalesgroup.html" templates="reports\sales\Scoped\WonSalesgroup.html">
</td>
</tr>
 
        <tr>
         <td bgcolor="#E9E9E9" align="left" class="text" valign="middle" bordercolor="#FFFFFF">
         <#SALESREPORT NAME="Past Forecast Close.html" TEXT="Past Forecast Close Dates |" TEMPLATE="reports\Sales\pastforecastclose.html"> |
         <#SALESREPORT NAME="Past Forecast Close-MyRegion.html |" TEXT="My Region" TEMPLATE="reports\Sales\pastforecastcloseRegion.html"> |
         <#SALESREPORT NAME="Past Forecast Close-MyGroup.html" TEXT="My Group" TEMPLATE="reports\Sales\pastforecastcloseGroup.html">
         </td>
        </tr>
<tr>
<td bgcolor="#FFFFFF" align="left" width="100%" class="text" valign="middle" bordercolor="#FFFFFF">
<#WIZARD page="reports/wonsaleswizdates.html" table=wce_sales NAME="LostSales.html" height=600 width=700  USERS=ALL TEXT="Lost Sales by Banker |" default="reports\sales\Scoped\LostSales.html" templates="reports\sales\Scoped\lostSales.html"> |
<#WIZARD page="reports/wonsaleswizdates.html" table=wce_sales  NAME="Lost_Sales <#date start=thismonth format=mm/yy>.html" TEXT="This Month |" TEMPLATE="reports\Sales\Scoped\Lostsalesthismonth.html"> |
<#WIZARD page="reports/myWonsaleswizdates.html" table=wce_sales NAME="LostSales-MyRegion.html" height=600 width=700  TEXT="My Region |" default="reports\sales\Scoped\LostSalesRegion.html" templates="reports\sales\Scoped\LostSalesRegion.html"> |
<#WIZARD page="reports/myWonsaleswizdates.html" table=wce_sales NAME="LostSales-MyGroup.html" height=600 width=700  TEXT="My Group" default="reports\sales\Scoped\LostSalesGroup.html" templates="reports\sales\Scoped\LostSalesgroup.html">
</td>
/tr>
<tr>
<td bgcolor="#E9E9E9" align="left" width="100%" class="text" valign="middle" bordercolor="#FFFFFF">
<#WIZARD page="reports/saleswizdates2.html" table=wce_sales NAME="SalesbyStatus.html" height=600 width=700  USERS=ALL TEXT="Sales Opps by Status |" default="reports\sales\Scoped\salesreport_bystatus.html" templates="reports\sales\Scoped\salesreport_byStatus.html"> |
<#WIZARD page="reports/mysaleswizdates3.html" table=wce_sales NAME="SalesbyStatus-MyRegion.html" height=600 width=700  TEXT="My Region |" default="reports\sales\Scoped\salesreport_bystatusRegion.html" templates="reports\sales\Scoped\salesreport_byStatusRegion.html"> |
<#WIZARD page="reports/mysaleswizdates3.html" table=wce_sales NAME="SalesbyStatus-MyGroup.html" height=600 width=700  TEXT="My Group" default="reports\sales\Scoped\salesreport_bystatusGroup.html" templates="reports\sales\Scoped\salesreport_byStatusgroup.html">
</td>
</tr>

 

Exporting to CSV or XLS
From reports.html you can access the various wizards, these can be turned on or off per user as needed. 
If you add ExportLabel=”” to the <#templates tag in a Report Wizard template, it will disable the Export function so looking at ContactWiz.html

Before restriction
<tr><td class=text>
Select a template: <#templates style="width:200">

After Restriction
<tr><td class=text>

Select a template: <#templates ExportLabel='' style="width:200">

 

Common Elements
The following is a list of tags common to both Wizard Repors and Static Reports.

<#USERNAME>

This will display the current username of the logged in user.  Use this tag to limit the scope of the reports to the logged in user.

<#DATE>

Displays a date.  Use this tag to limit the scope of a report by date.  The parameters used by this tag are:  START=["THIS WEEK", "LASTWEEK", "NEXTWEEK", "THISMONTH", "LASTMONTH", "NEXTMONTH", "THISYEAR", "LASTYEAR", "NEXTYEAR"] and OFFSET=x.  Offset is the number of days to add to the date specified.  For example, to display the date for Monday of the current week, use <#DATE START=THISWEEK OFFSET=1>.  To display Saturday of the previous week, you could use <#DATE START=THISWEEK OFFSET=-1> or <#DATE START=LASTWEEK OFFSET=6>

Wizard Reports
These reports are customizable by end users.  When an end user clicks on a Wizard icon, the dialogue box will open for that reports type as in the case of the Contact Wizard shown below.  The end user then fills in their criteria for the report, names the report and then the report is generated using those criteria.

Example:  Contact Wizard Report
Description
The Contact Report Wizard links are created with the <#CONTACTWIZARD tag and by specifying the appropriate parameters to produce the desired Contact Report Wizard dialog link.  The finished report depends on the parameters selected by the end user in the Wizard Dialog, as well as the report template specified on the dialog.

Parameters

PAGE: Specify the template to use for the Contact Report Wizard dialog.  By using different templates, yo ucan change the appearance of the Contact Report Wizard dialog.

HEIGHT:  Contact Report Wizard dialog height.  You will have to adjust the height depending on the items on the template specified by the Page parameter.

WIDTH:  Contact Report Wizard dialog width.  You will have to adjust the width depending on the items on the template specified by the Page parameter.

TEXT:  The TEXT parameter specifies what will displayed on the Reports page as the hyperlink if an image is not specified.  If an image is specified, the value of TEXT will be displayed when the user pauses their mouse over the image.

IMAGE:  The IMAGE parameter specifies the image to use for the hyperlink on the Reports page.  the IMAGE parameter is optional.

USERS:  Specify the users that the Contact Report Wizard dialog uses by default.  If the template specifies <#USERS type=hidden>, then the end user will not be able to modify this list.  If the template specifies <#USERS type=list> then the end user will be able to modify the list.  Use a USERS parameter for each user, for example: USERS="Gunther Anderson" USERS="Chris Huffman"

TEMPLATES:  The directory and filename mask to specify which Contact Report templates to show with the Contact Report Wizard dialog.  Examples:  templates="reports\contact\listcontact.html", templates="reports\contact\*.html".

TITLE: The title displayed on the report.

NAME:  The default name used to save the report in the end user's private library.  If you do not want the end user to be able to save the report with a different name other than the default name specified with the name parameter, use "type=hidden" with the <#SAVEAS> tag of the contact Report Wizard template (specified with the Page parameter).

SORTBY:  Specify the default fields that will be used to sort the final report.  If yo do not want the end user to change the sort parameters, use "type=hidden" in the <#SORTFIELDS tag of the contact Report Wizard template (specified with the Page parameter).  To sort by lastname, firstname, use "sortby=79 sortby=78".  The order you specify the sortby parameters is the order of the sort.

SORTFIELD:  The same as SORTBY.  Added to maintain consistancy with the Static Contact report links.  To sort by lastname, firstname, use "sortfield=79 sortfield=78".  The order you specify the sortfield parameters is the order of the sort.
 
ACTIVITYSTART: If the Contact report contains activity data for the contact, this is the first date of any activity displayed.  Use with the <#DATE> to specify start dates.

ACTIVITYSTOP: If the Contact report contains activity data for the contact, this is the last date of any activity displayed.  Use with the <#DATE> to specify stop dates.

HISTORYSTART:  Same as ACTIVITYSTART, except with HISTORY items.
HISTORYSTOP:  Same as ACTIVITYSTART, except with HISTORY items.
SALESSTART:  Same as ACTIVITYSTART, except with SALES items.
SALESSTOP:  Same as ACTIVITYSTART, except with SALES items.
NOTESTART:  Same as ACTIVITYSTART, except with HISTORY items that are notes.
NOTESTOP:  Same as ACTIVITYSTART, except with HISTORY items that are notes.
 
Example:  Static Contact Report

Description 
The Static Contact Report links are created with the <#CONTACTREPORT tag and by specifying the appropriate parameters to produce the desired report link as well as the desired finished report. 

4Parameters

TEXT:  The TEXT parameter specifies what will displayed on the Reports page as the hyperlink if an image is not specified.  If an image is specified, the value of TEXT will be displayed when the user pauses their mouse over the image.

IMAGE:  The IMAGE parameter specifies the image to use for the hyperlink on the Reports page.  the IMAGE parameter is optional.

NAME:  The name parameter specifies the file name of the report when deposited in the user's personal library.  

TEMPLATE:  The name of the template to be used to display the data for the report.  The template must already exist

TITLE:  What will appear as the title of the report once it has been built.

USERS:  The USERS parameter is used to specify how to limit the report based on the Record Manager of the contact record.  You can use USERS=all to specify all users.  If you do not specify USERS=all, you must specify each user that the report will include.  For example, if you wanted to build a report for the two users Chris Huffman and Gunther Anderson, you would use the USERS parameter twice:  USERS="Gunther Anderson" USERS="Chris Huffman".  If you wanted to limit the report to the current user, you would use: USERS="<#USERNAME>".

GROUP: Limit the contact report to a specific group.  You must specify the group name as it appears.

CONTACT:  Limit the report to the last contact viewed by the user.  Use CONTACT=Y.

LOOKUP:  Limit the report to the last lookup created by the user.  Use LOOKUP=Y.

SORTFIELDx:  You may use multiple fields to set the sorting criteria for contact reports.  You need to specify the field numbers for the fields.  For example, if you wanted to sort by Company, you would use: SORTFIELD1=25.  If you wanted to sort by Company, by Last Name, by First Name, you would use: SORTFIELD1=25 SORTFIELD2=79 SORTFIELD3=78.   You may specify up to ten sort fields.

SCOPEFIELDx:  You may limit the results of your report based on fields in the contact table.  You may use up to ten criteria to limit the contact report.  When using SCOPEFIELDx, you will also need to use SCOPEFIELDOPERATORx and SCOPEFIELDVALUEx.  For example, to limit the report to contacts in the state of California, you would use SCOPEFIELD1=31
SCOPEFIELDOPERATOR="=" SCOPEFIELDVALUE="CA".  For SCOPEFIELDOPERATORx, you may use the following operators:  =, >, <, <>, <=, >=, "IS Blank", "Starts With", "Ends With", "Contains".  Additinionally, you can use the SCOPEFIELDNOTx parameter to specify a boolean NOT with the equation.  For example, to request contact records where the Company field is not blank, you would use:  SCOPEFIELD1=25 SCOPEFIELDOPERATOR="Is Blank" SCOPEFIELDNOT1=T.

NOTESTART:  If the contact report template includes note details, you would use NOTESTART to specify the start date to limit the note items to display.  Use the <#DATE> tag to specify dates.  For example NOTESTART="<#DATE START=THISWEEK>".

NOTESTOP:  If the contact report template includes note details, you would use NOTESTOP to specify the stop date to limit the note items displayed.   Use the <#DATE> tag to specify dates.  For example NOTESTOP="<#DATE START=THISWEEK OFFSET=7>".

HISTORYSTART:  If the contact report template includes history details, you would use HISTORYSTART to specify the start date to limit the history items to display.  Use the <#DATE> tag to specify dates.  For example HISTORYSTART="<#DATE START=THISWEEK>".

HISTORYSTOP:  If the contact report template includes history details, you would use HISTORYSTOP to specify the stop date to limit the history items displayed.   Use the <#DATE> tag to specify dates.  For example HISTORYSTop="<#DATE START=THISWEEK OFFSET=7>".

ACTIVITYSTART:  If the contact report template includes activity details, you would use ACTIVITYSTART to specify the start date to limit the activity items to display.  Use the <#DATE> tag to specify dates.  For example ACTIVITYSTART="<#DATE START=THISWEEK>".

ACTIVITYSTOP:  If the contact report template includes activity details, you would use ACTIVITYSTOP to specify the stop date to limit the activity items displayed.   Use the <#DATE> tag to specify dates.  For example ACTIVITYSTOP="<#DATE START=THISWEEK OFFSET=7>".

SALESSTART:  If the contact report template includes sales details, you would use SALESSTARTto specify the start date to limit the sales items to display.  Use the <#DATE> tag to specify dates.  For example SALESSTART="<#DATE START=THISWEEK>".

 
SALESSTOP:  If the contact report template includes sales details, you would use SALESSTOP to specify the stop date to limit the salesitems displayed.   Use the <#DATE> tag to specify dates.  For example SALESSTOP="<#DATE START=THISWEEK OFFSET=7>".

 

 

 

 

 

 

Add Feedback