Friday, March 30, 2012
ReportViewer Docking
dock the control in a splitter control.
The exception text is "SplitterDistance must be between Panel1MinSize and
Width - Panel2MinSize.". It is raised
--> From System.Windows.Forms.SplitContainer set_SplitterDistance
--> Microsoft.Reporting.WinForms.ReportViewer SetPreferedPromptAreaHeight
--> Microsoft.Reporting.WinForms.RSParams PromptPanel_Layout
...
DoLayout
...
ControlCollection.Add(reportViewer)
If the viewer is not docked and not anchored, no exception occurs.
Thanks for your help!
--
iucon GmbH
Software Developement
http://www.iucon.deHi GmbH,
Welcome to use MSDN Managed Newsgroup!
From your descriptions, I understood you will encounter the error message
"SplitterDistance must be between Panel1MinSize and Width - Panel2MinSize".
If I have misunderstood your concern, please feel free to point it out.
You are developing with SQL Server 2000 Reporting Services or SQL Server
2005 Reporting Services? I have created a sample VB.NET application with
SQL Server 2000 Reporting Services, added a splitter control and let the
ReportViewer docked to splitter. The sample works smoothly on my side.
Would you please generate a sample application solution for us to reproduce
it on my side? If you have any questions or concerns, don't hesitate to let
me know. We are always here to be of assistance!
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.
Wednesday, March 28, 2012
ReportViewer control for WinForms - can I copy text?
I am using the ReportViewer control for Windows Forms, and I would like to be able let my users copy text from the report. Is there any way to configure this? At the moment, the text is not selectable.
Thanks,
Erick
I understand, thanks. I've been getting a lot of pushback from users on this issue, so I'm glad to hear it's on your radar screen.
Thanks,
Erick
Monday, March 26, 2012
ReportViewer (WinFprms) View Reoprt button
I'm using the ReportViewer winforms control. It works great except for one annoying issue. The "View report" button shown to the right of the parameters for the report is rendered too far to the right. So when my application is running in 1024*768, the button is rendered outside the visible area.
It doesn't seem to make any difference if I have one or several parameters, the problem remains.
Is there any way of controlling the renderingposition of that button?
Regards Andreas
No.|||Thank you for your answer Teo (even though it wasn't the answer I wanted to hear) =/
Sounds like something to improve until the next release of the ReportViewer control, or?
|||Please log it as a feedback on connect.microsoft.com. The more people ask for ability to customize the toolbar the more likely will be this to happen.ReportViewe needs a connection? Doesn't make sense...
I have a VB .NET 2.0 WinForms application that needs to display reports on a
winform's ReportViewer control.
The application project and a separate reports project are under the same
solution.
The report project has its own global connection and datasource object that
is used by the report.
I test the report inside the Visual Studio developing environment report's
view mode and it works ok.
Then I open the form that has the ReportViewer control (in the application
project), and in the designer, I assign the properties and the report to the
ReportViewer control. I run the application... the form displays, and the
ReportViewer displays an error inside saying there's no dataset. Why? The
report has a connection and a dataset and they work when I test it.
So I create a connection and dataset in the application's project like the
ones I have in the report project, but I can't find a way to assign the
dataset to the ReportViewer...
How can I make this work?
Would you please Help me? This is the tip of the iceberg of all the problems
we're having with our reports and RSvcs... Thanks in advance.
Sincerely,
RichardThe report viewer operates in two modes. One is server based, the other is
local mode. In local mode you give it a .rdlc file (which is a renamed .rdl
file) and a tableset. In server mode you just give it the name of the
report, parameters, etc. It has to have been pointed to a server.
If you are doing local mode you have a lot more you have to do. You have to
handle events such as dealing with subreports (this is because you are
responsible when responding to the event to create the dataset for the
subreport). You have to handle drill through, etc etc. If you have a server
around it is much easier. I looked at local mode and decided to stick with
using the server.
If server mode then you need to have the report deployed to a server.
Hope that helps.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Richard" <Richard@.discussions.microsoft.com> wrote in message
news:D962526B-C414-4C5C-91CB-F671A3B529CA@.microsoft.com...
> Hi,
> I have a VB .NET 2.0 WinForms application that needs to display reports on
> a
> winform's ReportViewer control.
> The application project and a separate reports project are under the same
> solution.
> The report project has its own global connection and datasource object
> that
> is used by the report.
> I test the report inside the Visual Studio developing environment report's
> view mode and it works ok.
> Then I open the form that has the ReportViewer control (in the application
> project), and in the designer, I assign the properties and the report to
> the
> ReportViewer control. I run the application... the form displays, and the
> ReportViewer displays an error inside saying there's no dataset. Why? The
> report has a connection and a dataset and they work when I test it.
> So I create a connection and dataset in the application's project like the
> ones I have in the report project, but I can't find a way to assign the
> dataset to the ReportViewer...
> How can I make this work?
> Would you please Help me? This is the tip of the iceberg of all the
> problems
> we're having with our reports and RSvcs... Thanks in advance.
> Sincerely,
> Richard|||Thank you Bruce,
In local mode it needs a tableset? These reports are all based on stored
procedures. Does that mean they need to be rewritten to use tables?
One thing I noticed is the ReportViewer control needs a ReportDataSet
instance for local reports, but I couldn't find a way to convert/create a
ReportDataSet out of the already-existing dataset. How is it supposed to be
done?
Thanks in advance,
Richard
"Bruce L-C [MVP]" wrote:
> The report viewer operates in two modes. One is server based, the other is
> local mode. In local mode you give it a .rdlc file (which is a renamed .rdl
> file) and a tableset. In server mode you just give it the name of the
> report, parameters, etc. It has to have been pointed to a server.
> If you are doing local mode you have a lot more you have to do. You have to
> handle events such as dealing with subreports (this is because you are
> responsible when responding to the event to create the dataset for the
> subreport). You have to handle drill through, etc etc. If you have a server
> around it is much easier. I looked at local mode and decided to stick with
> using the server.
> If server mode then you need to have the report deployed to a server.
>
> Hope that helps.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Richard" <Richard@.discussions.microsoft.com> wrote in message
> news:D962526B-C414-4C5C-91CB-F671A3B529CA@.microsoft.com...
> > Hi,
> >
> > I have a VB .NET 2.0 WinForms application that needs to display reports on
> > a
> > winform's ReportViewer control.
> > The application project and a separate reports project are under the same
> > solution.
> > The report project has its own global connection and datasource object
> > that
> > is used by the report.
> > I test the report inside the Visual Studio developing environment report's
> > view mode and it works ok.
> >
> > Then I open the form that has the ReportViewer control (in the application
> > project), and in the designer, I assign the properties and the report to
> > the
> > ReportViewer control. I run the application... the form displays, and the
> > ReportViewer displays an error inside saying there's no dataset. Why? The
> > report has a connection and a dataset and they work when I test it.
> >
> > So I create a connection and dataset in the application's project like the
> > ones I have in the report project, but I can't find a way to assign the
> > dataset to the ReportViewer...
> >
> > How can I make this work?
> >
> > Would you please Help me? This is the tip of the iceberg of all the
> > problems
> > we're having with our reports and RSvcs... Thanks in advance.
> >
> > Sincerely,
> >
> > Richard
>
>|||Should have used the term datatable. Datasets can have multiple datatables.
In local mode you hand the control a rdlc file and the data. If your data is
from a stored procedure you have to call that stored procedure in your code.
It sounds like you have not written any ado.net code (creating datasets,
executing queries etc).
Local mode requires significantly more coding expertise than creating a
report, deploying it to a reportserver. You have to write code to respond to
events. You have to write code to retrieve the data the report is designed
for. You have to write code to retreive the data for the subreport. It is
non-trivial and if you are coming from a background of never having written
ado.net code then you have a big learning curve.
Are you sure you have to use local mode, do you have a reportserver around
that you can use. The control is quite easy to use in server mode (the
report resides on a server and is rendered there).
Bruce Loehle-Conger
"Richard" <Richard@.discussions.microsoft.com> wrote in message
news:C79C33D3-C72E-4BF3-AC1F-31E77DBC743F@.microsoft.com...
> Thank you Bruce,
> In local mode it needs a tableset? These reports are all based on stored
> procedures. Does that mean they need to be rewritten to use tables?
> One thing I noticed is the ReportViewer control needs a ReportDataSet
> instance for local reports, but I couldn't find a way to convert/create a
> ReportDataSet out of the already-existing dataset. How is it supposed to
> be
> done?
> Thanks in advance,
> Richard
> "Bruce L-C [MVP]" wrote:
>> The report viewer operates in two modes. One is server based, the other
>> is
>> local mode. In local mode you give it a .rdlc file (which is a renamed
>> .rdl
>> file) and a tableset. In server mode you just give it the name of the
>> report, parameters, etc. It has to have been pointed to a server.
>> If you are doing local mode you have a lot more you have to do. You have
>> to
>> handle events such as dealing with subreports (this is because you are
>> responsible when responding to the event to create the dataset for the
>> subreport). You have to handle drill through, etc etc. If you have a
>> server
>> around it is much easier. I looked at local mode and decided to stick
>> with
>> using the server.
>> If server mode then you need to have the report deployed to a server.
>>
>> Hope that helps.
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Richard" <Richard@.discussions.microsoft.com> wrote in message
>> news:D962526B-C414-4C5C-91CB-F671A3B529CA@.microsoft.com...
>> > Hi,
>> >
>> > I have a VB .NET 2.0 WinForms application that needs to display reports
>> > on
>> > a
>> > winform's ReportViewer control.
>> > The application project and a separate reports project are under the
>> > same
>> > solution.
>> > The report project has its own global connection and datasource object
>> > that
>> > is used by the report.
>> > I test the report inside the Visual Studio developing environment
>> > report's
>> > view mode and it works ok.
>> >
>> > Then I open the form that has the ReportViewer control (in the
>> > application
>> > project), and in the designer, I assign the properties and the report
>> > to
>> > the
>> > ReportViewer control. I run the application... the form displays, and
>> > the
>> > ReportViewer displays an error inside saying there's no dataset. Why?
>> > The
>> > report has a connection and a dataset and they work when I test it.
>> >
>> > So I create a connection and dataset in the application's project like
>> > the
>> > ones I have in the report project, but I can't find a way to assign the
>> > dataset to the ReportViewer...
>> >
>> > How can I make this work?
>> >
>> > Would you please Help me? This is the tip of the iceberg of all the
>> > problems
>> > we're having with our reports and RSvcs... Thanks in advance.
>> >
>> > Sincerely,
>> >
>> > Richard
>>|||Hi Bruce,
Thank you for helping me. Yes I have experience with ADO .NET but I'm a
newbie in Reporting Services and I need to "port" Crystal Reports (that are
working) to RS. So I have been trying to accomplish this using the local
approach, but I understand now that it would be easier to use reports from
the server instead of local reports.
There is a WinForm where the user selects the criteria (parameter values)
for the report and the application needs to pass these parameter values to
the report (w/o using the built-in report's parameter interface). Would you
please tell me how can this be done?
Thank you in advance,
Richard
==="Bruce L-C [MVP]" wrote:
> Should have used the term datatable. Datasets can have multiple datatables.
> In local mode you hand the control a rdlc file and the data. If your data is
> from a stored procedure you have to call that stored procedure in your code.
> It sounds like you have not written any ado.net code (creating datasets,
> executing queries etc).
> Local mode requires significantly more coding expertise than creating a
> report, deploying it to a reportserver. You have to write code to respond to
> events. You have to write code to retrieve the data the report is designed
> for. You have to write code to retreive the data for the subreport. It is
> non-trivial and if you are coming from a background of never having written
> ado.net code then you have a big learning curve.
> Are you sure you have to use local mode, do you have a reportserver around
> that you can use. The control is quite easy to use in server mode (the
> report resides on a server and is rendered there).
> Bruce Loehle-Conger
>
> "Richard" <Richard@.discussions.microsoft.com> wrote in message
> news:C79C33D3-C72E-4BF3-AC1F-31E77DBC743F@.microsoft.com...
> > Thank you Bruce,
> >
> > In local mode it needs a tableset? These reports are all based on stored
> > procedures. Does that mean they need to be rewritten to use tables?
> >
> > One thing I noticed is the ReportViewer control needs a ReportDataSet
> > instance for local reports, but I couldn't find a way to convert/create a
> > ReportDataSet out of the already-existing dataset. How is it supposed to
> > be
> > done?
> >
> > Thanks in advance,
> >
> > Richard
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> The report viewer operates in two modes. One is server based, the other
> >> is
> >> local mode. In local mode you give it a .rdlc file (which is a renamed
> >> .rdl
> >> file) and a tableset. In server mode you just give it the name of the
> >> report, parameters, etc. It has to have been pointed to a server.
> >>
> >> If you are doing local mode you have a lot more you have to do. You have
> >> to
> >> handle events such as dealing with subreports (this is because you are
> >> responsible when responding to the event to create the dataset for the
> >> subreport). You have to handle drill through, etc etc. If you have a
> >> server
> >> around it is much easier. I looked at local mode and decided to stick
> >> with
> >> using the server.
> >>
> >> If server mode then you need to have the report deployed to a server.
> >>
> >>
> >> Hope that helps.
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Richard" <Richard@.discussions.microsoft.com> wrote in message
> >> news:D962526B-C414-4C5C-91CB-F671A3B529CA@.microsoft.com...
> >> > Hi,
> >> >
> >> > I have a VB .NET 2.0 WinForms application that needs to display reports
> >> > on
> >> > a
> >> > winform's ReportViewer control.
> >> > The application project and a separate reports project are under the
> >> > same
> >> > solution.
> >> > The report project has its own global connection and datasource object
> >> > that
> >> > is used by the report.
> >> > I test the report inside the Visual Studio developing environment
> >> > report's
> >> > view mode and it works ok.
> >> >
> >> > Then I open the form that has the ReportViewer control (in the
> >> > application
> >> > project), and in the designer, I assign the properties and the report
> >> > to
> >> > the
> >> > ReportViewer control. I run the application... the form displays, and
> >> > the
> >> > ReportViewer displays an error inside saying there's no dataset. Why?
> >> > The
> >> > report has a connection and a dataset and they work when I test it.
> >> >
> >> > So I create a connection and dataset in the application's project like
> >> > the
> >> > ones I have in the report project, but I can't find a way to assign the
> >> > dataset to the ReportViewer...
> >> >
> >> > How can I make this work?
> >> >
> >> > Would you please Help me? This is the tip of the iceberg of all the
> >> > problems
> >> > we're having with our reports and RSvcs... Thanks in advance.
> >> >
> >> > Sincerely,
> >> >
> >> > Richard
> >>
> >>
> >>
>
>|||You are correct, using in server mode is much easier. First, it is easier to
develop the report using the report designer and previewing it. Next it is
easier to have full functionality (subreports, drill through, etc).
As far as setting the parameters:
http://msdn2.microsoft.com/en-us/library/microsoft.reporting.winforms.reportparameterinfo.aspx
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Richard" <Richard@.discussions.microsoft.com> wrote in message
news:3914427F-67E0-45D1-B5AE-41F8376726A7@.microsoft.com...
> Hi Bruce,
> Thank you for helping me. Yes I have experience with ADO .NET but I'm a
> newbie in Reporting Services and I need to "port" Crystal Reports (that
> are
> working) to RS. So I have been trying to accomplish this using the local
> approach, but I understand now that it would be easier to use reports from
> the server instead of local reports.
> There is a WinForm where the user selects the criteria (parameter values)
> for the report and the application needs to pass these parameter values to
> the report (w/o using the built-in report's parameter interface). Would
> you
> please tell me how can this be done?
> Thank you in advance,
> Richard
> ===> "Bruce L-C [MVP]" wrote:
>> Should have used the term datatable. Datasets can have multiple
>> datatables.
>> In local mode you hand the control a rdlc file and the data. If your data
>> is
>> from a stored procedure you have to call that stored procedure in your
>> code.
>> It sounds like you have not written any ado.net code (creating datasets,
>> executing queries etc).
>> Local mode requires significantly more coding expertise than creating a
>> report, deploying it to a reportserver. You have to write code to respond
>> to
>> events. You have to write code to retrieve the data the report is
>> designed
>> for. You have to write code to retreive the data for the subreport. It is
>> non-trivial and if you are coming from a background of never having
>> written
>> ado.net code then you have a big learning curve.
>> Are you sure you have to use local mode, do you have a reportserver
>> around
>> that you can use. The control is quite easy to use in server mode (the
>> report resides on a server and is rendered there).
>> Bruce Loehle-Conger
>>
>> "Richard" <Richard@.discussions.microsoft.com> wrote in message
>> news:C79C33D3-C72E-4BF3-AC1F-31E77DBC743F@.microsoft.com...
>> > Thank you Bruce,
>> >
>> > In local mode it needs a tableset? These reports are all based on
>> > stored
>> > procedures. Does that mean they need to be rewritten to use tables?
>> >
>> > One thing I noticed is the ReportViewer control needs a ReportDataSet
>> > instance for local reports, but I couldn't find a way to convert/create
>> > a
>> > ReportDataSet out of the already-existing dataset. How is it supposed
>> > to
>> > be
>> > done?
>> >
>> > Thanks in advance,
>> >
>> > Richard
>> >
>> > "Bruce L-C [MVP]" wrote:
>> >
>> >> The report viewer operates in two modes. One is server based, the
>> >> other
>> >> is
>> >> local mode. In local mode you give it a .rdlc file (which is a renamed
>> >> .rdl
>> >> file) and a tableset. In server mode you just give it the name of the
>> >> report, parameters, etc. It has to have been pointed to a server.
>> >>
>> >> If you are doing local mode you have a lot more you have to do. You
>> >> have
>> >> to
>> >> handle events such as dealing with subreports (this is because you are
>> >> responsible when responding to the event to create the dataset for the
>> >> subreport). You have to handle drill through, etc etc. If you have a
>> >> server
>> >> around it is much easier. I looked at local mode and decided to stick
>> >> with
>> >> using the server.
>> >>
>> >> If server mode then you need to have the report deployed to a server.
>> >>
>> >>
>> >> Hope that helps.
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "Richard" <Richard@.discussions.microsoft.com> wrote in message
>> >> news:D962526B-C414-4C5C-91CB-F671A3B529CA@.microsoft.com...
>> >> > Hi,
>> >> >
>> >> > I have a VB .NET 2.0 WinForms application that needs to display
>> >> > reports
>> >> > on
>> >> > a
>> >> > winform's ReportViewer control.
>> >> > The application project and a separate reports project are under the
>> >> > same
>> >> > solution.
>> >> > The report project has its own global connection and datasource
>> >> > object
>> >> > that
>> >> > is used by the report.
>> >> > I test the report inside the Visual Studio developing environment
>> >> > report's
>> >> > view mode and it works ok.
>> >> >
>> >> > Then I open the form that has the ReportViewer control (in the
>> >> > application
>> >> > project), and in the designer, I assign the properties and the
>> >> > report
>> >> > to
>> >> > the
>> >> > ReportViewer control. I run the application... the form displays,
>> >> > and
>> >> > the
>> >> > ReportViewer displays an error inside saying there's no dataset.
>> >> > Why?
>> >> > The
>> >> > report has a connection and a dataset and they work when I test it.
>> >> >
>> >> > So I create a connection and dataset in the application's project
>> >> > like
>> >> > the
>> >> > ones I have in the report project, but I can't find a way to assign
>> >> > the
>> >> > dataset to the ReportViewer...
>> >> >
>> >> > How can I make this work?
>> >> >
>> >> > Would you please Help me? This is the tip of the iceberg of all the
>> >> > problems
>> >> > we're having with our reports and RSvcs... Thanks in advance.
>> >> >
>> >> > Sincerely,
>> >> >
>> >> > Richard
>> >>
>> >>
>> >>
>>