SSRS Drill through GO To URL Target=_Top - reporting-services

GO To URL is used for SSRS Drill through and it is adding target=_top automatically which makes url to open in new window. My requirement is to open the url in same window (target=_self). I am thinking target=_top is added in server level or in some configuration level.Can you please help to identify the spot on where the change the target attribute which is added automatically.
Thanks for your help.

Issue is fixed. Added the below in the end of the given open url
&rc:LinkTarget=_self&rc:Parameters=false"

Adding to the querystring is not an option for me because I need the link to communicate with a parent frame and open another framed "virtual tab". The following works for me with SSRS 2019.
Modify
\Program Files\Microsoft SQL Server Reporting Services\SSRS\ReportServer\Pages\ReportViewer.aspx
And change the RS tag from:
<RS:ReportViewerHost ID="ReportViewerControl" runat="server"/>
to
<RS:ReportViewerHost ID="ReportViewerControl" runat="server" HyperlinkTarget ="_self"/>

Related

How to show File Saveas Dialog in Blazor Server App

I am new to Blazor and trying to show File Saveas Dialog as shown in following link on a button click.
Save as Image
The requirement is - upon clicking the Saveas button above Saveas dialog should be popped up where user can choose the destination of file and file name.
I have tried "enabling the setting to check the save location in the download settings of the browser" and it works. But we do not want to depend on the Browser settings.
Please add your thoughts on below..
Instead of depending on the browser settings is there any other way to show Saveas dialog?
Are there any open source Nuget packages available to help on this?
NOTE: I am using .NET 6.0 for building my application
Thanks in advance,
Bhargavi Gowri.
I also wanted to bring up a window to save a file in which the user could select a folder. Before that, the system automatically saved to the Downloads folder.
As I understood, there was no such possibility before, but now it is possible thanks to this api: https://caniuse.com/native-filesystem-api.
I found this solution in the answer to this question: https://stackoverflow.com/a/70001920/16740180.
It's worth noting that I use Blazor WebAssembly and not a Blazor Server. And I do not know if it will work for you.
Unfortunately, this doesn't work for mobile devices right now, but it works fine for windows. I hope this helps someone.
This isn't a Blazor thing. In web browsers, files are downloaded from links using <a> tag in HTML using the download attribute. Just create a link to your file:
<a href="path_to_file" download>Save</a>
Save
The path must be on the same server, but blob and data links will work as well.
If you do not suggest a name, the browser will use the original filename (possibly changed to remove symbols the OS doesn't allow in file paths).
https://caniuse.com/download
If you want your link to look like a button, then that's a different issue, and you can google or ask that.

Using a Paremeter when opening a link in SSRS

I'm struggling a bit here so hopefully someone will be able to help me out.
We're trying to open up a file which is on our servers, by clicking on a link in an SSRS report (using the Go To URL part).
The link works fine when we put it in a web browser, so I know the problem isn't a security issue.
Basically it looks like this...
="\\servername\foldername\"+Parameters!ParameterName.Value+".pdf"
This only opens in the same window in a web browser - how do I get this to open in a new tab?
Thanks!
You can set that URL to be anything you want, including javascript. This allows you to control how the link behaves, for example specifying the target for the link to open in:
="javascript:void(window.open('\\servername\foldername\"+Parameters!ParameterName.Value+".pdf','_blank'))"
In this case it is the '_blank' part of the javascript window.open function that targets either a new tab or a new window depending on your browser settings.
What was needed to be done in this case to solve this, was it needed to be set out as follows:
="Javascript:void(window.open('file://[servername]/[foldername]/" + Parameters![ParameterName].Value + ".pdf','_blank'))"

How to hide the breadcrumb in ssrs report manager

I have created a report and uploaded it in Report manager in SSRS. I have a asp.net web page where I have a hyperlink that has the URL to open the report in the report server. Now when the report opens user can see the report path on the breadcrumb. My question is how to hide that? My hyperlink is
/ReportsDev/Pages/Report.aspx?ItemPath=%2fCFM%2fCurrentGeneralLedger%2fInterestCharges')">
I have tried &rv:Toolbar=false after the link but didn't work.
I cannot change style as suggested in a link by going
:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ ReportManager as I don't have permission.
Any suggestion will be helpful!
what i do to hide breadcrumb is
instead of going to (default site)
http://servername/Reports/Pages/Folder.aspx
and then navigating to the report
i go to
http://servername/ReportServer
I have been trying to find the same answer and realised the below.
Considering the link:
http://servername/Reports/Pages/Report.aspx
If in the above scenario "Reports" is named something else for e.g. "Reports_foobar" then the equivalent for report viewer would be "ReportServer_foobar" as below:
Report aspx:
http://servername/Reports_foobar/Pages/Report.aspx
ReportViewer aspx:
http://servername/ReportServer_foobar/Pages/ReportViewer.aspx

How to control the target frame of reporting services (SSRS) drill down

I am using SQL 2005 reporting services (SSRS) with the web report viewer control. It is showing the report inside an IFRAME on the web page. If I implement a drill down functionality, by attaching a URL action to a chart elements, the navigation will happen only inside the IFRAME. I know how to set the target frame for navigation on a normal HTML page. But in the report definition (RDL) I can't find any property to select the target frame.
Any solution or workaround?
hmm it appparently didnt post my last reply. You might try adding the rc:LinkTarget querystring parameter to the IFRAME src. I use "&rc:LinkTarget=_blank" on some charts displayed in an IFRAME and they open the full report correctly.
http://msdn.microsoft.com/en-us/magazine/cc188712.aspx
I don't believe that the RDL has that option built in. Try adding it as a connect item and see if they will add it to a future version of SQL Server.
If you override the HTML Render method, and pass some DeviceInfo parameters, you can accomplish this.
Take a look at http://msdn.microsoft.com/en-us/library/ms155395.aspx
There is a LinkTarget property that would handle this.

How to open an external file from HTML

I want a list of hyperlinks on a basic html page, which point to files on our corporate intranet.
When a user clicks the link, I want the file to open.
They are excel spreadsheets, and this is an intranet environment, so I can count on everyone having Excel installed.
I've tried two things:
The obvious and simple thing:
Click me!
A vbscript option that I found in a Google search:
<HTML>
<HEAD>
<SCRIPT LANGUAGE=VBScript>
Dim objExcel
Sub Btn1_onclick()
call OpenWorkbook("\\server\directory\file.xlsx")
End Sub
Sub OpenWorkbook(strLocation)
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = true
objExcel.Workbooks.Open strLocation
objExcel.UserControl = true
End Sub
</SCRIPT>
<TITLE>Launch Excel</Title>
</HEAD>
<BODY>
<INPUT TYPE=BUTTON NAME=Btn1 VALUE="Open Excel File">
</BODY>
</HTML>
I know this is a very basic question, but I would appreciate any help I can get.
Edit: Any suggestions that work in both IE and Firefox?
Try formatting the link like this (looks hellish, but it works in Firefox 3 under Vista for me) :
file.ext
<a href="file://server/directory/file.xlsx" target="_blank"> if I remember correctly.
If your web server is IIS, you need to make sure that the new Office 2007 (I see the xlsx suffix) mime types are added to the list of mime types in IIS, otherwise it will refuse to serve the unknown file type.
Here's one link to tell you how:
Configuring IIS 6 for Office 2007
You may need an extra "/"
Click me!
If the file share is not open to everybody you will need to serve it up in the background from the file system via the web server.
You can use something like this "ASP.Net Serve File For Download" example (archived copy of 2).
A simple link to the file is the obvious solution here. You just have to make shure that the link is valid and that it really points to a file ...
You're going to have to rely on each individual's machine having the correct file associations. If you try and open the application from JavaScript/VBScript in a web page, the spawned application is either going to itself be sandboxed (meaning decreased permissions) or there are going to be lots of security prompts.
My suggestion is to look to SharePoint server for this one. This is something that we know they do and you can edit in place, but the question becomes how they manage to pull that off. My guess is direct integration with Office. Either way, this isn't something that the Internet is designed to do, because I'm assuming you want them to edit the original document and not simply create their own copy (which is what the default behavior of file:// would be.
So depending on you options, it might be possible to create a client side application that gets installed on all your client machines and then responds to a particular file handler that says go open this application on the file server. Then it wouldn't really matter who was doing it since all browsers would simply hand off the request to you. You would have to create your own handler like fileserver://.
This works in Firefox 96 in macOS 12, and should work in other browsers and in Windows too:
open file
Your first idea used to be the way but I've also noticed issues doing this using Firefox, try a straight http:// to the file - href='http://server/directory/file.xlsx'