This is a migrated thread and some comments may be shown as answers.

Report / Parameters / Area

4 Answers 352 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 16 Oct 2009, 01:17 PM
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

4 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 16 Oct 2009, 04:09 PM
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.
0
Christian
Top achievements
Rank 1
answered on 19 Oct 2009, 08:25 AM
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
0
rui
Top achievements
Rank 1
answered on 19 Aug 2011, 12:58 PM
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
0
Steve
Telerik team
answered on 19 Aug 2011, 03:44 PM
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 >>

Tags
General Discussions
Asked by
Christian
Top achievements
Rank 1
Answers by
Steve
Telerik team
Christian
Top achievements
Rank 1
rui
Top achievements
Rank 1
Share this question
or