This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Hyperlink Item on Visual Studio Report to open Innovator Form

goganos - Friday, January 13, 2012 9:13 AM:

Hi There,

I've created a  Report Studio report which is a simple list report and was able to run the report from within Innovator.  What I'd like to do next is be able to Click on any of the IDs in the Report Studio report and open a specific form in Innovator.  I was able to setup a Hyperlink and dynamically pass over the ID but I'm prompted to login to Innovator again which spawns a new instance of Innovator.

Is there a way to pass the credentials through so that I don't need to login again?  

Thanks in advance



Pravin Kumar - Monday, October 15, 2012 4:12 PM:

Hi there,

I have a similar need where I would like to put hyperlinks on the report output that can take me directly to the Item type. Can you please share how you were able to set up the hyperlink (what URL should be used to call the default view of a ItemType) and also if you have figured out how to pass the login credentials to view the data?

Appreciate your response.
Thanks,
Pravin

Dave_Rollinson - Tuesday, October 16, 2012 10:25 AM:

Hi Pravin

You can launch any Innovator Item using a URL like:

http://[innovator server name]/[Innovator root]/?StartItem=[ItemType Name]:[Item ID]

e.g.

http://myInnovator.com/InnovatorServer/?StartItem=Document:0123456789ABCDEF0123456789ABCDEF

If you're a subscriber, you can use Windows Authentication to automatically log in and set this to bypass the login screen.



Pravin Kumar - Wednesday, October 17, 2012 1:22 PM:

Thank you, Dave! this was helpful .
Do you know if there is a way to pass the login credentials and get to the Item directly ?


goganos - Wednesday, October 17, 2012 2:55 PM:

Hi Pravin,

We have lists on some of our reports that pull a mix of different Item Types (a mix of documents, ECRs, ECNs, etc).

In my Report Dataset, I made sure to pull the Item_Type from the database into a field called Type_Item which contains the exact name of the Item Type in Innvoator such as Document, ECR, ECN...  I then added a calculated field in the Report Dataset entitled "DrillToItemType" and put the following script in it...

="BLOCKED SCRIPTvar itm = opener.top.aras.getItemById('"+Fields!Type_Item.Value +"','" + Fields!id.Value +"',0);opener.top.aras.uiShowItemEx(itm,undefined,true);window.location='http://SERVER URL/InnovatorServer/Server/RSGateway.aspx?irs:Report=REPORTNAME&rs:Format=HTML4.0';"

You will need to change the SERVERURL and REPORTNAME to the right values in your environment.  Also, the ID column is the ID of the specific Item as pulled from the Innovator database.

In the Layout explorer of the report studio, I added the following logic to a field which displays the Name of the Item (doc 123)... (in the actual list on the report).  So on the Item, I clicked on Action property and selected Jump to URL.  

=Fields!DrillToItemType.Value

So when the report is now run, it lists all the objects in a list (documents, ecr, ecns).  There is now a hyperlink on the name of each of the items that I can click on and it opens up the Innovator Form.

Please note that this logic only works when the Report is run in HTML. (functionality won't work in PDF)

Hope this helps...

Thanks,

Phil



Pravin Kumar - Wednesday, October 17, 2012 5:22 PM:

Hi Phil,

Thank you! for sharing your approach.

I figured a similar way by querying for the CONFIG_ID from the DB which brings the ID of the item type.Using the dataset field on the report layout where I wanted to display the link, I enabled the action property (Go to URL) with an expression that contains javscript to build a URL (provided by Dave!) with the config_id value that points to the item in the Innovator DB. I did realize that the links were only working when the output format was set to HTML. Also every link required a separate login.

Regards,
Pravin