• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 379
  • Last Modified:

Need a solution for creating a report in vb.net, other then using Crystal Reports

Dear experts,
What is the best way to create a report in Vb.net, besides using Crystal Reports?

I need to create a report from a dataset. I need to show fields created from within my application, and use highlighting to show differences between the fields.

What will be the most easy way to accomplish this? I'm short in time - and must have a reasonable solution. Maybe an HTML report will do it, but I don't know how to create such report in vb.net.

Waiting for your reply,
Thanks in advance!
0
nahumba
Asked:
nahumba
  • 3
  • 2
  • 2
  • +2
2 Solutions
 
vbturboCommented:
You can use msreport

see http://www.gotreportviewer.com/

vbturbo

0
 
CmdoProg2Commented:
You can build a report using a dataset and control individual cell styles ...
  <asp:Table ID="tabStud" runat="server" Width="650px" CellSpacing="0">

  Private Sub FillTable
    Try
      Dim tabStud As Table, tRow As TableRow, tCell As TableCell
      ' Find the Table control
      Dim dr as DataRow, dt as DataTable
      ' ... set dt to your Datatable in the Dataset
      For Each dr In dt
        'Create Row
         tRow = New TableRow()
         'Name
          tRow.Cells.Add(NewCell(dr.fullName))
         'Balance
         If dr.Balance < 0 then
            tRow.Cells.Add(NewCell(dr.Balance),  Drawing.Color.Red)
         Else
            tRow.Cells.Add(NewCell(dr.Balance))
         End If
         ' Add Row
          tabStud.Rows.Add(tRow)
      Next

    Catch ex As Exception
'      Response.Write(ex.Message)
    End Try
  End Sub

  Private Function NewCell(ByVal cellText As String, optional backColor as Drawing.Color = ) As TableCell
    Dim tCell As New TableCell()
    With tCell
      .CssClass = "smText"
      .BorderStyle = BorderStyle.Solid
      .BorderColor = Drawing.Color.Black
      .BorderWidth = "1"
      .Text = cellText
    End With
    Return tCell
  End Function
  Private Function NewCell(ByVal cellText As String, backColor as Drawing.Color) As TableCell
    Dim tCell As New TableCell()
    With tCell
      .CssClass = "smText"
      .BorderStyle = BorderStyle.Solid
      .BorderColor = backColor
      .BorderWidth = "1"
      .Text = cellText
    End With
    Return tCell
  End Function
0
 
CmdoProg2Commented:
Opps,
  Private Function NewCell(ByVal cellText As String, optional backColor as Drawing.Color = ) As TableCell
should be
  Private Function NewCell(ByVal cellText As String) As TableCell

My intent is to show you that you can manipulate the different cell properties as you process the data.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
hatem72Commented:
0
 
mlmccCommented:
Check this tool
http://www.freereporting.com/

What is the problem with Crystal?

mlmcc
0
 
nahumbaAuthor Commented:
Is there a way to change a specific cell's background color during runtime - after the data table has been created, but before the report is shown?
0
 
mlmccCommented:
What tool?

mlmcc
0
 
nahumbaAuthor Commented:
Hi mlmcc, thanks for getting back!

I'm using the ReportViewer control in Visual Studio 2005

I'm designing a report which currently includes two tables: dataset1_datatable2 & dataset1_datatable4.
I need to make a very simple comparison between two fields from these two tables.
My goal is to change the background color of these fields if their value is identical. I know how to write an expression for fields which are on the same table, but I don't know how to compare fields which are on different tables.

Could you post any example for such expression - comparing fields from two different tables yet under the same dataset?

Thank you!
0
 
nahumbaAuthor Commented:
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now