Reportviewer1 not showing on vb 2010 express windows form application? - vb.net

why does Reportviewer1 controls/toolbars not showing on vb 2010 express windows form application on my machine?
I have the Reportviewer.exe redistributable 2010 installed on my machine but every time I drag a reportviewer1 control on my form, nothing happens, I mean, nothing seen on my application form. Please help, I'm stuck and hopeless. :(
Thanks.

Go on your .Designer.vb page and type/paste this code into the source view...
//
//ReportViewer1
//
Me.ReportViewer1.Location = New System.Drawing.Point(0, -1)
Me.ReportViewer1.Name = "ReportViewer1"
Me.ReportViewer1.Size = New System.Drawing.Size(396, 246)
Me.ReportViewer1.TabIndex = 0
this should force your the declaration of a ReportViewer into your form.
EDIT :
While looking back at your question, do you have an icon for Reporting into your ToolBox? If so does a ReportViewer Object appears? If not you have to add it from VS2010 : Tools/ChooseToolboxItem/ and .NET framework componant. (maybe also elsewhere but mostly in this case) Choose any CrystalReport element you need.

Related

How to add a WebView2 Control (To replace the old unsupported WebBrowser Control) into VBA form in 2022?

I want to add a control to a VBA form that displays a preview of an Excel 365 online file once the user clicks on the file name in a list. I did this successfully in the past using WebBrowser Control:
Now the problem is that this WebBrowser control is based on the extremely old Microsoft Explorer 11. Accordingly as of March 2022 this control stopped previewing Excel 365 online files and instead is showing a blank page. So it is working, but not properly since it is based on a very old technology.
I did some research and found out that this control has been replaced by Microsoft WebView2 which is much more modern but I cannot find a reference for it at all in VBA and don't know how to add this control to my VBA form.
Can someone let me know how to display webpages properly on a VBA form in 2022? Thanks! :-)

Tab stops in windows form in Office VSTO addin don't work

I'm writing a simple VSTO add-in for Office. When the user clicks a button a single form appears, and on the form there are some single-line textboxes, some buttons and some labels. This is all in VB.NET.
Everything works as expected - except I cannot tab between controls on the form. I have set the TabIndex and TabStop properties (actually, left them at defaults, which look OK). I've also tried programmatically setting TabIndex and TabStop in the form's Shown handler - but this made no difference. Changing runtime from .NET 4.5 to 4.6 makes no difference.
The odd thing is that if I use exactly the same form (copy & paste the .vb file) in a Windows Forms App, the tab stops work. It seems there's something about this VSTO project (or perhaps all VSTO projects) that is stopping tabbing working.
I am using Visual Studio 2017 and the host application for the VSTO addin is MS Project 2016.
The difference between a standalone WinForms application and your Office add-in is the host application (can be MDI or SDI application).
Most probably you need to specify the parent window handle to the Show method. The method accepts an instance of the IWin32Window interface which represents the top-level window that will own this form.

Using forms in main form's panel with any size in Visual Studio

I'm working on VB.NET tool. Attached there's a basic scheme of my question. I'd like to use secondary windows forms in my primary(main) form's defined panel area. Secondary forms will contain toolstrip and menustrip also i would like to use them in my main form with best responsive way.
Do you suggest any elements to use for second form or first form like (flowlayoutpanel, toolstripcontainer, etc.)
For adding the other forms in my first form's panel area there should be a code like that but i don't very well because it didn't worked on me.
Dim f As New Forms
f.TopLevel = False
f.WindowState = FormWindowState.Maximized
f.FormBorderStyle = Windows.Forms.FormBorderStyle.None
pnlMainPanel.Controls.Add(f)
End Sub
Note: I'm using Visual Studio 2012, .NET Framework 4.5.2 OS: Windows:7, VB.NET

Open VB6 form design properties in a text file just like we have .Designer.vb file for VB.NET

I am working on a particular project where the VB6 forms need to be ported to VB.NET forms automatically. So to do that i need VB6 windows form design properties file. Is there any way to get the complete design properties of the form in the text file where it can be read. I have tried opening the form (i.e .frm extension) using notepad but cant get all the properties,It displays only few properties for a particular element.
If you have access to the Visual Studio 2008 or earlier try the built-in Upgrade Wizard. You can always upgrade to a later version once you have upgraded to Visual Basic 2008.
Migrating from VB6 to VB.Net can be a big task if you have a big program, and there are many different strategies. See the VB6-migration tag info for more information.
Well, you could open the .frm file in your explorer with an Text Editor like Notepad++.
In the top you will see the Designer code for this Form.
But you will see, that the code is not compatible with VB.NET.
Here an example for a VB6 Button:
Begin VB.CommandButton btnSaveFilter
Height = 330
HelpContextID = 2283012
Left = 630
MaskColor = &H00FF00FF&
Picture = "frmMain.frx":08CC
Style = 1
TabIndex = 31
Top = 6030
UseMaskColor = -1
Width = 330
End

I'm not seeing Report as an item I can add to my project

I am using Visual Studio 2013, Express version. I need to create a windows application that will allow users to generate reports. So I downloaded the ReportViewer 2012 RT and successfully added the ReportViewer dll to VS. So now I have a ReportViewer component in my toolbox I can add to a form.
Having never used ReportViewer before, I'm not sure where to go from here. I did find this page about how to add printable reports: http://msdn.microsoft.com/en-us/library/ms233804.aspx
The thing is, it gives these steps: 1) Drag a ReportViewer control from the Data tab of the Toolbox onto your form. 2) On the Project menu, choose Add New Item. In the Add New Item dialog box, select the Report icon and click Add. 3) The Report Designer opens in the development environment, and a report (.rdlc) file is added to the project.
After completing step 1 I do not see 'Report' in the list of items I can add. I do not see any other 'Report' components listed in the toolbox, either.
Does anyone know what I am missing?
I did a lot of searching found discussions about getting the ReportViewer in the first place that then stop there, or about using Report Builder. Based on my understanding of Report Builder, though, that is a SQL Server component and is for use in reporting on SQL server data...the reports in my application are to be based on local data (internal arrays), not SQL related at all. So I should just need the ReportViewer, right?
Thank you very much!
Crystal Reports offers an easy way to display repots:
Report rpt = new Report()
for (int i = 0; i < ds_consultsql.Tables[0].Rows.Count; i++)
{
ds_tableintheproject.Tables["table"].Rows.Add
(
new object[]
{
ds_info.Tables[0].Rows[i]["camp1"].ToString(),
ds_info.Tables[0].Rows[i]["camp2"].ToString(),
ds_info.Tables[0].Rows[i]["camp3"].ToString(),
ds_info.Tables[0].Rows[i]["campx"].ToString()
}
);
}
rpt.SetDataSource(ds_datos); reportesVW.ReportSource = rpt;
reportesVW.DataBind();
you just desing the report add your data from a datatable create in the proyect