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 :)

You can use Microsoft's Alternative to Crystal Reports.

You can also try this, although it is one I have not tried personally.

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>
commented: Nice example! +8

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.

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

Microsof.ReportViewer.Common
Microsof.ReportViewer.DataVisualization
Microsof.ReportViewer.ProcessingObjectModel
Microsof.ReportViewer.WebForms
Microsof.ReportViewer.WinForms

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.