Showing posts with label SSRS. Show all posts
Showing posts with label SSRS. Show all posts

Friday, May 11, 2012

How to add break line and a link in comments field in SSRS “Manage Subscription” page ?

Environment: Project Server 2007/ SSRS component integrated with SharePoint 2007/ iPad

Issue:


There is good news for SSRS developers/Admin using SSRS email subscription in Project Server/SharePoint environment. Sending emails (out of the box feature) using “Comments” field for email body (see Fig “A” below) is always excited but  a few restrictions like not using break line and link made developers very uncomfortable to sell this part. Keep in mind this comments field is a Text field. MS Outlook client was smart and considering any text as URL (if starts with Http://...”) but if you open the same email on Outlook Web App/Mobile/iPad, it shows URL simply like a text with no link (see Fig “B” below)


                                                                                                   Fig “A”


                                                                                               Fig “B”

These restrictions continue till SQL Server 2005 but luckily SQL server 2008 addressed this issue and allowed developers to use HTML tags in the Comment text field.


Solution:

As I mentioned that SQL Server 2008 allows us using HTML tags to put break line and links.  As an example, I will show the changes to achieve this result.

In Comments field on "Manage Subscription” window, enter the following

This week's Flash Reports are available. Please click the following URL to access the documents <a href="http://epmxxx.com/exec/default.aspx"> http://epmxxx.xom/exec/default.aspx</a> <br/> If you have any issue, please contact to Support group.

And you will see the following output on Outlook Web App/Mobile/iPad


 

 I am sure this is very good news to all Admin/Dev who want to use Out of the box features as much as possible and make their clients happy.

I hope it helps!

Thursday, June 30, 2011

Issues in line and Bar chart in SSRS report (Project Server 2007) after migration from 2005 to 2008 version

Issue:

After converting my reports (created in 2005 version) to SSRS 2008, one of my reports had an issue on X- axis with line and bar charts disappearing values on randomly basis (see screen shot). This report shows MS Project schedule tasks information with time line showing in Gantt chart. Initially, I thought that it will be resolved after updating height adjustments but no luck. I realized that the Chart control's configuration/properties in SSRS 2008 have been changed what I had in 2005 version.



Solution:

After a couple of hours investigation, I found a solution that helped me to fix this issue as follows

1-    Right click on X-axis and click “Axis Properties”


2-     In the "Category Axis Properties", do the following

·         Under the "Set Axis Scale and Style" section, there is a check box named "Enable variable interval” displaying underneath “Interval” field, enable this check box
·         Enter “1” in the “Interval Type” drop down values.  “1” means "default" setting. Click OK.

(See the attached screen shot below)


3-      Run the report and it will fix the missing gap on X-axis and show the correct field as below





Note: Bar chart offers now dynamic height and width changes properties in the SSRS 2008 version which was not available in version 2005. You can create expressions to adjust height and width dynamically (i.e. on run time) based on the number of available data...I liked the new flexible Bar chart in SQL Reporting services 2008 BI.

Hope it helps!  

Friday, May 20, 2011

How to retrieve comments, notes and any assignment level custom tasks field information in “Task update” page in PWA 2007?

Issue:

The “Task Update” data grid is hard wired and does not offer adding new fields for e.g. notes and comments. It allows changing column order but it does not save it and every time PM has to reorder the columns.

One of my clients wanted to get one page report showing all the desired information in correct order including comments and notes data(see attached screenshot). Project Manager was getting annoyed clicking each task link and seeing the submitted comments. In addition, there is no indication to show if a resource has submitted any comments on a particular task.


Solution:


I had two choices; either to extend the existing “Task Update” web part or to create a custom report in SSRS showing all the required fields data. I chose the 2nd option and created an SQL that fulfills my client requirements. The Project Manager/Scheduler would be able to see only his/her own resources submitted tasks information exactly the same what they are seeing in the “Task Update” page. This SQL runs on Published database.

Enjoy the SQL. I HOPE IT HELPS!


SQL Query:



SELECT P.Proj_Name,TSK.TASK_ID,TSK.TASK_WINPROJ_UNIQUE_ID AS 'TASK_UID',A.Task_name,A.ASSN_START_DATE AS 'START',A.ASSN_FINISH_DATE AS 'FINISH',

     (SELECT ACFV.DATE_VALUE
      from MSP_ASSN_CUSTOM_FIELD_VALUES_SAVED AS ACFV
      INNER JOIN MSP_CUSTOM_FIELDS AS MCF
      ON ACFV.MD_PROP_UID=MCF.MD_PROP_UID_SECONDARY
      AND ACFV.MD_PROP_ID=MCF.MD_PROP_ID_SECONDARY
      WHERE MCF.MD_PROP_NAME LIKE 'Actual_Start'
      AND ACFV.PROJ_UID LIKE A.Proj_UID
      AND ACFV.ASSN_UID LIKE A.ASSN_UID) AS 'ACT_START_VAL',

     (SELECT ACFV.DATE_VALUE
      from MSP_ASSN_CUSTOM_FIELD_VALUES_SAVED AS ACFV
      INNER JOIN MSP_CUSTOM_FIELDS AS MCF
      ON ACFV.MD_PROP_UID=MCF.MD_PROP_UID_SECONDARY
      AND ACFV.MD_PROP_ID=MCF.MD_PROP_ID_SECONDARY
      WHERE MCF.MD_PROP_NAME LIKE 'Estimated_Finish'
      AND ACFV.PROJ_UID LIKE A.Proj_UID
      AND ACFV.ASSN_UID LIKE A.ASSN_UID) AS 'EST_FINISH_VAL',

                       

((A.ASSN_WORK/480000)* 8) AS 'WORK', ((A.ASSN_ACT_WORK/480000)* 8) AS 'ACT_WORK', ((A.ASSN_REM_WORK/480000)* 8) AS 'REM_WORK',
A.ASSN_PCT_WORK_COMPLETE as 'PercentComp',TSK_SUBM.TASK_PHY_PCT_COMP AS 'PhysicalPercent', R.RES_NAME,RM.RES_NAME AS 'OWNER', A.WASSN_Comments AS 'NOTES',
(SELECT Stuff((
           SELECT  ',' + MSP_ASSIGNMENT_TRANSACTIONS_COMMENTS.ASSN_TRANS_COMMENT
           FROM  MSP_ASSIGNMENT_TRANSACTIONS_COMMENTS
           LEFT JOIN MSP_ASSIGNMENT_TRANSACTIONS ON MSP_ASSIGNMENT_TRANSACTIONS_COMMENTS.ASSN_TRANS_UID = MSP_ASSIGNMENT_TRANSACTIONS.ASSN_TRANS_UID
           WHERE MSP_ASSIGNMENT_TRANSACTIONS_COMMENTS.ASSN_TRANS_UID = ASGN_TR.ASSN_TRANS_UID
           For                    XML Path('')
          ),1,1,'') ) AS 'COMMENTS'


FROM MSP_ASSIGNMENTS_SUBMITTED AS A
INNER JOIN MSP_PROJECTS AS P
ON P.Proj_UID=A.Proj_UID
INNER JOIN MSP_RESOURCES AS R
ON R.RES_UID=A.RES_UID
INNER JOIN MSP_ASSIGNMENT_TRANSACTIONS AS ASGN_TR
ON ASGN_TR.ASSN_UID=A.ASSN_UID
INNER JOIN ASSIGNMENT AS ASGN
ON ASGN.ASSN_UID=A.ASSN_UID
INNER JOIN MSP_TASKS AS TSK
ON TSK.TASK_UID=ASGN.TASK_UID
INNER JOIN MSP_TASKS_SUBMITTED AS TSK_SUBM
ON TSK_SUBM.TASK_PUBLISHED_UID=TSK.TASK_UID
INNER JOIN MSP_RESOURCES AS RM
ON RM.RES_UID=A.WRES_UID_Manager
WHERE ASGN_TR.ASSN_TRANS_UPDATE_DATE IS  NULL

    
Notes: It does not show all the comments history submitted by resources that have been approved in the past. It shows only the current comments (one or more) which are in the pending mode.