Skip to main content

Create an Invoice from Templates in the Visual Studio Report Designer

  • 3 minutes to read

This document describes how to create an invoice report based on a predefined template using the Report Wizard.

Tip

See the Create an Invoice in the Visual Studio Report Designer topic to learn how to create an invoice report with a custom layout from scratch.

Do the following to select an invoice template and configure its settings:

  1. Open an existing reporting application or create a new one.
  2. Invoke the Report Wizard to add a new report to your application. On the first wizard page, select Template and click Next.

    ReportWizard-ChooseReportType-Template

  3. On the next wizard page, choose the report template that specifies element arrangement and appearance settings.

    report-wizard-choose-template

    Click Next to proceed to the next wizard page.

  4. The following page allows you to select the data source type that provides data to your report. Choose a data connection and click Next.

    ReportWizard-SelectDataSourceType

  5. On the next wizard page, specify whether you want to use an existing data connection or create a new one. For this tutorial, select an existing connection to the sample Northwind database and click Next.

    report-wizard-template-select-data-connection

  6. The following wizard page has a list on the right-hand side displaying the selected template’s available fields. On the left-hand side, you can choose a table, view, or stored procedure containing the data fields corresponding to the template fields. You do not need to supply data to all template fields.

    You can combine several different tables’ or views’ data fields by creating a custom query. Click the Queries category’s report-wizard-multi-query-page-icon-add button, and in the invoked Query Builder, join data tables and views based on key columns.

    report-wizard-template-create-custom-query

    Click Next on the wizard page to continue report creation.

  7. The next wizard page enables you to specify the relationships between the data source fields and predefined template fields.

    Drag and drop the required data field from the tree on the left-hand side onto the corresponding template field’s column.

    report-wizard-template-map-fields

    You can also select a data field from the Template Field Value drop-down list or manually enter a static field value in this column.

    If you do not supply values to specific template fields, the corresponding elements are automatically added to the resulting report.

    Click Next to proceed.

  8. On the last wizard page, select the currency symbol and price value format.

    You can also specify the following discount/tax options:

    • Range – Defines whether the discount/tax value should not be taken into account (None), or should be used for individual items (Unit) or the entire order (Total).
    • Value – Specifies the discount/tax value that can be static or bound to the data source field.
    • Type – Specifies the type of the discount/tax value (flat, fixed, or percentage).
    • Inclusive (for the tax only) – Indicates whether the tax value is included in product prices.

    report-wizard-template-specify-report-options

Click Finish to complete the wizard and get the report layout according to the selected template and specified options.

template-report-result-layout

Switch to the Preview tab and see the result.

template-report-result-print-preview

Create an Invoice from Templates in the End-User Report Designer

Tutorials that explain how to create different reports in EUD Report Designers for WinForms and Web are included in the End-User Documentation online help section: