Report / Parameters / Area

5 posts, 1 answers
  1. Christian Pardun
    Christian Pardun avatar
    112 posts
    Member since:
    May 2010

    Posted 16 Oct 2009 Link to this post

    Hello Telereilk-Team,

    1.
    I have a report with parameters and one of this parameter have the UI.Visible property as true.
    So if I open the report through the report viewer the report is shown with the parameter area as visible and the image button on the report viewer is marked/selected.

    Everything is nice but I want to hide the parametes area as default and if the user click on the image button "Parameters" the parameters area will be shown first.

    Is this possible to set as the deault behavior?

    2.
    Whats about the plans to make the parametes area customizable?
    I want to change the ASP:Button to an ASP:LinkButton.
    Is this possible, too?

    Best wihses
    Christian
  2. Answer
    Steve
    Admin
    Steve avatar
    10941 posts

    Posted 16 Oct 2009 Link to this post

    Hello Christian,

    Up to your question:
    1. There is no such out of the box functionality in our web viewer. However you can handle this with the help of some javascript:

       <telerik:ReportViewer ID="ReportViewer1" runat="server" >
              </telerik:ReportViewer>
                      <script type="text/javascript">
                      function hide()
                      {
                         var viewer = <%=ReportViewer1.ClientID%>;
                         viewer.set_ShowParametersArea(false);
                      }
              </script>      
    2. By customizable we refer to ability for changing colors, text, applying css styles to it and in general formatting. Since you want to replace a default control in it, you would need to create your own UI and wire it up through the Report API. For example for replacing the Preview button with a linkbutton, you would need to refresh the report and this is done through the RefreshReport() method:

        protected void LinkButton1_Click(object sender, EventArgs e)
          {
              ReportViewer1.RefreshReport();
          }

    All the best,
    Steve
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. Christian Pardun
    Christian Pardun avatar
    112 posts
    Member since:
    May 2010

    Posted 19 Oct 2009 Link to this post

    Hi Steve,

    thanks alot for helping again.

    All the answers are fit my questions.

    An idea is that Telerik put in the option to the report control to handle the behavier of the parameter area button. So that everyone could set this optiuon trough the control itself. Would be nice :)

    Thanks alot.

    Best wishes
    Chrsitian
  5. rui
    rui avatar
    1 posts
    Member since:
    May 2011

    Posted 19 Aug 2011 Link to this post

    Hi Telerik-Team

    I have started to use the Telerik ReportViewer these days and i am a bit troubled about this ParametersArea button.
    In any aspx page i add this ReportViewer that button is never shown. Note that i have already made ShowParametersButton true. Also tried the script you wrote here and nothing.
    The odd thing is that it is visible on the design page.

    Can you please help me.

    Thanks,
    Rui
  6. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 19 Aug 2011 Link to this post

    Hi Rui,

    The report parameter area would be shown when at least one report parameter has its Visible property turned on. When at least one visible report parameter has AutoRefresh property turned off, a Preview button is available. So in short you should have a Visible report parameter with AutoRefresh=false, only then a Preview button would be available in the report parameter area. This information is available in the Report Parameters help article.

    Kind regards,
    Steve
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top
DevCraft banner