I see that the Report Viewer Control has a number of properties that can be
set to control things like the control's border color and width, the
background color of the toolbars, the border and color of the buttons, etc.
However I have some additional formatting requirements:
1. How do I control the font properties (face, color, etc.) for the report
parameter labels and other text in the toolbars?
2. Is there a way that I can force the report parameters to render in a
single column or otherwise control their layout? They normally render across
the page and then down which sometimes results in an unusual order for the
user to see them. I know I could create custom report parameter forms but I
am trying to avoid that.
--
Chris, SSSIHi Steven,
Thank you for your reply. I have some follow up questions:
>>Based on my test, all the text's Font settings can be configured through
>>the ReportViewer control's "Font" property.
1) I see those settings in the Properties window, but how do I set these
font settings programatically?
2) The Microsoft.Reporting.WebForms.ReportViewer class has a Font property,
but it is ReadOnly. So how do I set these settings in code at runtime? Can
the font settings only be set at design time?
>>I've attached a screenshot on the setting of this Font property on my test page.
3) I do not see a screenshot attached to your posting. Did you forget to
attach it?
>>so it won't affect our rendered report's text font.
That is fine and actually the behavior I want.
--
Chris, SSSI
"Steven Cheng[MSFT]" wrote:
> Hello Chris,
> As for the two questions you mentioned, here are my understanding and
> suggestion:
> 1. How do I control the font properties (face, color, etc.) for the report
> parameter labels and other text in the toolbars?
> ==============================================> Based on my test, all the text's Font settings can be configured through
> the ReportViewer control's "Font" property. This property will affect the
> text on every element on reportviewer toolbar, include parameter label,
> parameter input textbox, buttons ...... I've attached a screenshot on
> the setting of this Font property on my test page. BTW, so far I only find
> this very Font setting for the ReportViewer which affect the text on the
> reportViewer's non-ReportClient region, so it won't affect our rendered
> report's text font.
>
> 2. Is there a way that I can force the report parameters to render in a
> single column or otherwise control their layout? They normally render
> across
> the page and then down which sometimes results in an unusual order for the
> user to see them. I know I could create custom report parameter forms but I
> am trying to avoid that.
> ===============================================> I've performed some test and research, it seems the Report parameters panel
> is fixed above the reportViewer control and there is no much individual
> properties to customize it. So far what I can get is the following option:
> 1. Make the "ShowParameterPrompts" and "ShowRefreshButton" to "false" so
> that they won't display on the reportviewr.
> 2. We can add create our own UI (through ASP.NET controls ) to accept
> parameter values
> 3. Also, we need to add our own button and use code to programmtically set
> the parameter from our custom controls into ReportViewer.ServerReport and
> call its Refresh method to rerender it.
> Please let me know if there is anything else you wonder.
> Sincerely,
> Steven Cheng
> Microsoft MSDN Online Support Lead
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
>|||Thanks for your reply Chris,
For your further question:
Yes, we can also programmatically adjust the ReportViewer.Font property
settings. For example:
page classs
{
.............
protected void btnStyle_Click(object sender, EventArgs e)
{
ReportViewer1.Font.Bold = true;
ReportViewer1.Font.Name = "Verdana";
ReportViewer1.Font.Size = FontUnit.Point(24);
ReportViewer1.Font.Underline = true;
}
}
Hope this also helps.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.|||Steven,
So then the Intellisense tooltip which says ReportViewer.Font is ReadOnly is
incorrect? Is this bug being fixed?
-- Chris
Chris, SSSI
"Steven Cheng[MSFT]" wrote:
> Thanks for your reply Chris,
> For your further question:
>
> Yes, we can also programmatically adjust the ReportViewer.Font property
> settings. For example:
> page classs
> {
> ..............
> protected void btnStyle_Click(object sender, EventArgs e)
> {
> ReportViewer1.Font.Bold = true;
> ReportViewer1.Font.Name = "Verdana";
> ReportViewer1.Font.Size = FontUnit.Point(24);
> ReportViewer1.Font.Underline = true;
> }
> }
> Hope this also helps.
> Sincerely,
> Steven Cheng
> Microsoft MSDN Online Support Lead
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hi Chris,
Thanks for the reply.
As for the "ReportViewer.Font" property, it is derived from the
"WebControl" class and the VS IDE's intellisense is correct, the property
does be "ReadOnly". This is a common design for some complex properties of
Webcontrol class, such as "WebControl.ControlStyle" and
"WebControl.ControlStyle". For these complex properties, we should
modify their values through their sub-properties instead of directly modify
the property instance itself. This design is also for performance
consideration since replacing a whole complex property instance is much
more expensive than just replacing those sub properties.
Therefore, when we want to customize any webcontrol's "Font" property, we
should access its sub properties instead, like:
ReportViewer1.Font.Bold = true;
ReportViewer1.Font.Name = "Verdana";
#WebControl.Font
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontro
l.font.aspx
BTW, it is recommended that we also follow this pattern when we add custom
properties for webcontrol which is of such complex type.
Hope this helps.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.|||Hello Chris,
Have you got the issue resolved? Please feel free to let me know if there
is anything else we can help.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Showing posts with label viewer. Show all posts
Showing posts with label viewer. Show all posts
Monday, March 19, 2012
Sunday, February 19, 2012
Consume Connection from Report Explorer Web Part
Hello!
I am writing a custom report viewer that I would like to work with the
Report Explorer web part in SP2.
I created my consumer web part and it is connected to the Report Explorer
but it does not seem to ever receive any data from the Report Explorer. Is
the Report Viewer web part the only web part that can consume the information
provided by the Report Explorer?
TIA!
BrianHi Brian,
Welcome to use MSDN Managed Newsgroup!
From your description, my understanding of this issue is: you want to write
the consumer web part to connect to the Report Explorer Web part. If I
misunderstood your concern, please feel free to point it out.
Based on my knowledge, the Report Explorer Web Part and the Report Viewer
Web Part use the technical "Connectable Web Part to handle the connections
between them. So if you want to customize your web part to connect to the
Report Explorer, you need to implement the ICellConsumer interface.
Here is a article talk about the technical "Connectable Web Part" and there
is the sample code for how to implement the interface.
Creating a Connectable Web Part
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/htm
l/CreateConnectableWP_SV01003714.asp
Using Reporting Services SharePoint Web Parts in SQL Server 2000 Reporting
Services Service Pack 2
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/webrssp2.mspx
#EIAA
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Michael.
Thanks for the post.
Let me be a bit more specific. I already wrote a test web part implementing
the ICellConsumer interface.
When I connect it to the Report Explorer, the Cell that I get is an empty
string.
Actually, the CellReady method only seems to be called when the page loads.
Clicking on folders and reports in the Report Explorer does not seem to pass
any information to my web part. It passes something to the Report Viewer when
it is on the same page since instead of opening a new window to display a
report, the Report Viewer displays the report.
--
Take care,
Brian
"Michael Cheng [MSFT]" wrote:
> Hi Brian,
> Welcome to use MSDN Managed Newsgroup!
> From your description, my understanding of this issue is: you want to write
> the consumer web part to connect to the Report Explorer Web part. If I
> misunderstood your concern, please feel free to point it out.
> Based on my knowledge, the Report Explorer Web Part and the Report Viewer
> Web Part use the technical "Connectable Web Part to handle the connections
> between them. So if you want to customize your web part to connect to the
> Report Explorer, you need to implement the ICellConsumer interface.
> Here is a article talk about the technical "Connectable Web Part" and there
> is the sample code for how to implement the interface.
> Creating a Connectable Web Part
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/htm
> l/CreateConnectableWP_SV01003714.asp
> Using Reporting Services SharePoint Web Parts in SQL Server 2000 Reporting
> Services Service Pack 2
> http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/webrssp2.mspx
> #EIAA
>
> Sincerely yours,
> Michael Cheng
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hi Brain,
In the Report Explorer Web part, it pass the ReportUrl in the cell variable
in the cellReadyArgs passed in the CellReady EventHandler. And the Report
Viewer get it in the CellReady event. This event fire handled all by Web
Part architecture, and in you scenario, it seems the Report Explorer and
your own Web Part do not connected correctly, you may try to debug the SPS
session to see what these 2 Web Part really does.
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.
I am writing a custom report viewer that I would like to work with the
Report Explorer web part in SP2.
I created my consumer web part and it is connected to the Report Explorer
but it does not seem to ever receive any data from the Report Explorer. Is
the Report Viewer web part the only web part that can consume the information
provided by the Report Explorer?
TIA!
BrianHi Brian,
Welcome to use MSDN Managed Newsgroup!
From your description, my understanding of this issue is: you want to write
the consumer web part to connect to the Report Explorer Web part. If I
misunderstood your concern, please feel free to point it out.
Based on my knowledge, the Report Explorer Web Part and the Report Viewer
Web Part use the technical "Connectable Web Part to handle the connections
between them. So if you want to customize your web part to connect to the
Report Explorer, you need to implement the ICellConsumer interface.
Here is a article talk about the technical "Connectable Web Part" and there
is the sample code for how to implement the interface.
Creating a Connectable Web Part
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/htm
l/CreateConnectableWP_SV01003714.asp
Using Reporting Services SharePoint Web Parts in SQL Server 2000 Reporting
Services Service Pack 2
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/webrssp2.mspx
#EIAA
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Michael.
Thanks for the post.
Let me be a bit more specific. I already wrote a test web part implementing
the ICellConsumer interface.
When I connect it to the Report Explorer, the Cell that I get is an empty
string.
Actually, the CellReady method only seems to be called when the page loads.
Clicking on folders and reports in the Report Explorer does not seem to pass
any information to my web part. It passes something to the Report Viewer when
it is on the same page since instead of opening a new window to display a
report, the Report Viewer displays the report.
--
Take care,
Brian
"Michael Cheng [MSFT]" wrote:
> Hi Brian,
> Welcome to use MSDN Managed Newsgroup!
> From your description, my understanding of this issue is: you want to write
> the consumer web part to connect to the Report Explorer Web part. If I
> misunderstood your concern, please feel free to point it out.
> Based on my knowledge, the Report Explorer Web Part and the Report Viewer
> Web Part use the technical "Connectable Web Part to handle the connections
> between them. So if you want to customize your web part to connect to the
> Report Explorer, you need to implement the ICellConsumer interface.
> Here is a article talk about the technical "Connectable Web Part" and there
> is the sample code for how to implement the interface.
> Creating a Connectable Web Part
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/htm
> l/CreateConnectableWP_SV01003714.asp
> Using Reporting Services SharePoint Web Parts in SQL Server 2000 Reporting
> Services Service Pack 2
> http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/webrssp2.mspx
> #EIAA
>
> Sincerely yours,
> Michael Cheng
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hi Brain,
In the Report Explorer Web part, it pass the ReportUrl in the cell variable
in the cellReadyArgs passed in the CellReady EventHandler. And the Report
Viewer get it in the CellReady event. This event fire handled all by Web
Part architecture, and in you scenario, it seems the Report Explorer and
your own Web Part do not connected correctly, you may try to debug the SPS
session to see what these 2 Web Part really does.
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to:
Posts (Atom)