Good Day VB.net Geniuses! I'm just wondering if there are still any other free reporting tool that can be use for Visual Basic 2010 Express edition since Crystal Reports is not working for Express edition :( I only have a simple MS Access Database :)
Edited 3 Years Ago by karlcunanan
Hi is Microsoft Report Viewer 2010 Redistributable working in Microsoft Visual Studio 2010 Express?
I have written a datadriven application that works with Report Viewer reports.
You will need to look at embedding the reports in the project and calling them when needed.
I may be mistaken here, but under VB2010 Express you can use the ReportViewer control, however you will not have design time support for either the control nor the Report. The only way I have been able to make this work is to add the control to the Form via your own code.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'ReportViewer1 ' ' place and size the control Me.ReportViewer1.Location = New System.Drawing.Point(10, 10) Me.ReportViewer1.Name = "ReportViewer1" Me.ReportViewer1.Size = New System.Drawing.Size(300, 200) Me.ReportViewer1.TabIndex = 0 Me.ReportViewer1.Parent = Me ' the next line load the XML report file for the application directory. ' you can locate the file anywhere you wish, just adjust the path Me.ReportViewer1.LocalReport.ReportPath = ".\Report1.rdlc" ' tells the viewer to refresh with the currently loaded report Me.ReportViewer1.RefreshReport() End Sub
Sample report definition file:
<?xml version="1.0" encoding="utf-8"?> <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"> <InteractiveHeight>11in</InteractiveHeight> <rd:DrawGrid>true</rd:DrawGrid> <InteractiveWidth>8.5in</InteractiveWidth> <rd:SnapToGrid>true</rd:SnapToGrid> <RightMargin>1in</RightMargin> <LeftMargin>1in</LeftMargin> <BottomMargin>1in</BottomMargin> <rd:ReportID>2ae1843f-1c7c-4caf-80ae-3fd92ba70b98</rd:ReportID> <Width>6.5in</Width> <Body> <ReportItems> <Textbox Name="textbox2"> <rd:DefaultName>textbox2</rd:DefaultName> <Top>0.125in</Top> <Width>1.125in</Width> <Style> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> <CanGrow>true</CanGrow> <Left>0.25in</Left> <Height>0.375in</Height> <Value>hello</Value> </Textbox> </ReportItems> <Height>2in</Height> <Style> <BackgroundColor>LightGrey</BackgroundColor> </Style> </Body> <Language>en-US</Language> <TopMargin>1in</TopMargin> </Report>
Actually VB 2010 Express can load the report viewer in design time. It works quite well.
@tinstaafl how do you do that? are you using different version of report viewer?
right-click on the toolbox and select 'choose items...'. I chose
Report Viewer, Namespace - Microsoft.Reporting.Winforms, Assembly Name - Microsoft.ReportViewer.Winforms(10.0.0.0). You'll have to resize the columns to see everything. I'm using VB 2010 Express. And just to make sure it worked I tested it with TnTinMN's sample file. I used
' the next line load the XML report file for the application directory. ' you can locate the file anywhere you wish, just adjust the path Me.ReportViewer1.LocalReport.ReportPath = ".\Report1.rdlc" ' tells the viewer to refresh with the currently loaded report Me.ReportViewer1.RefreshReport()
from TnTinMN's code, to display the report, and it worked well.
Edited 3 Years Ago by tinstaafl
Why is that I cannot see the Report Viewer in the .net framework components? Do I need to configure something first to make it show? I am using Microsoft Report viewer 2010 Redistrubitable. Sorry for this, Im a complete beginner in vb.net :(
You might have to add a couple of references, Microsof.ReportViewer.Common, and Microsoft.ReportViewer.Winforms
I can see these ff. in the C:// > Windows > Assembly, but i can't put it inside the references
how are you trying to add the references? I right-click in the solution explorer and select Add References
I am adding by Clicking Project then Add Reference, I also try right-clicking the project name in solution explorer then add reference still no luck. Anyway do I still need to declare a variable for the above code to make it work?
I'm not sure
You have to change your framework to .net framework 4.
By default your framework is set to .net framework 4 Client
i am using visual studio 2015 and trying to export data which i am importing through excel by the user selected Excel file. Now the importing part has been successfully completed i am using OLEDB Connection but Stuck in exporting the same data to a new Excel file. tried ...
I am creating a program that when you print an author, you must show all the information of all the books that the author has written. Add a new attribute in the Author class that will be "BooksWriting: List (Book)".
I have expanded the program so that it also ...
I am currently creating a simulation of a pizza ordering system in object oriented program. I have some question. the instruction and guideline is long but I will try and cut it down a lot. the instruction is to create a program that simulate a pizza restaurant using ...