Quick Navigation

DynamicPDF™ ReportWriter - Examples

DynamicPDF™ ReportWriter Program Flow Example

The basic program flow for a script using DynamicPDF™ ReportWriter is as follows:

  1. Create a report object.
  2. Define the database connection and query.
  3. Add report elements (i.e. RecordBox) to the header, section header, body, section footer and/or footer.
  4. Generate (Draw) the PDF report.

    ASP Example Script:
    <!-- METADATA TYPE="typelib" UUID="{567E47DC-8220-403F-B348-EB9A035648BB}" -->
    <%
    Dim objReport
    Set objReport = Server.CreateObject("DPDF_RptWtr.Report")
    
    With objReport.Command
        'An ADO Connection String (Northwind DB in this example)
        .ActiveConnection = "File Name = " & Server.MapPath("Northwind.udl")
        'A SQL Query
        .CommandText = "SELECT CompanyName FROM Customers"
    End With
    
    With objReport.Header
        .Height = 24
        .AddLabel "Header goes here", 0, 0, 504, 12
    End With
    
    With objReport.Body
        .Height = 12
        .AddRecordBox "CompanyName", 0, 0, 504, 12
    End With
    
    objReport.DrawToASP
    
    Set objReport = Nothing
    %>
     

Latest News

DynamicPDF CoreSuite v7.0 for .NET

We are pleased to announce the release of DynamicPDF CoreSuite v7.0 for .NET:

     Download Now

More information is available by clicking the link above.

Customer Quotes

You guys are great! I want to steal some of your customer support reps to do customer support for my company!

-- Eric Andersen, Xavus Web Solutions

Site Map |  Contact Us |  Legal Stuff © 1997-2012 ceTe Software