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

skin and style for report parameter controls in report

2 Answers 169 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alirzea Fatehi
Top achievements
Rank 1
Alirzea Fatehi asked on 24 Oct 2010, 11:25 AM
Hi
I have a report that use report parameter to filter some data,and also I have master page with form decorator in it.
I set skin  property of report viewer to Hay (for example) to report get style.
but report parameter did not get any style.
Now my question is:
how can I set skin or style for report parameter controls in my report?
for example my date picker in report parameter or my drop down list have an Hay skin.

2 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 26 Oct 2010, 01:42 PM
Hi Alirzea Fatehi,

The Report Parameter UI can't be customized, thus our suggestion is to use a custom UI for the parameter's as shown in the attached sample project.

All the best,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Brian
Top achievements
Rank 1
answered on 08 Nov 2012, 11:24 AM
This is not entirely true. (There is no build-in way to do it).
Since the iframe and page is on the same domain, you can just inject a stylesheet into the head section of the DOM object.

Here is how you do it:
  1. In your aspx / ascx page, add the following javascript:
    <script type="text/javascript">
    $('#ReportViewer1ParametersArea').load(function () {
    $(this.contentDocument).find('head').append('<link rel="stylesheet" href="/ThePath/ToYour/CSS/CustomReportParamArea.css">');
    });
    </script>
  2. Just remeber, that usually the ID of the frame will be a server generated ID, so you have to add the ClientIDMode="Static" parameter to your reportviewer.
    <telerik:ReportViewer ID="ReportViewer1" runat="server" Width="960px"
                              BackColor="Transparent"
                              ViewMode="PrintPreview"
                              Font-Names="Arial"
                              ProgressText="Busy..."
                              ClientIDMode="Static">

    Hope this solve your problem.
    I do not know about the older IE7 type of browser, but in the new ones this does work.
    In my instance, I have created a DotNetNuke module can be used to show any report (based on what reports is found in your web applications' dll)
Tags
General Discussions
Asked by
Alirzea Fatehi
Top achievements
Rank 1
Answers by
Peter
Telerik team
Brian
Top achievements
Rank 1
Share this question
or