TOCPREVNEXTINDEX

PC-Duo Enterprise HelpDesk


Customizing Enterprise HelpDesk


Power Customizations

This section covers a variety of ways to customize Enterprise HelpDesk, all of which are considered “power customizations”.

Power customizations involve using the Microsoft Access development environment, Visual Basic, Javascript, and other advanced techniques to customize Enterprise HelpDesk.

Moving Fields Between Tabs

You can move fields between tabs by making a simple change in the project .def file.

To move a field to another tab
  1. Open the project .def file.
  2. Open the tblDtsFields table.
  3. Find the record for the field you want to move, and change the value in the nDestinationTabID field.
  4. nDestinationTabID specifies the tab that contains the field. You can find the tab IDs in tblTabs.

  5. Regenerate any existing Web views.

In the default HelpDesk project, these are the tab IDs:

ID
Tab Name
0
Overview
1
Description
2
Resolution
3
Detail
4
Contact

Creating an Attachments Field

Create an attachments field:
  1. Open the project .def file.
  2. Open the tblDtsFields table.
  3. Copy the record for the Attachments field and paste it into a new record.
  4. Change the nID, tTableName, tName, tCaption, tLabelCaption, and tBoundControlName fields.
  5. If you want to put the new attachments field on a different tab, change the nDestinationTabID field.
  6. tblDtsFIelds field
    Description
    nID
    Unique ID for the field.
    tTableName
    Name of the attachments table in the DAT database. The attachments table stores information about attached files.
    Also, the name of a table in the USR database (the table is named <tTableName>Temporary).
    tName
    Name of the field in the attachments table (DAT database) that stores the name of an attached file.
    tCaption
    Label used in choice lists.
    tLabelCaption
    Default label for the field in a Web view.
    tBound
    ControlName
    Internal name for the field.

Create an attachments table
  1. In the DAT database, copy tblAttachments. Use the tTableName of the new attachments field as the name.
  2. Change the name of the tAttachments field in the new table. Use the tName of the new attachments field as the new name.
Create a temporary attachments table

In the USR database, copy the tblAttachmentsTemporary table. Name the new table <tTableName>Temporary.

Add a record to tblDtsTables

In tblDtsTables (DEF database) copy the record for the attachments table. Change tTableName and tTableNameTemp to the names of the new attachments tables in the DAT and USR databases.

Customizing URL Buttons

URL buttons are implemented as A elements with background images.

Each of the default URL buttons (URLButton , MailToButton , and RemoteControl ) has four CSS classes, along with four associated :hover classes. The Web View Editor automatically determines which CSS class to use based on the field type and the field attribute settings. For example, the CSS classes used for URLButton are determined as follows:

When
These CSS classes are used
Column Span=1
URLButtonState1
URLButtonState1:hover
Column Span=2
CSS Class =
MemoFieldWidth
URLButtonSpanTwoState1
URLButtonSpanTwoState1:hover
Column Span=2
CSS Class = SpanTwoWidthOne
URLButtonTwoWidthOneState1
URLButtonSpanTwoWidthOneState1:hover
Field already has a button (for example, a date field).
URLButtonSecondButtonState1
URLButtonSecondButtonState1:hover

These CSS classes are defined in the CensusMain.css style sheet in CensusWeb\Views\CensusWebVD\Theme\css.

Each different pair of CSS classes positions the button differently, by changing the value of the CSS left property.

The :hover pseudo classes change the background image to give a rollover effect.

To define your own buttons, copy the URLButton classes, change the class names, and point the background-image property to your button images. For example:

.MyButtonState1 
{ 
	background-image:
		url(../images/buttons/mybutton_off.gif); 
	background-repeat:no-repeat; 
	display:block; 
	position:absolute; 
	left:80%; 
	width:24px; 
	height:24px; 
	top:0px; 
} 

For button rollovers, you’ll need two versions of your button image. Your button images should have a one or two pixel margin (so there’s some space between the field and the button). Alternatively, you could adjust the left property.

To use these new classes, just use MyButton as the value of the URL Button CSS attribute.

Customizing the Inventory Tab

You can easily customize the list of reports that appears on the Inventory tab. You can:

To customize the list of reports on the Inventory tab, edit the file tmplInventoryTab.rec, which is located in the folder

HelpDeskServer\CensusWeb\CUSTOMIZEDFILES
	\#Project#HelpDesk\#AllWebViews#\Misc 

In templInventoryTab.rec, the reports list is stored in an array named arrReports. arrReports is an array of arrays, that is, each element in arrReports is itself an array. Each of these arrays contains information about a different report.

The following code fragment shows how a report is added to the list:

// start Reports list 
arrReports = [ 
 
	// array of report information 
	[ GetOpenReportOnClickFunction(...),
		“<caption>”, “<tooltip>”, “<html-markup>” ] 
 
	] // end of Reports list 

GetOpenReportOnClickFunction(...) returns the onClick event handler, which opens the report when a user clicks it. Do not edit this function call.

<caption> is the report name displayed in the list.

<tooltip> is the text displayed when a user points to the button beside a report.

In tmplInventoryTab.rec, the caption and tooltip are specified by text that looks like this:

<Mq:ReportCaption>155.10</Mq:ReportCaption> 

When you generate a Web view, this text is replaced with the name of the report.

<html-markup> is html markup that is inserted into the list after the report. For example, you can add separators by adding “<hr />”.

To reorder the list of reports:
  1. In tmplInventoryTab.rec, change the order in which the reports are added into the arrReports array.
  2. Some reports add a separator (“<hr/>”), so you may have to edit the report arrays to put the separators in the right places.
  3. Generate the Web views that include the Inventory tab.
To remove reports:
  1. In tmplInventoryTab.rec, comment out (or delete) the reports that you want to remove.
  2. Generate the Web views that include the Inventory tab.
To change a report name:
  1. In tmplInventoryTab.rec, replace the text that looks like this:
  2. “<Mq:ReportCaption>155.10</Mq:ReportCaption>” 
     

    with the report name you want to see.

    Remember, the tooltip is the second element in the array, and the caption is the third.

  3. Generate the Web view.
To add a separator between two reports:
  1. In tmplInventoryTab.rec, find the array for the first of the two reports.
  2. Change the fourth element of the report array from "" to "<hr/>" (or to whatever HTML you want to use as a separator).
  3. Generate the Web views that include the Inventory tab.
To change the title of the reports list:
  1. In tmplInventoryTab.rec, find this document.write statement (near the end of the file):
  2. document.write(
    	m_objWebPart.GetHTML_ListContainer(
    		"Reports",
    		"../../theme/images/images/ListImage.gif",
    		arrReports
    	)
    ); 
    
  3. Change the first argument to GetHTML_ListContainer() from “Reports” to the title you want to see.
  4. Generate the Web views that include the Inventory tab.

Customizing Reports with Crystal Reports

About Crystal Reports

Using Crystal Reports, you can add features such as charts, formulas, field highlighting, and running totals to a listing report. You can also import graphics (such as company logos) and completely reformat a listing report.

To build custom reports, you need Crystal Reports v8.5 or v9.0. Crystal Reports must be purchased separately from Crystal Decisions or another supplier. You also need a Report Creation API license.

A Customized Listing Report

Customized listing reports appear on the Custom tab of the HelpDesk Web Report Viewer. After you customize a listing report, you cannot edit it in the Report Editor. You must use Crystal Reports.

Step 1: Creating a Listing Report

A custom report is based on a listing report. The listing report defines the data (the issues and fields) that will be available in Crystal Reports when you customize the report.

To create a new listing report:
  1. In HelpDesk Admin, create a new listing report in the Report Editor with the desired query and sort.
  2. Add all the fields you want to use in the customized report.
  3. Do not select the Custom check box.

Step 2: Create an .rpt File

Crystal Reports uses the .rpt file format to save reports. When you view a report in a Web view, HelpDesk Web creates an .rpt file for the report. The .rpt file is saved inside the view folder, for example, in:

C:\Program Files\PC-Duo Enterprise\HelpDeskServer\CensusWeb\Views\CensusWebVD\HelpDesk_HelpDesk\Reports 

For each report, Enterprise HelpDesk requires two .rpt files: one for the portrait orientation, and one for the landscape orientation.

To create an .rpt file:
  1. In HelpDesk Admin, set the Standard Report Engine option to Crystal Reports 9 or Crystal Reports 8.5, so Enterprise HelpDesk uses Crystal Reports for listing reports.
  2. Log on to a Web view and click Reports to open the Report Viewer.
  3. Click the Listing tab, click the new report, and then click View.
  4. Save a copy of the report from the Report Viewer and use this as your working copy. When you save a report from the Report Viewer, the .rpt file includes the issue data, so you can preview the report in Crystal Reports and use the Chart Analyzer. The .rpt file created by the Web view does not include any issue data.
  5. Click Show and then in the Layout list, click Landscape.
  6. View the landscape version of the report to create the .rpt file for the landscape orientation.
  7. You don't need to save the landscape report from the Report Viewer. You can create the customized version of the landscape report from the customized portrait report.

Step 3: Move the Report to the Custom Tab

To move a listing report to the Custom tab:

In HelpDesk Admin, open the listing report in the Report Editor and select the Custom check box.

Step 4: Customize the Report in Crystal Reports

To customize the report in Crystal Reports:
  1. Open the .rpt file with Crystal Reports. Use the copy of the report you saved from the Report Viewer.
  2. Edit the report. For example, you can insert graphs, change fonts and colors, insert custom headers and footers, group and sort fields, hide fields, add summary fields (such as count or average), and much more.
  3. Save the .rpt file.
  4. Copy the .rpt file to the Reports folder and rename the .rpt file so it uses the default report name.
  5. Log on to the Web view and open the report.

Step 5: Copy the customized report to the CustomizedFiles folder

When you generate a Web view, the contents of the Reports folder are deleted. To save your customized reports and make sure they are copied every time you generate a Web view, you have to copy the .rpt files to the CustomizedFiles folder.

See Customizing Web View Files for more information on the CustomizedFiles folder.

Customizing HTML Reports

About HTML Reports

By default, Web views use HTML to display Listing reports. You can customize this HTML by editing the XML files that define the HTML page template.

<type> is either “tabular” or “multicolumn” (the two types of listing reports).

You can find these files in the Reports folder of a Web view, for example:

C:\Program Files\PC-Duo Enterprise\HelpDeskServer\CensusWeb\Views\CensusWebVD\HelpDesk_HelpDesk\Reports 

These XML files are dynamically created the first time you view a report.

Enterprise HelpDesk generates the HTML reports by transforming raw XML data into HTML using an XSL style sheet. The three .xml files are templates for the XSL style sheet.

Changing the CSS Styles

The CSS styles used by the HTML reports are defined in the TmplRpt_listing_<type>.xml file.

Reports are used to format attachments to e-mail notifications. Using an embedded style sheet ensures that notification attachments are formatted. If you want to use an external style sheet, you must use an absolute URL to locate the style sheet.

PlaceHolders

The empty elements (such as <ReportHeader/> and <TableCells/>) in TmpRpt_listing_<type>.xml are placeholders. When Enterprise HelpDesk generates a report, it replaces these placeholders with report-specific data.

Customizing the Report Used to Print Issues

The information in this section applies only if you use Crystal Reports for listing reports. See Viewing Reports for more information on using Crystal Reports for listing reports.

The report used to print issues is named “Current Issue - Detailed”. If you edit this report in the Report Editor (of HelpDesk Admin), the changes apply to all Web views of the project.

Each view has two versions this report:

rptListingGCurrent$Record$-$DetailedPortrait.rpt 
rptListingGCurrent$Record$-$DetailedLandscape.rpt 

You can find these files in the

CensusWebVD\<project>_<view>\Reports  

folder, where <project> is the name of the project and <view> is the name of the Web view. The portrait version of the report is used to print issues.

To customize the report:
  1. View the portrait version of the report in a Web view. You can either print an issue or view the report with the Report Viewer.
  2. Viewing the report creates the .rpt file.

  3. In the Report Editor (HelpDesk Admin), mark the report as a custom report (select the Custom check box).
  4. This prevents Enterprise HelpDesk from overwriting the customized report if the report definition changes.

  5. Using Crystal Reports, customize the report (add graphics, change fonts, rearrange and align fields).
  6. Put a copy of the customized report in
  7. 	CUSTOMIZEDFILES
    		\#Project#<project>
    			\#WebView#<view>
    				\Reports 
     

    When you regenerate the Web view, the customized version of the report is copied to the Web view folder.

Deleting Users

You can disable users, but this does not delete the user from the database, because existing issues may refer to the user (as either the owner, submitter, or contact). If you don’t want to see disabled users in the Contact, Owner, and Submitter fields, you can either:

However, if an existing issue references the user in its Owner, Submitter, or Contact field, the field will be empty. In some cases this may cause an “invalid use of null” error.

If existing issues reference disabled users, it may not be practical to delete the user accounts for ex-employees or contractors, because you probably want to keep a historical record of who reported, submitted, and resolved issues. In that case, you may want to add some sort of prefix to the names of disabled accounts.

Before you delete a user or remove the user from the choice lists, you should check if any existing issues reference the user.

To check if a user is referenced by existing issues:
  1. Open the users database, and open the tblUser table.
  2. The users database is the file users.mdb (Jet/MSAccess) or the database USERS_MDB (SQL Server).

  3. Find the record for the user you want to delete, and get the value in the User ID field.
  4. For example, if you want to delete the demo user, the User ID is 2.

  5. Open the issue database for the project.
  6. The issue database is the file <project>01.dat (Jet/MSAccess) or the database <project>01_DAT (SQL Server).

  7. Open tblDts and look for the user ID in the columns of choice list fields that use tblUser. For example, nUserID (Owner), nOriginatorID (Contact), and nSubmitterID (Submitter)
  8. To sort the table by user ID, click in the nUserID, nOriginatorID, or nSubmitterID column. Then in the Record menu, click Sort and then click Sort Ascending or Sort Descending. Then scroll through the records to see if the user owns any records.

Note that the revision history (the tblDts_History table in the DAT database) also references users. And while unlikely, queries, summary reports, time reports, and notifications may also reference specific users. The definitions of queries, reports, and notifications are in the project .def file.

If existing issues do reference the user, you can always reassign open issues, but closed issues can be a problem. You may want to keep a historical record of who reported, submitted, and resolved an issue. If so, you have to keep the disabled users.

Removing Disabled Users from Choice Lists

Instead of deleting users from the users database, you can prevent the Owner and Contact lists from showing disabled users. However, if an existing issue references the deleted user in its Owner or Contact field, the field will be empty.

Removing disabled users from choice lists:
  1. Open the .def file for the project.
  2. Open tblDtsFields and find the owner (nID = 11) and contact (nID = 13) records.
  3. In the tWhere field, add "And fDeleted = 0" to the Where clause. For example:
  4. Where (([nID] >= 0 And [tName] <> '') Or [tName] 
    = '<User>') And fOriginator = 0 And fDeleted = 0 
    

Adding a Choice List of Users or Contacts

To add a choice list of users:
  1. In the Field Editor, create a new field.
  2. In the Type list, click Multi-Choice List or Single Choice List.
  3. In the Table Containing Choices list, click tblUser.
  4. tblUser cannot be viewed or edited in the Choice Editor.

  5. Apply the changes (click Apply or Close).
  6. In Microsoft Access, open the project .def file.
  7. Open tblDtsFields and find the record for the new field. In the tWhere field, type:
  8. Where (([nID] >= 0 And  [tName]  <> '') Or 
    	[tName]  = '<User>') And fOriginator = 0 
    

The [nID] >= 0 condition removes the macros defined in tblUser (the users database):

User ID
User Name
-4
<Contact>
-3
<User>
-2
<Previous Owner>
-1
<Owner>

The user with nID = 0 is the <None> macro.

The fOriginator = 0 condition removes contacts, so that the list contains users only.

To add a choice list of users and contacts:

Use this tWhere clause:

Where (([nID] >= 0 And  [tName]  <> '') Or [tName]  = '<User>') 

Timestamping

About Timestamping

Changes to a memo field can be time-stamped. For example, you can time-stamp the changes, comments, notes, and follow-ups that are added to an issue description over time.

Timestamping requires two memo fields, one for input and one for storing the timestamped log. When an issue is saved, the Web view automatically copies the contents of the input field to the log field.

Enabling Timestamping in New Projects Based on HelpDesk

You need to set the Html code after control attribute of the timestamping fields. The required HTML is included below. Note that it is formatted for readability—the Html code after control attribute takes a single line of text.

Description
<script type='text/javascript'>document.write( parent.objCustomCode.getCodeAfterField( '%fieldname%', 'mem_29_txtDetailedDescription' ))</script> 
Description Log
<script type='text/javascript'>document.write( parent.objCustomCode.getCodeAfterField( '%fieldname%', '' ) )</script> 
Notes
<script type='text/javascript'>document.write( parent.objCustomCode.getCodeAfterField( '%fieldname%', 'mem_56_mem_56_Notes' )) </script> 
Notes Log
<script type='text/javascript'>document.write( parent.objCustomCode.getCodeAfterField( '%fieldname%', '' ))</script> 

Adding New TimeStamping Fields

Step I: Add two memo fields:

Use the Field Editor to create two memo fields. For the input field, clear the Show in Choice Lists and Maintain Revision History check boxes.

Step II: Get the name of the timestamp log field:

You need to get the internal name of the timestamp field. The internal name is a name that looks like "mem_58_mem_58_FieldName" (and that is not a typo).

If you have Microsoft Access, you can get the internal name by opening the project .def file and looking in the tblDtsFields table. The field name is composed from the values in the nID and tBoundControlName fields:

mem_<nID>_<tBoundControlName>” 

The tBoundControlName field includes a repeat of the”mem_<nID>” string. That is why the string appears twice in the name.

If you don’t have a copy of Microsoft Access, generate a Web view for the project. Then get the value of the name attribute of the text area control associated with the timestamp log field. You can find this in the tmplRecord.html file, which is located in the HTML folder of the view:

CensusWebVD\<project>_<view>\HTML 
Step III: Set the HTML code after control attributes:

Before you generate a Web view, you must export the two fields and set their HTML code after control attributes.

  1. For the input field, enter this HTML code (as a single line of text):
  2. <script type='text/javascript'>
    document.write( 
    	parent.objCustomCode.getCodeAfterField( 
    		'%fieldname%', 
    		'<timestamp-log-field-name>' ) ) 
    </script> 
     

    <timestamp-log-field-name> is the field name you found in the previous step. Note that the javascript is case sensitive.

  3. For the timestamp log field, enter this HTML code (as a single line of text):
  4. <script type='text/javascript'>
    document.write(
    	parent.objCustomCode.getCodeAfterField(
    		'%fieldname%',
    		'' ) )
    </script> 
    

Customizing Timestamping

By default, each time a new entry is added to the timestamp log, a line that looks like this is added:

December 11,2001 4:38 PM   analyst   (New) 

You can customize the way the timestamp log is formatted by editing MoveControlData() in Js\CustomCode.js. For example, you could insert a line of dashes to separate entries, add tabs (\t), or add more line breaks (\r):

objTargetControl.value="--------------------------------\r" +  
				getDateTime() + "\r" + 
				objSourceControl.value + "\r\r" 
				objTargetControl.value + "\r"; 

getDateTime() returns a string that includes the date, time, name of the current user, and current value of the Progress field.

objSourceControl.value is the new input to add to the timestamp log, and objTargetControl.value is the content of the timestamp log.

Timestamping with One Memo Field

You can implement timestamping with just one memo field. To do this, you use the HTML code before control attribute to insert a text area control above the timestamp log field. This text area control is not tied to any database field. It exists only to allow input, which is copied into the timestamp log field when you save the issue. The advantage to this approach is that you avoid storing an extra memo field in the issue database. The disadvantage is that you cannot use HelpDesk Admin or the Web View Editor to customize the input text area (for example, to change the caption or position of the control).

Html code after control:

<script type='text/javascript'> 
document.write(parent.objCustomCode.getCodeAfterField('%fieldname%','')); 
</script> 

Html code before control:

<script type='text/javascript'> 
document.write(parent.objCustomCode.getInputMemoField('mem_desc', '%fieldname%')); 
</script> 

New function in CustomCode.js:

function getInputMemoField( inputFld, logFld ) 
{ 
var strOutput; 
 
strOutput="<textarea  class='MemoFieldWidth'  "; 
strOutput+="name='" + inputFld + "' "; 
strOutput+="wrap=physical  rows=10 cols=73"; 
strOutput+="onfocus=\"parent.MemoGotFocus('" + inputFld + "')\" "; 
strOutput+="onchange=\"parent.OnMemoRecordChanged('" + inputFld + "')\" "; 
strOutput+="onkeypress=\"parent.OnMemoRecordChanged('" + inputFld +"')\"></textarea><br>"; 
 
strOutput+="<script type='text/javascript'>"; 
strOutput+="document.write(parent.objCustomCode.getCodeAfterField('" + inputFld + "','" +logFld + "'))</script>"; 
strOutput+="</script>"; 
 
return strOutput; 
} 

New declaration in CustomCode.js:

// Declaration of the public functions 
this.getInputMemoField=getInputMemoField; 
 

Customizing Notifications

Changing the Format of Attachments

One of the choices in the Include list (Notification Editor) is Detailed. Detailed attaches a report to the notification message. This report includes most, if not all, of the fields for an issue.

If you do not use Crystal Reports, attachments can be either HTML files or text files. If you do use Crystal Reports, attachments are RTF files by default. You can change this to be PDF, text, or a number of other formats.

See Viewing Reports for more information on using Crystal Reports for listing reports.

To change the format of a notification attachment:
  1. Open the project .def file.
  2. In tblMailContents, change the nFormatType for the attachments. (Attachments have nType = 3 in tblMailContents).

nFormatType constants:

NoFormat
0
Excel40
20
CrystalReport
1
Excel50
21
DataInterchange
2
Excel50Tabular
22
RecordStyle
3
ODBC
23
RichText
4
HTML32Standard
24
Comma Separated
Values
5
Explorer32Extend
25
TabSeparatedValues
6
NetScape20
26
CharSeparated
Values
7
Excel70
27
Text
8
Excel70Tabular
28
TabSeparatedText
9
Excel80
29
PaginatedText
10
Excel80Tabular
30
Lotus123WKS
11
PortableDocFormat
31
Lotus123WK1
12
HTML40
32
Lotus123WK3
13
CrystalReport70
33
WordForWindows
14
ReportDefinition
34
Excel21
18
ExactRichText
35
Excel30
19
XML
36

Attaching Information

By default, the Revision Record and Summary are included in the body of the e-mail notification message. You can include this information as separate attachments.

To do this, open the project .def file and in tblMailContents change the nType to 3. nType determines where the content is put in the e-mail message.

nType
Description
1
Subject
2
Body of e-mail message
3
Attachment

Adding Custom Mail Contents

In the Notification Editor, the Include list specifies what to include in an e-mail notification message. You can add items to this list. The items can be used as the message subject, inserted in the message body, or included as attachments to the message.

To add an item to the Include list of the Notification Editor:
  1. Define a function in the macro6.bas file.
  2. This function should return the content you want to include in the e-mail message.

    macro6.bas is located in the project sub-folder of the HelpDeskServer folder (for example:
    HelpDeskServer\HelpDesk\macro6.bas)

  3. Open the project .def file, and in the tblMacro table, add a row for the new function.
  4. tName is the name of the macro.

    tFunctionName is the name of a function defined in macro6.bas.

    nType specifies what arguments the function takes:

    1 = No Arguments

    2 = Issue Record

    3 = Revision history

    4 = Expression

  5. In the tblMailContents table, add a row for the macro.
  6. Use the same tName as you did in tblMacro.

    nType specifies where to include the contents:

    1 = subject
    2 = body
    3 = attachment

    nFormatType specifies the format:

    4 = rtf
    8 = text
    14 = word
    31 = pdf
    32 = html40

    When nType = 2, nFormatType must be 8 (text). Otherwise you'll end up with a plain text e-mail message that contains RTF or PDF and is never sent. This will hold up all your notifications.

Example Macros

This function returns a string:

Public Function GetCustomSubject() 
GetCustomSubject = "Your subject goes here." 
End Function 

This function returns the contents of a text file:

Public Function GetCustomMsgBody() 
 
Dim fsObj 
Dim txtStreamObj 
Dim emailbody 
Dim strFileName 
 
strFileName = "C:\Messages\msg.txt" 
 
Set fsObj = CreateObject( 
"Scripting.FileSystemObject") 
 
Set txtStreamObj = fsObj.OpenTextFile( 
strFileName, 1, False, False) 
 
emailbody = txtStreamObj.ReadAll 
 
txtStreamObj.Close 
 
GetCustomMsgBody = emailbody 
 
End Function 

This example shows how to write a function that takes the revision history as an argument and extracts a field value.

Public Function GetSubject(oCensusApplication, lngDtsRecordID, recRevisionHistory) 
 
Dim lngLastRevisionNumber  
Dim rstValue     
Dim variablename 
 
If oCensusApplication Is Nothing Then 
Exit Function 
End If 
 
If recRevisionHistory Is Nothing Then 
Exit Function 
End If 
 
'get the last revision number 
GetRevisionNumberRange recRevisionHistory, 0, _ 
lngLastRevisionNumber 
 
' Get the value for the field from the table 
' of the last revision in the given set. 
 
Set rstValue = oCensusApplication.CurrentProject._ 
DataStores.Item(32). _ 
GetConnection(1).Execute( _ 
 "SELECT tBriefDescription FROM tblDts_History_ 
WHERE nID=" & lngDtsRecordID _ 
& " AND nRevisionNumber=" _ 
& lngLastRevisionNumber, , 1) 
 
' Build subject line that looks like: 
' HELPDESK [Ticket 37] - Cannot print PDF file 
If Not rstValue.EOF Then 
If Not IsNull(rstValue.Fields(0).Value) Then 
GetSubject =  "HELPDESK [Ticket " &_ 
lngDtsRecordID & "] - " &_ 
rstValue.Fields(0).Value 
End If 
End If  
End Function 

In the SELECT statement, tBriefDescription is the internal name for the Summary field. You can find the internal field names in the tName column of the tblDtsFields table in the project .def file.

Adding New Notification Reports

Enterprise HelpDesk can use reports to format information included in e-mail notifications. For example, the Detailed and Summary items are formatted by reports. You can define new reports and add them to the list of items that can be included in an e-mail notification message.

To add a new report for notifications:
  1. In HelpDesk Admin, use the Report Editor to define a new listing report.
  2. Save and preview the report.
  3. Exit HelpDesk Admin.
  4. Open the project .def file.
  5. Open the tblSystemCustomReports table, find the record for the report you just created, and get the nID value.
  6. Open the tblMailContents table and create a new record.
  7. Field
    Description
    nID
    Next available ID number for a record in the tblMailContents table.
    tName
    Name that will appear in the Include list in the Notification Editor.
    nType
    2 = include in message body
    3 = attachment
    tFunction
    The GenerateReport function takes care of generating the report for the notification message.
    tArguments
    <nID>.10, where <nID> is the ID of the report in tblSystemCustomReports.
    nFormatType
    4 = rtf
    8 = text
    14 = word
    31 = pdf
    32 = html40
    See Changing the Format of Attachments for more format type values.
    When nType = 2, nFormatType must be 8 (text).

The report should now be available in the Include list of the Notifications Editor.

If you’re using Crystal Reports for your listing reports, you’ll have to create a Crystal Report report file (.rpt) for the new notification report.

To create an .rpt file for your notification report:
  1. View the report in a Web view.
  2. This creates an .rpt file in the CensusWebVD\<project>_<view>\Reports folder. For example:

    C:\Program Files\PC-Duo Enterprise
    	\HelpDeskServer\CensusWeb\Views
    	\CensusWebVD\HelpDesk_HelpDesk\Reports 
    
  3. Copy the .rpt file to the HelpDeskServer\<project>\Reports folder. For example:
  4. C:\Program Files\PC-Duo Enterprise
    	\HelpDeskServer\HelpDesk\Reports 
    
  5. Rename the file by removing “portrait” (or “landscape”) from the .rpt file name.

Branding the Web View

About Branding

You can customize the look of a Web view by editing the CensusMain.css style sheet in CensusWeb\Views\CensusWebVD\Theme\css.

Put a copy of your customized style sheet in the CUSTOMIZEDFILES folder. For example, in #AllProjects#\Theme\css or #Project#HelpDesk\Theme\css.

View Toolbar

The view toolbar is the top part of a Web view, where the logo and the Help, Log Off, and other buttons are displayed.

body.TopToolbarBody sets the background color.

td.Logol sets the logo image displayed in the toolbar.

Summary List Toolbar

The toolbar has three parts: the top (with the Query, Sort, and Layout lists), the middle (the Ad-hoc Query Editor), and the bottom (used for bottom rounded corner images).

For the top part:
For the middle part:
For the bottom part:

Summary List Header

The appearance of the heading row for the Summary List is controlled by:

headerSummaryList sets properties for the entire table. The three HeaderListSummaryCell classes are used to set background images. If you don’t want to use images, you can comment out the HeaderListSummaryCell classes and use headerSummaryList to set the background and text colors.

Summary List

body.SummaryListBody formats the page background and text.

The appearance of links in the Summary List are controlled by body.SummaryListBody a:link and body.SummaryListBody a:visited.

To change the shading of the rows in the list, edit these CSS classes. The two sets of CSS classes allow for rows with alternating shading.

Tabs

The appearance of the selected tab is controlled by:

The appearance of the unselected tabs is controlled by:

For example, you could replace the background images or use solid colors instead of images.

To customize the font used for the text on the tabs, edit TabsBackgroundDown and TabsBackroundUp.

The area to the right of tabs (where the next/previous page controls are located) can be styled with tabsBody (the background color) and tabsBorder (the bottom border), and PageNavigation (the “Page X of Y” text).

To put a dividing border between the Summary List and the tab area, use border-top with tabsBody.

Form

Each tab in a Web view is a form that contains a table. The HTML looks like this:

<body class="RecordBody" >
	<form name="Record">
		<table class="RecordTab" > 

So, for example, to change the background color of the tabs, edit the body.RecordBody class in CensusMain.css.

To apply styles to the form element, you can use this selector in the style sheet:

body.RecordBody form { ... } 

Field Captions

Field captions in a Web view are formatted with the CSS classes normalfield, requiredfield, and disabledfield.

Form Elements

The CSS class applied to a form element is specified by the CSS Class field attribute in the Web View Editor. You can customize the default CSS classes or define your own and apply them to fields through the Attribute Editor.

The default CSS classes for form elements are TextBoxWidth, ComboBoxWidth, and MemoFieldWidth, InputAttachment (for the Attachments box), and InputCalendar (for date fields).

Command Bar

The command bar is the bar at the bottom of the page that contains the Issue box and the New, Save, Cancel, and Print buttons.

body.CommandBarBody sets the background color for the command bar. You can set the text color here (except for the text in the message area).

CommandBarBLeft, CommandBarBCenter, and CommandBarBRight specify the background images for the command bar.

CommandBarMsgLeft, CommandBarMsgCenter, and CommandBarMsgRight specify the background images for the message area (e.g.: “Ready. Click New to create a new issue.”) of the command bar.

ControlsCaptionDark sets the style for the “Current Issue” label.

CurrentRecord and CurrentRecordHover set the style for the Current Issue text box.

Branding the Dialogs

About Dialogs

Dialogs are pages that users open by clicking a button. This includes the Attachments, Reports, Revision History, Password, Options, and Contacts dialogs.

Most of the dialogs use the same style sheet as the Web view. However, the Contacts and Password dialogs use the CensusMain.css style sheet found in CensusWebVD\Admin\THEME\css.

Common Styles for All Dialogs

body.toolbarBody sets the background color for the dialog pages (except for the Reports dialog, which uses body.ReportsBody).

The box with rounded corners is a set of background images specified by these classes:

Attachments Dialog

body.toolbarBody sets the background color for the page.

DialogLabel formats the captions.

InputFile and InputFileHover format the text boxes.

The list of attached files is displayed in a table. HeaderSummaryListCellCenter formats the heading row (where the "File Name" and "Remove" captions are displayed).

SummaryList1 and SummaryList2 format the list of files.

DialogLabel formats the file names.

Reports Dialog

body.ReportsBody sets the background color for the page.

The appearance of the tabs is controlled by the same CSS classes that apply to the tabs in a Web view (see Tabs).

The “Report Name” caption uses the normalfield class.

The <select> element that lists the available reports uses the ReportList class.

The “Layout:” and “Viewer Type:” captions use the AdminNormalTextDarkBG class. The corresponding <select> elements do not use a CSS class, but you can use their IDs (LayoutType and ViewerType) with ID selectors in the CSS file.

Revision History Dialog

This dialog uses only the common styles.

Options Dialog

body.toolbarBody sets the background color for the page.

Captions use the normalfield class.

Form elements (such as <input>) are in a <TD> that uses the normalfield class, but the form elements themselves have no class.

Contacts Dialog

This dialog uses the CensusMain.css style sheet in CensusWebVD\Admin\THEME\css.

body.RecordBody sets the background color for the page.

The caption for the Display list uses the DialogLabel class, and the <select> element uses AdminComboBoxWidth.

On the input form for contact information, the captions use requiredfield and DialogLabel. The form elements all use AdminComboBoxWidth.

Password Dialog

This dialog uses the CensusMain.css style sheet in CensusWebVD\Admin\THEME\css.

body.toolbarBody sets the background color for the page.

normalfield formats the captions “Old Password”, “Password”, and “Confirm Password”.

AdminTextBoxWidth and AdminTextBoxWidthHover format the text boxes.

AdminNormalTextDarkBG formats the “Password can contain a maximum of 14 characters“ message.

Branding the Logon Pages

Logon Page

The heights of some of the table cells are hard-coded in CensusWebVD\logon.asp.

LogonBody sets the background color for the page.

The images and background colors for the box with rounded corners are set by these classes:

Note the mix of div and td elements. If you want to replace the images with colors and borders, set the left and right classes to the background color and use the center classes to define your border.

div.Logo inserts the Enterprise HelpDesk logo.

div.Logon-decor-img inserts the keyboard image with the orange border

LogonForm positions the logon form (the Logon Name and Password text boxes).

div.LogonField and div.PwdField position the form elements.

div.LogonCaption formats the "Logon Name" and "Password" labels.

input.LogonInput and input.LogonInputHover format the text boxes.

a.LogonState1 and a.LogonState1:hover set the images used for the Logon button.

HelpState1 and HelpState1:hover set the images used for the Help button.

ValidateLogon Page

The ValidateLogon page displays the available views. With a few exceptions (documented below), this page uses the same styles as the Logon page.

The heights of some of the table cells are hard-coded in CensusWebVD\validatelogon.asp.

ExitState1 and ExitState1:hover specify the images used for the Log Off button.

div.ViewList-m-center is used instead of div.Logon-m-center.

div.ViewList-decor-img is used instead of div.Logon-decor-img to display the keyboard image with the orange border

div.ViewLinks positions and sizes the area used to display the list of available views. This class also adds the vertical orange bar.

div.LogonCaption formats the "Click the view you want to open" string.

ViewListCaption formats the DIVs that contain the project names.

ViewList-Link, ViewList-Link:link, ViewList-Link:visited, and ViewList-Link:hover format the view names, which are hyperlinks.


Vector Logo
Vector Networks
http://www.vector-networks.com
Voice: +44 (0) 1827 67333
Fax: +44 (0) 1827 67068
info@vector-networks.co.uk
TOCPREVNEXTINDEX