reportviewer in basic x# form application in xide

This forum is meant for examples of X# code.

Post Reply
ngpollarolo
Posts: 20
Joined: Mon Feb 29, 2016 3:51 pm
Location: Nicaragua

reportviewer in basic x# form application in xide

Post by ngpollarolo »

I am new in programming with x# and i am interested in testing some sql application with it.
I don't like VS and i am using XIDE. After creating some applications to translate my dbf tables to sql, visualize and update them, i want to also test reporting services, but i can't find the reportviewer tool in the toolbox of my basic x# form.

I don't know if this is a dumb question or it has a different solution.

TIA,

Giorgio Pollarolo
User avatar
Chris
Posts: 4936
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

reportviewer in basic x# form application in xide

Post by Chris »

Hi Giorgio,

Actually this is a very good question! I think some years ago I had included the ReportViewer control in the toolbox, but now indeed it isn't there. Maybe in the past it was part of the framework and now it is a separate download, so I removed it, I must admit I cannot remember :-)

But there's an easy way to add it:

- Select from the menu Tools/Edit Toolbox Items

- In the new window that opens, click the "Add" button on the bottom left and select the file Microsoft.ReportViewer.WinForms.dll. In my machine this file is located in the ReportViewer folder of VS, but if you don't have it, I think there's also a separate download for the ReportViewer control.

- Another window opens, click "Change Page" and enter "Standard" in the textbox, so that the control gets added to the first page in the toolbox

- Click OK, OK and Save, now the control should be available as the last item in the toolbox

If it doesn't work as expected or you have any other question, please don't hesitate to ask!

Chris
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
FFF
Posts: 1584
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

reportviewer in basic x# form application in xide

Post by FFF »

Hi Chris,
pmfji, read, got curious, looked.

No Reportviewer folder in my VS2015, so tried a google, learned to start Nuget from VS, did so, got error for no open solution.
Made a new X# Winforms, Nuget failed: "Project Default is not found", (!)
made a new C# Winforms, Nuget succeeded.
Still no Reportviewer folder ;)

But "Everything" (btw, a must...) found the dll in C:UsersKarl2.nugetpackagesMicrosoft.ReportViewer.VS2015.WinForms12.0.2.2402libnet40

Tried to add in Toolbox CC following your advice, it complained about missing dependency to Microsoft.ReportViewer.Common.dll - but this i still can't find on my machine (W8.1/64).
Back to google, found: Install-Package Microsoft.ReportViewer.2015.Runtime for nuget, back to Xide, followed advice, now got the item - but as last page in toolbox, caption "Custom".

Now to learn what to do with this thing ;):ohmy:

PS: re-did the nuget thing looking for "Install-Package Npgsql", ran in the same error, "Project Default is not found", targetting an X# solution. And it worked for C#...
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Chris
Posts: 4936
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

reportviewer in basic x# form application in xide

Post by Chris »

Hi Karl,

Well, I don't understand why MS is making things more and more complicated all the time..guess that just a few zip files, one for each version/target sounds a bit too much straightforward for their liking...

There must exist an option when installing VS to include the report viewer stuff or not, but don't ask me what is the name of that option :) About the nuget problem in a x# project, I think it's something that is not implemented yet in the x# integration, but will be probably be supported in a future build.

As for the ReportViewer control now appearing in the Custom page in the toolbox, it's because you didn't click on the Change Page button, to set the page to "Standard"/ You can do it now though, Edit Toolbox Items again, Edit button, and then Change Page.

Chris
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
FFF
Posts: 1584
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

reportviewer in basic x# form application in xide

Post by FFF »

Got it now, i had used the "Change page" on the right side, not on the left. Now it's moved where it should.
THX
Karl
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
robert
Posts: 4540
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

reportviewer in basic x# form application in xide

Post by robert »

Karl,
Nuget is supported in the next build. It is already working on my machine

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply