|
-
Dec 2nd, 2011, 12:59 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Generating reports without Crystal reports in vb.net
How can we create a report in vb.net without using any crystal reports
Regards
Sajina
-
Dec 2nd, 2011, 01:10 AM
#2
Re: Generating reports without Crystal reports in vb.net
you could create your own custom report form
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Dec 2nd, 2011, 01:12 AM
#3
Re: Generating reports without Crystal reports in vb.net
I'm not 100% sure what the support is in VB Express but in VS you can install SQL Server Reporting Services, which comes as part of the Advanced Services edition of the free SQL Server Express, and then build reports in VS. It think that previous version only supported report creation in VWD Express and not C# or VB Express but I'm not sure about 2010.
-
Dec 2nd, 2011, 01:55 AM
#4
Thread Starter
Addicted Member
Re: Generating reports without Crystal reports in vb.net
can i generate the report output in html format
-
Dec 2nd, 2011, 01:57 AM
#5
Re: Generating reports without Crystal reports in vb.net
you can create an html document in code.
where is your data coming from + what sort of output are you looking for?
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Dec 2nd, 2011, 02:13 AM
#6
Thread Starter
Addicted Member
Re: Generating reports without Crystal reports in vb.net
data coming from SQL server database
my report is kind of mark list which is showing first column as subject second column as first term marks third column as second term marks.
-
Dec 2nd, 2011, 02:18 AM
#7
Re: Generating reports without Crystal reports in vb.net
here's a simple example using a datatable + outputting an html table in a webbrowser:
vb Code:
Public Class Form1
Dim dt As New DataTable
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dt.Columns.Add("c1")
dt.Columns.Add("c2")
dt.Columns.Add("c3")
dt.Columns.Add("c4")
dt.Columns.Add("c5")
For r As Integer = 1 To 10
dt.Rows.Add(New Object() {"r" & r.ToString & "c1", "r" & r.ToString & "c2", "r" & r.ToString & "c3", "r" & r.ToString & "c4", "r" & r.ToString & "c5"})
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim strBuilder As New System.Text.StringBuilder
strBuilder.Append("<table border='1' cellpadding='10' cellspacing='0'>")
For x As Integer = 0 To dt.Rows.Count - 1
strBuilder.Append("<tr>") 'Start the row
strBuilder.Append(String.Format("<td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td><td>{4}</td>", _
dt.Rows(x).Item(0).ToString, dt.Rows(x).Item(1).ToString, dt.Rows(x).Item(2).ToString, dt.Rows(x).Item(3).ToString, dt.Rows(x).Item(4).ToString))
strBuilder.Append("</tr>") 'Finish the row
Next
WebBrowser1.DocumentText = strBuilder.ToString
'alternatively you can save strBuilder.ToString as html + show it in ie
End Sub
End Class
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Dec 2nd, 2011, 02:22 AM
#8
Thread Starter
Addicted Member
Re: Generating reports without Crystal reports in vb.net
i have tried it with crystal reports but its showing first term marks on top of the page and secnd term marks as just below of the first term marks. but i want to display all in same level. i tried select expert but if i put a condition the all exam marks will goes for the same condition. pls help me out
-
Dec 2nd, 2011, 02:26 AM
#9
Thread Starter
Addicted Member
Re: Generating reports without Crystal reports in vb.net
ok let me try HTML code first
-
Dec 2nd, 2011, 02:31 AM
#10
Thread Starter
Addicted Member
Re: Generating reports without Crystal reports in vb.net
its showing error webbrowser1 is not declared
-
Dec 2nd, 2011, 02:35 AM
#11
Thread Starter
Addicted Member
Re: Generating reports without Crystal reports in vb.net
yes i resolve the issue now i want to try it with my db
-
Dec 2nd, 2011, 02:31 PM
#12
Re: Generating reports without Crystal reports in vb.net
 Originally Posted by sanju4kk
How can we create a report in vb.net without using any crystal reports
Regards
Sajina
Well, dunno if this is the kind of answer you're looking for but to avoid Crystal you might want to consider Active Reports. It's about $600 for a developer version but it is way slick. I bought my copy to go with VS2008 Standard and SQL Server 2008R2 (Express). Between those three things and a good icon and text editor I can make just about anything I want to.
Otherwise, yeah, you can generate HTML but it will require a lot more work to get the report to look the way you want it to. Still ... HTML would be a competent solution.
-Max
The name's "Peck" .... "Max Peck"
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." - Red Adair
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|