Quantcast
Channel: LANDESK User Community : Document List - All Communities
Viewing all articles
Browse latest Browse all 6338

Replacing the standard print function in Web Access with a Print Icon

$
0
0

Note:

This article will allow you to create a calculation that will load the report up in Crystal Report Server. As a default you will only be given 5 concurrent licenses for Crystal Report Server. This means that if you have a lot of users loading a lot of reports you will run out of licenses very quickly. The concurrent licenses will also not release properly as you cannot log out properly from Crystal Report Server when viewing the report like this.

 

If your users only need to view reports, please instead see the below article where you will be using Crystal Runtime to view the report instead, meaning you will not be affected by the limitation in the licenses: http://community.landesk.com/support/docs/DOC-21766

 

-----------------------------

 

 

Purpose

This document details the steps required to replace the standard ‘print’ functionality within Web Access with a form-by-form print icon.

 

Intended Audience

This document is designed to provide information to an experienced LANDesk Service Desk administrator.

 

Assumptions

It is assumed that there is a functional installation of LANDesk Service Desk and Crystal Reports Server 2008 and that the required Crystal Reports have been configured and published to the Crystal Reports Server. Information relating to this can be found here http://community.landesk.com/support/docs/DOC-23051.

 

Approach

1. Obtain the ‘ID’ of the report you wish to use to provide the print functionality.

Open the Crystal Reports Server Central Management Console (CMC) and browse to the location of the report. Right click on the report and select ‘Properties’.

 

1.jpg

 

Note the ‘ID’ of the report. In this example the ‘ID’ is 1016.

 

2.jpg

 

 

As the report will require the GUID of the incident for example, we need to pass the value to the report at runtime. To achieve this, we need to note the name(s) of the parameters. Again, right click on the report and select ‘View’. Note the name of the prompt in the top right hand corner of the prompt. In this example the prompt is ‘Guid’.

 

3.jpg

 

2. In order to provide the print functionality via clicking an icon we need to copy an image to an accessible location. In this example the following image and path have been used:

 

/ServiceDesk.WebAccess/Content/Images/Printer.jpg

 
3. Within LANDesk Service Desk (LDSD) we need to create a calculation to create the URL that will be used to print the report.

 

Open Business Object Designer and browser to the relevant domain and object you wish to create the print functionality for. In this example, the calculation is been created at the Incident Management – Incident level.

 

Create a new String (-1) html attribute and name it accordingly. For this example the attribute has been named as ‘Print Report Calculation’.

 

4.jpg

 

 

Set a calculation type of ‘Before Save’ and enter a calculation using the following as an example:

 

import System

static def GetAttributeValue(Incident):

        Image = '/ServiceDesk.WebAccess/content/images/Printer.jpg'

        Item = Incident.Guid

        Bracket = '{'

        Bracket2 = '}'

        if Incident.Status.Title != null:

               return String.Format("<a href='http://SERVERNAME:8080/CrystalReports/viewrpt.cwr?&apsuser=USERNAME&apspassword=PASSWORD&apsauthtype=secEnterprise&id=ID&promptex-Guid={0}{1}{2}'><img title='Print Incident' src='{3}' height='40px' width='40px'></a>", Bracket, Item, Bracket2, Image)

 

        Where:

               SERVERNAME = The name of your Crystal Reports Server.

USERNAME = The Crystal Reports Server username that has permissions to the report in question.

PASSWORD = The password for the user you are using.

ID = The ‘ID’ of the report you obtained in step one.

Set the dependency for the calculation to be the Incident.Guid

 

4. Open Window Manager and modify the relevant form. Add the attribute and format as required that was created in step three to the form and save the changes.

 

5. In order to prevent the default print option been displayed we need to modify the location of the reports. To do this browse to the location of the reports that are used in Web Access.

 

This can be found via Configuration Centre within the settings for the relevant Web application.

 

Typically this is:

C:\ProgramData\LANDesk\ServiceDesk\ServiceDesk.WebAccess\Reports

 

Either delete or rename the reports folder. Suggestion is to rename the folder.

 

6. Test by logging an incident, saving and selecting the ‘print icon’ displayed on the form.

 

5.jpg


Viewing all articles
Browse latest Browse all 6338

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>