Report Engine for Visual Studio IDE

ReportCreator is a free report engine. You can design and view various type reports in Visual Studio Ide.

Requirement to make ReportCreator works:
-Download and install vsip(Visual studio integration partner) for vs2003 and vsip SDK Extras 2003 from http://www.vsipdev.com
-Open VsPackage.sln and built it
-run "C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.exe" /RootSuffix Exp
-Thats it! You can edit a Report Template file (*.sd) in Visual Studio ide.


Download ReportCreator
3.6Mb. Author: Serdar Dirican



Create data report as .txt file

Create data report as .txt file

Create your own Data Report in text file format, No need to use any third party Report writer, Try its very easy....

This bit of code will create a data report as a .txt file, thus eliminating the need for a third-party reporting application. To make it work, you must add a file scripting reference in your project before running this code. In addition, the author notes that this snippet creates a sample report from a generic table, so be sure to set the data fields according to your database.

Author: VBCode.com
Target User: Developer/Architect

DECLARATIONS:
Option Explicit
' You must add Filescripting reference in your project before run this routine
' This is sample report from generic table, plz set data fields according to your database

Dim Fs, Glfile
Dim fvlonLineCount As Long
Dim fvbooExitPrintLine As Boolean
Dim fvintPageNo As Integer

Dim rsGeneric As New ADODB.Recordset ' any Generic Recordset
Dim CN As ADODB.Connection ' set your connection
Dim Rs As New ADODB.Recordset ' set your recordset

CODE
Sub PageHeader()
PrintLine ""
PrintLine ""
PrintLine Chr(27) & Chr(14) & Chr(27) & Chr(15) & "FAYYAZ BUTT"
PrintLine Chr(27) & Chr(77) & "Any Heading you want to print" & String(113, " ") & Format(Format(Date, "mmmm d, yyyy"), String(20, "@"))
PrintLine ""
PrintLine String(147, "=")

End Sub

Sub PageFooter()
fvintPageNo = fvintPageNo + 1
PrintLine String(147, "-")
PrintLine " " & "Any text you want to print at footer" & String(100, " ") & "Page : " & Format(fvintPageNo, "@@@") & Chr(18)
PrintLine ""
PrintLine ""
End Sub

Sub PrintLine(AnyLine As String)
fvlonLineCount = fvlonLineCount + 1
Glfile.WriteLine AnyLine
End Sub


Private Sub Command1_Click()
Set rsGeneric = cn.execute "select * from anytable" ' give your table name here

Dim lvstrCritaria As String
Dim lvstrPreviousACode As String
Dim lvintWait As Integer
Dim lvbytCount As Byte


fvlonLineCount = 0
fvbooExitPrintLine = False
fvintPageNo = 0
Set Fs = CreateObject("scripting.filesystemobject")
Set Glfile = Fs.CreateTextFile("c:\MyTextfile.txt", True)
'*** Report Header ***
Call PageHeader
'*** Detail Section ***
rsGeneric.MoveFirst
Do Until rsGeneric.EOF
' set your table fields here
PrintLine rsGeneric!acno & " | " & rsGeneric!head
rsGeneric.MoveNext
Loop
'*** Report Footer ***
PrintLine String(79, " ") & String(45, "-")
PrintLine "*** End of Report ***"
Call PageFooter
'*** End Of Report ***
Glfile.Close
Screen.MousePointer = 0
MsgBox "Your report has been printed in the file" & Chr(13) & App.Path & "\MyTextfile.TXT", vbInformation, "Report Printed"
End Sub
Cetak Data Report Landscape (VB6)

Cetak Data Report Landscape (VB6)

“Report Width is Larger Than the Paper Width”

Pesan error yang sering kali membuat kita kesal ketika sedang kerja menampilkan atau mencetak data report dengan Visual basic 6.0.

Hal ini terjadi karena lebar report yang sudah kita desain dengan Data Report melebihi lebar kertas yang tersedia, misalnya kita membuat sebuah report dalam bentuk landscape dan pada saat mencetak aplikasi yang kita buat tidak bisa merubah seting printer kita dari portrait menjadi landscape.

Secara default Visual Basic 6.0 tidak memiliki fasilitas untuk merubah setting default printer dari portrait menjadi landscape atau sebaliknya. Untuk mengatasi hal ini adalah dengan “PageSet”.

Baca selengkapnya>>
(sumber cakbud.info)