Skip to main content
All docs
V24.2

ReportWizardTemplate.ImageTemplateName Property

The SVG template identifier that specifies an image for the report template.

Namespace: DevExpress.XtraReports.Web.ReportDesigner.DataContracts

Assembly: DevExpress.XtraReports.v24.2.Web.dll

NuGet Package: DevExpress.Web.Reporting.Common

Declaration

[DataMember(Name = "imageTemplateName")]
public string ImageTemplateName { get; set; }

Property Value

Type Description
String

A string that is the SVG template ID.

Remarks

If the ImageTemplateName and the ReportWizardTemplate.ImageClassName properties are not specified, the following image is used as a default thumbnail for a report template:

Report Template Default Thumbnail

The inner text can be localized because it is obtained from the ASPxReportsStringId.ReportDesigner_Wizard_ReportTemplate_Thumbnail string.

Do the following to specify an SVG image as a thumbnail for the report template in the Report Wizard:

  1. Include an HTML template for an SVG image into the page. The template uses a predefined CSS class dxd-icon-fill to paint the icon according to the selected color scheme.

    <script type="text/html" id="instant-report">
        <svg viewBox="-2 -5 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
            <g id="Layer_1" transform="translate(-2, -5)" style="enable-background:new 0 0 32 32">
                <g id="Check">
                    <polygon class="dxd-icon-fill" points="27,5 11,21 5,15 2,18 11,27 30,8  " fill="#727272" />
                </g>
            </g>
        </svg>
    </script>
    
  2. Assign the instant-report SVG template id to the ImageTemplateName property:

    public override void CustomizeReportTypeList(ReportWizardTemplateCollection predefinedTypes) {
        predefinedTypes.Remove(predefinedTypes.Where(x => x.ID == nameof(ReportType.CrossTab)).First());
        predefinedTypes.Add(new DevExpress.XtraReports.Web.ReportDesigner.DataContracts.ReportWizardTemplate() {
            CanInstantlyFinish = true,
            ID = nameof(CustomReportType.InstantReport),
            Text = "Instant Report",
            ImageTemplateName = "instant-report"
        });
        predefinedTypes.Add(new DevExpress.XtraReports.Web.ReportDesigner.DataContracts.ReportWizardTemplate() {
            CanInstantlyFinish = true,
            ID = nameof(CustomReportType.InstantReport),
            Text = "Instant Report",
            ImageClassName = "instant-report-image"
        });
        predefinedTypes.Add(new DevExpress.XtraReports.Web.ReportDesigner.DataContracts.ReportWizardTemplate() {
            ID = nameof(CustomReportType.CustomLabelReport),
            Text = "Custom Label Report",
            ImageTemplateName = "dxrd-svg-wizard-LabelReport"
        });
    }
    
  3. The result is shown in the following image:

    Report Wizard Template Thumbnail from SVG Template]

See Also