How to add hyperlink to work item id in custom reports
-
Thursday, September 06, 2012 5:53 AM
Hi all,
I have one requirement, in which i have created custom reports.
One of the report is schedule deviation, in this report it shwos work item id and corresponding deviation of the work item id. This report is in tabular format.
My requirement is when i click on any one of work item(hyperlink), it should redirect me to that particular work item, i mean it should open that particular work item form.
I am not getting how to do this, so please suggest me to do this, it would be great.
I am attaching screenshot of the custom report as well.
Thanks in advance.
Looking forward for positive replies.
T
Thanks and regards,
Santosh
- Moved by Vicky SongModerator Friday, September 07, 2012 8:16 AM (From:Visual Studio Database Development Tools (Formerly "Database Edition Forum"))
All Replies
-
Thursday, September 06, 2012 12:03 PMany luck in this?
-
Friday, September 07, 2012 8:16 AMModerator
Hi Santosh,
I do not think that you have an easy way to achieve that. Maybe you can try getting the specific work item information via TFS API which shows below, and then put the information to one dialog which is drawed yourself.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.TeamFoundation.Client; using Microsoft.TeamFoundation.WorkItemTracking.Client; using System.Net; namespace Model.WorkItemTrackings { public static class GetAllWorkItems { public static void GetWorkItems() { NetworkCredential cre = new NetworkCredential("username", "password", "domain"); TfsTeamProjectCollection tfs = new TfsTeamProjectCollection(new Uri("http://tfsserver:8080/tfs/collection"), cre); WorkItemStore wis = tfs.GetService<WorkItemStore>(); WorkItemCollection workItems = null; workItems = wis.Query(string.Format("SELECT [System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State] FROM WorkItems where System.AreaPath in 'VersionControl' where [System.Id]= 'ID'")); foreach (WorkItem item in workItems) { Console.WriteLine(item.Id + item.AreaPath); } } } }And for more information about how to add link to the report, I think you need to consult report susupport engineers directly on the Reports forum here:
http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/threads
Thanks.
Vicky Song [MSFT]
MSDN Community Support | Feedback to us
- Marked As Answer by Vicky SongModerator Thursday, September 13, 2012 3:34 AM
-
Friday, September 07, 2012 8:54 AM
Thanks vicky...
Will try and update.
-
Thursday, September 13, 2012 3:35 AMModerator
Hi Santosh,
I am marking my reply as answer. If you still have anything unclear, welcome back.
Thanks.
Vicky Song [MSFT]
MSDN Community Support | Feedback to us
-
Tuesday, September 18, 2012 8:47 PM
The warehouse contains a table with artifact links, the it contains the link moniker and you only need to add the workitemid to show the item in read only mode.
I think I have a sample I can share tomorrow. If you want to open the web access edit form you either need to update this table or create your own.
Let me get back to you
My blog: blog.jessehouwing.nl
-
Wednesday, September 19, 2012 2:43 PM
In the report we're using we're using a normal (non-mdx) query and we're usign the following table to create the display link:
inner join [dbo].[DimToolArtifactDisplayUrl] as FunctionLink ON FunctionLink.TeamProjectCollectionSK = Parent.ProjectNodeSK AND FunctionLink.ToolType ='WorkItemTracking/WorkItem'
Then in the select statement we're using
FunctionLink.[ToolArtifactDisplayUrl] + CAST(vDimWorkItemOverlay.System_ID as NVARCHAR(10)) as FunctionLink
To format the link with the correct artifact moniker.
In the report create a field, set the action of the field to type "Hyperlink" and use the link field from from the query:
<Textbox Name="FunctionName">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!FunctionName.Value</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>FunctionName</rd:DefaultName>
<ActionInfo>
<Actions>
<Action>
<Hyperlink>=Fields!FunctionLink.Value</Hyperlink>
</Action>
</Actions>
</ActionInfo>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>My blog: blog.jessehouwing.nl

