Home
Analytics
Hyperlink to access a file
rajkishore
<p>Hi,</p>
<p> </p>
<p>How can I access to the file which is reside in the share folder/localsystem using hyperlink?</p>
<p> </p>
<p>i tried in hyperlink URI as "file:/C:<filepath>" , but it is not opened/download.</p>
<p> </p>
<p>does anybody have example or sample report please let me know.</p>
<p> </p>
<p>Regards</p>
<p>Kishore G</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
JFreeman
<p>What is your use case for this?</p>
<p>What web browser are you using?</p>
<p> </p>
<p>Any recent version of Chrome or Firefox will block these types of downloads by default for security reasons.</p>
rajkishore
<p>Use Case : i need to download an xml file which is reside in a linux machine.</p>
<p>Web Browser : i am using actuate web viewer. </p>
<p> </p>
<p>1. is there any way with out uploading the xml file in iportal can we access. if we place in iportal home or resource folder we can able to access using relative path. if i place that xml file in iportal installed machine (linux) can we able to access using absolute path?</p>
<p> </p>
<p>Regards</p>
<p>kishore G</p>
JFreeman
<p>For security reasons, I do not believe you are going to be able to hyperlink to an absolute path on the physical file system of the server.</p>
<p> </p>
<p>Instead, using a relative path to a file located within the iportal/tomcat, as you have mentioned, is going to be the way to set it up.</p>
rajkishore
<p>Thanks. Is there any other way, do we can write a java class to download or access functionality of the file which is located in file system that can integrate with BIRT report. </p>
JFreeman
<p>You could do this by creating a Java class and then including the jar as a resource for the report. Then you can call the Java class from within the report design as needed.</p>
rajkishore
Thanks JFREEMAN .appreciate if you could have such kind of example reports do let me know.<br><br>
Regards<br>
Kishore G
JFreeman
<p>After you create the java class to perform your desired download functionality, create the jar and then include it in your report design as a resource.</p>
<p> </p>
<p>Then you can import the class in the desired portion of the report design with java script and then call the needed method(s).</p>
<p>For example:</p>
<pre class="_prettyXprint _lang-js">
importClass(Packages.my.package.name.className);
methodFromClassToRun();
</pre>