Remve the View Report button from the report
I'll like to remove the "View Report" button from the report and also I have 2 parameters, I 'll like the user select the parameters and then the report will be updated without click the "view Report" button. I search the similar topics but not finding good answers. I appreciate any quick helps since my project is due soon. Regards, Paul Chang
August 22nd, 2012 12:20pm

Hi Paul SSRS reports are rendered on two ASPX pages (Report.aspx & ReportViewer.aspx) can be found somewhere on "C:\Program Files\Microsoft SQL Server" Now, you can do following steps... 1) Run the report -> Go to view source of web page --> Note Down the ID of view Report button 2) On above mentioned aspx pages write down some JavaScript function such that on Document Load event. set the visibility of view button as false [you will have to do getElementById... use the ID copied in step#1 here] 3) You can write other JS methods for the event selection of dropdowns... And through these method -> submit the form. You can refer somewhat similar approach in the solution here... http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/c9ceddd4-54a9-4191-8a19-0b5a5954cee2 Thanks Prasoon
Free Windows Admin Tool Kit Click here and download it now
August 22nd, 2012 4:45pm

Hi Paul, I can give a try... but am not sure if we can hide the complete toolbar (i have never tried this, will see). But after looking your report, I am getting a feeling - Cant we implement this functionality using .Net Charts on aspx pages... It will be much easier to implement also you will have more control over your code and future changes on this screen will be easy. Do let me know your views and send me your email Id, I will contact you. Thanks Prasoon
August 24th, 2012 11:28am

Hi Prasoon, I watch http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/c9ceddd4-54a9-4191-8a19-0b5a5954cee2, but still do not quite understand. I put the SSRS report on my SharePoint 2010 site. I find those 2 axps and the name of the directory they are in has the name of my SharePoint site. Does that mean when I put the report on my SharePoint and the SSRS will automatically create those aspx and link to my SharePoint site? And do you have example of your aspx codes that you make changes on those aspx? Regards, PaulP. Chang
Free Windows Admin Tool Kit Click here and download it now
August 24th, 2012 12:31pm

Paul, Yes SSRS needs some ASPX page to act as platform to render its report on web browser... So these blank ASPX pages act as a container where SSRS dynamically generates the HTML Body of the report... I had a little different requirement then yours... and you will need to tell me where exactly you are having problem (in above mentioned 3 steps)... I will be in a better position to help you out. In my case, I had to hide on Parameter (radio button) on the report load... And finally on the MouseDown event, I had to change the value of that parameter.... There was an expression on the body of my report such that, if the value of Radio button is False then the body will not dispayed. Now, i set the default value of radio button as false and hide the radio button [so that user does not see it]... once the user was about to hit the View report button, I set the value of that radio button as True, so report got displayed. Below is the code... <%@ Register TagPrefix="MSRS" Namespace="Microsoft.ReportingServices.UI" Assembly="ReportingServicesWebUserInterface" %> <%@ Page language="c#" Codebehind="Report.aspx.cs" AutoEventWireup="false" Inherits="Microsoft.ReportingServices.UI.ReportWrapperPage" EnableEventValidation="false" %> <script language = "Javascript"> function pageLoad() { var obj=document.getElementsByTagName("*"); //alert('hello-1 ' + obj.length); for(var i=0;i<obj.length;i++) { if (obj[i].id=="ctl31_ctl04_ctl11") ////ctl31_ctl04_ctl11 -- is ID of my Radio button control { obj[i].style.visibility = "hidden"; } } }; function document.onmousedown() { var obj1=document.getElementsByTagName("INPUT"); for(var i=0;i<obj1.length;i++) { if (obj1[i].type=="radio") { //alert('hello-2 ' + obj1[i].type + ' id=' + obj1[i].id + ' name=' + obj1[i].Name + ' value=' + obj1[i].value); //ctl31_ctl04_ctl11_rbTrue -- is ID of my Radio button element document.getElementById('ctl31_ctl04_ctl11_rbTrue').checked = true; } } //return true; }; </script>
August 24th, 2012 12:44pm

Hi Prasoon, This is what I need to do: And this is what I have: So I need to remove the "View Report" button and the tool bar and when the user select "PARISH" and "YEAR" the data on the table and the chart will updated (do not need to click the "View Report" button). I have download the source code of the web page and it has 591 lines which is created by SharePoint Automatically. It's too big to post the source code here. Do you have email account that I can attach the source to you? I believe you should be able to solve my problems.Regards, Paul P. Chang
Free Windows Admin Tool Kit Click here and download it now
August 24th, 2012 4:56pm

This what I need to do: This is what I have: P. Chang
August 24th, 2012 4:59pm

Hi Prasoon, I am new for the SP and I have no idea how to put the .net chart/code on the SP page. Can you give me more idea how to do it? Regards, PaulP. Chang
Free Windows Admin Tool Kit Click here and download it now
August 29th, 2012 12:49pm

Paul, You will have to create a Web Projects and create an aspx page with chart on it. Then add this aspx in your sharepoint site. Below are the references for same. Chart Control in ASP http://www.4guysfromrolla.com/articles/072909-1.aspx http://www.codeproject.com/Articles/235117/ASP-NET-4-0-Chart-Control Try to Google for "Adding .Net Chart on ASPX page"... As your chart is pretty simple, with little customization\coding on chart... you will be able to make it for sure. How to add your Aspx to SharePoint 1. Open a new Visual Studio Web Application project. 2. Add a new aspx page and develop the code per your requirement. Ensure you add references to Microsoft SharePoint dll's. 3. Strong name and Compile the code. 4. Place the .aspx file in 14/templates/layouts folder. and copy the dll from the bin folder of your application to GAC. 5. Add new assembly details in the compilation tag of the web applications configuration file (where this is required) 6. You are done, access your custom aspx page http://<sitesollectionUrl>/_layouts/<yourcustompage>.aspx Note: Please remember that this is not a standard approach to build the custom pages for SharePoint, however this provides a very easy way to start and learn custom aspx pages for SharePoint. Refer:http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/2a43442c-2083-44b8-aece-8aa0ba39837d/ There are other ways for adding a control in SP, as you can create a Custom Control on Webparts... but I do not have much idea about those. The above method work with ease. Thanks Prasoon
August 29th, 2012 7:55pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics