I have created a few reports which like users to be able to access via url mainly. I want to hide the menu options in these URLs'. Not sure how to do this this. This link:
remove-top-links-from-report-server
would require one to modify the actual css file, while this link:
hiding-tool-bar-from-the-ssrs-report-while-using-them-in-dashboard-crm-2011
alludes to appending the url with'&rc:Toolbar=false' which i cannot get to work. So any suggestions or am i left with modifying a css file?
Try &rv:Toolbar=false instead of &rc:Toolbar=false
This worked for me.
http://msdn.microsoft.com/en-us/library/ms152835.aspx
Additionally to the answer from
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/6c4a0722-b7cc-4a77-9c28-95cb478b743f/remove-top-links-from-report-server
Please open the Report Manager folder.
In Reporting Services 2008 (R2), the folder is :\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ ReportManager.
Open the folder “Styles”.
Open the file “ReportingServices.css” using Text Editor such as Notepad.
Change the “table.msrs-topBreadcrumb” to be the following:
table.msrs-topBreadcrumb { background-color: #EBF3FF; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 84%; font-weight:normal; color:#666666;display:none}
And this I added myself :
.toolbarbuttonscell {display: none;}
Save the file.
One option that might work is to go view the report, go to IE tools->Compatibility view settings, and add the site that the report is viewed at.
Try amending the URL as below (adds 'ReportServer' and calls 'ReportViewer.aspx')
Examples:
https://devreports01/ReportServer_INST01/Pages/ReportViewer.aspx?ReportName
https://devreports01/Reports_INST01/Pages/Report.aspx?ItemPath=ReportName
I noticed that the window loaded after deployment did not include the toolbar and this was because of the URL. Seems to be the easiest way to lose the toolbar.
Follow the link to hide toolbar
LINK
I have implemented by using the below report url
http://servername:port/ReportServer/Pages/ReportViewer.aspx?ReportFolderWithReportName&rs:Command=Render&rc%3aCommand=Render&rc%3aLinkTarget=_blank
Instead of this
http://servername:port/Reports/Pages/Report.aspx?ItemPath=ReportFolderWithReportName&rs:Command=Render&rc%3aCommand=Render&rc%3aLinkTarget=_blank
For mobile reports add this as a query string parameter
rs:embed=true
You can do this configuring the object with c#, setting the "ShowToolBar" option to false. Find the file "you_report.apsx.cs" and modify the "LoadReport" action, like this:
private void LoadReport() {
this.rptViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;
rptViewer.LocalReport.ReportPath = Server.MapPath("~/path_to_you_report.rdlc");
rptViewer.LocalReport.DataSources.Add(datasource);
rptViewer.ShowToolBar = false; //This hide the toolbar
rptViewer.ServerReport.Refresh();}
Update:rptViewer.ShowToolBar = false does not work with SSRS 2016
try instead rptViewer.ShowParameterPrompts = false; it Worked for me
Related
What I want to do is let a user save an image and when they're accessing their accounts I want the image to display.
What I'm currently doing is I'm saving the images in public folder
Store the path to the database
Path: css\img\myPic.jpg
Display the image
<img class="border" src='esc($empInfo['img'])' style="height: 200px; width: 200px">
But since this is a public folder I can't save personal pictures in this folder
I also tried saving the path to writable\uploads\myPic.jpg but no luck
If you look for a manual or a concept , you can also try this:
You must have some folder where you store all personal images
When user needs it, copy the file into Public folder with a random generated 32 character name (GUID type) but with the original extension.
Then feed it to the user in the view.
Once displayed after the view is called you can delete the image from that folder.
As of the the moment. the solution that I got is "copying" the file(in my case it is an image file)from writable/uploads to public using Publish Library.
$publisher = new Publisher(WRITEPATH . 'uploads', FCPATH. 'img/');
$publisher->addPaths([
'img/myPic.jpg',
]);
$publisher->copy(true); // `true` to enable overwrite
Source Path: WRITEPATH . 'uploads'
Destination Path: FCPATH. 'img/'
Source File: img/myPic.jpg
Now you can ref the image in img tags.
Next step should be replacing/deleting the image after use, because this is not gonna be different when you upload the image at public folder. Will try to update if I found a solution
Source: https://codeigniter.com/user_guide/libraries/publisher.html
PS. Feel free to correct me :) I am also new to web developing in general
Part2: I added this to my function. what it does is after copying the image to the public folder I then rename to 'myPic.jpg'. this will solve my previous problem "replacing/deleting the image after use".
$renameFile = rename(FCPATH. 'img/'.$fileName, FCPATH . 'img/'. 'myPic.jpg');
if($renameFile){
return true;
}
else{
return false;
}
I am currently developing a Meteor React app, which is using the ostrio:files package to store audio files in a collection named Files. In another (regular mongo) collection, I am using the following code in the transform function to "join" the document with the link to the audio file:
transform: function(doc){
let curAudio = doc.audio;
let audioFile = Files.collection.findOne({_id: curAudio.file_id});
if(audioFile){
curAudio.audioLink = Files.link(audioFile);
curAudio.audioLength = audioFile.meta.length;
curAudio.audioSize = audioFile.size;
doc.audio = curAudio;
}
return doc;
}
This seems to work just fine, as the resulting audio.audioLink is something like
http://localhost:3000/cdn/storage/files/8Q7WwEXyJSkNWwFQa/original/8Q7WwEXyJSkNWwFQa.m4a
But when I try to do something like this
<audio controls preload="none" style={{width: "480px"}}>
<source src={track.audioLink} type="audio/mp4"/>
<p>Your browser does not support HTML5 audio.</p>
</audio>
To be able to play the file, everything works until I click the play button of the HTML5 player. Then, chrome outputs to the console, that the server returned 404 when the file was supposed to be loaded. I tested putting the link into the adress bar, here the server response is just
File Not Found :(
Does anyone have an idea how to fix this?
I found the answer:
My local Ubuntu installation was apparently configured to store uploaded files in /tmp, which didn't caus problems until I restarted the system or cleared my temporary files otherwise. Having the server recreate the DB fixed the problem.
Can someone help me How to check if file got downloaded from browser using selenium2library,RobotFramework.In my current test I am able to click the download button and file is getting downloaded but what happens if the file didn't get downloaded eventhough button is clicked. Any sample code is helpful.
In chrome I open the chrome://downloads page and then retrieve the downloaded files list from shadow DOM like this:
const docs = document
.querySelector('downloads-manager')
.shadowRoot.querySelector('#downloads-list')
.getElementsByTagName('downloads-item');
This solution is restrained to chrome, the data also contains information like file path and download date.
Check out this link -
http://ardesco.lazerycode.com/testing/webdriver/2012/07/25/how-to-download-files-with-selenium-and-why-you-shouldnt.html
Also, here's how you can auto-download the file to a particular directory -
FirefoxProfile profile = new FirefoxProfile();
profile.SetPreference("browser.download.folderList",2);
profile.SetPreference("browser.download.dir", #"c:\path\to\downloads \folder");
FirefoxDriver driver = new FirefoxDriver(profile);
u can use following python function to download file without showing dialog box.
Also u can set preference for which type of files save file dialog box should not get displayed.
def create_profile():
from selenium import webdriver
fp =webdriver.FirefoxProfile()
fp.set_preference("browser.download.folderList",2)
fp.set_preference("browser.download.manager.showWhenStarting",False)
fp.set_preference("browser.download.dir",'C:/Users/mra001/Downloads/Cambium_Builds')
fp.set_preference("browser.helperApps.neverAsk.saveToDisk",'text/csv/xls')
fp.update_preferences()
return fp.path
I am working on extjs 4.2 application. Trying to create a menu toolbar where I can add and delete files. For example:
When I press Open, I want to see the file browser window. And when I finish choosing the file and click "open", I will see something like this:
I know that I need to use onItemClick() function to open the browser. But I have no idea how to call that window. Also how can you program so only certain file extensions can be chosen.
I am guessing that once you press "open" on the file browser window, the file tree in the left panel will dynamically add that file. But have no idea how can I connect "open" to my tree.
Just to clarify - this is going to be user based app, it is not going to be a webapp. This will be opened in user's browser and that is it. No need to get some info from server or send something to client.
EDIT: I have been able to solve the part where you click on Open the file browser dialog pops up. Then when I select a file and press "open", it displays a message box with file's name.
Here is the code for that part:
var item = Ext.create('Ext.form.field.File', {
buttonOnly: true,
buttonText: 'Open',
hideLabel: true,
listeners: {
'change': function(fb, v){
Ext.Msg.alert('Status', v);
}
}
});
var mainmenu = Ext.create('Ext.menu.Menu', {
width: 200,
margin: '0 0 10 0',
items: [item]
});
Now the problem is that I need to get the FULL PATH of the file. This message only shows file's name. Any help?
Using files on the web can be tricky, so you're going to have to be patient, diligent, and be prepared for some self-learning.
A. If you want to be compatible with all browsers, you need to upload the file to a server, and have the server return info about the file. Or you can try Sencha Desktop Packager, flash, or signed Java Applets.
If you are okay with only modern browsers, you will need to read and learn the HTML5 File API. Here's a start:
https://developer.mozilla.org/en-US/docs/Web/API/FileReader?redirectlocale=en-US&redirectslug=DOM%2FFileReader
B. Start with a filefield button for now, and add it as a menuitem later, just to keep things simple. You will want to listen to the filefield's change event if you want to read the file.
C. To restrict file types (only modern browsers allow this), you'll need to do something like this (audio/* is just an example):
{
xtype:'filefield',
listeners:{
afterrender:function(cmp){
cmp.fileInputEl.set({
accept:'audio/*'
});
}
}
}
D. After you get the file, you will want to add it's info to the tree's TreeStore.
I have a cucumber step where the file gets downloaded, but i am unable to click the save button in the dialog box that a browser provides, with cucumber step.
I have found some pages which solves the similar kind of problems, but it didn't solve mine
How to test a confirm dialog with Cucumber?
I have included this cucumber step for file download
When /^I confirm a js popup on the next step$/ do
page.evaluate_script("window.alert = function(msg) { return true; }")
page.evaluate_script("window.confirm = function(msg) { return true; }")
end
But didn't work.
Thanks
Did you try the page.driver syntax?
i.e., from: How to test a confirm dialog with Cuccumber?:
When /^I confirm popup$/ do
page.driver.browser.switch_to.alert.accept
end
When /^I dismiss popup$/ do
page.driver.browser.switch_to.alert.dismiss
end
ian.
I know this is old, but since this was one of the first SO posts I came across when searching for solutions, I figured I'd post a solution.
We can use good ol Ruby, along with open-uri (so include open-uri in your Gemfile if you aren't already using it):
Then /^I receive a PDF$/ do
link_url = find_link("Report")[:href]
file = open(link_url)
file.content_type.should == 'application/pdf'
end