|
DynamicReport is a COM based component that generate HTML Report with ease no design interface, no additional programming code, only populate your recordset, define few methods to customize your report view, that is all ! DynamicReport comes with a lot of functions that enables you get a full control of your report so you can define your report theme define your company logo and title of the report and caption of fields define report header and footer define if you want to grouping data or not, showing group navigator or not, and finally define if you want to summarize data or not. Example: Dim oRep As New DynamicComponents.DynamicReport()
Dim CN As New ADODB.Connection()
Dim oMaster As New ADODB.Recordset()
Dim SqlStatment As String CN.Open("DCDR_NWind") SqlStatment = "select OrderID,ProductID,ProductName,UnitPrice,Quantity " ' you must order your data by the field you willing to groub by SqlStatment += "from OrderDetails where OrderId < '10270' order by OrderID" oMaster.Open(SqlStatment, CN, oMaster.CursorType.adOpenKeyset, oMaster.LockType.adLockOptimistic) oRep.InitReport(False) ' this must be your first assignment oRep.SetTitle("Good Morning World") oRep.LogoImage("Logo.bmp", VB6.GetPath + """) oRep.SetReportHeader("This is Dynamic Report v1.0", "It is powered by EgyFirst inc.", "Dynamic Components is a trade mark since 2004") oRep.GroubBy("OrderID", True, True)
oRep.SetCaption("Order ID", "Product ID", "Product Name", "Unit Price", "Quantity", "Discount") oRep.SumFields(oMaster, "Quantity") oRep.ReadTheme(DynamicComponents.DynamicReport.Theme_ID.Classic) ' if ignored it is by default classic theme oRep.SetReportFooter("This is your report footer Section", "you can add here as many lines as you want") oRep.PopulateReport(oMaster) '' this must be your last assignment
|