次の方法で共有


How to: Add Document Properties to a Report

Report document properties enable you to include additional information in the report. Document properties are included as elements and attributes in XML and HTML output. You can use ReportListener object methods and events to access these properties. Also, you can access them during the post-processing of the output files.

For information about creating reports that output XML or HTML data, see ReportListener Foundation Classes.

  • Document Properties in XML Files
    The XML report includes document properties such as <property> child elements of the report's <Run> element. For example, if you set the Document.Title property value to "Inventory Report" and the Document.Author property value to "Alfreds Futterkiste", your XML output file contains the following tags.

    <Run>
    <property id="Document.Title">Inventory Report</property>
    <property id="Document.Author"> Alfreds Futterkiste </property>
    </Run>
    
  • Document Properties in HTML Files
    The HTML file includes document properties such as native HTML tag values if there is a corresponding HTML tag for the property. If there is no corresponding HTML element for the property, the <meta> tags in the <head> section of the HTML file include the value of the property. For example, if you set the Document.Title property value to "Inventory Report" and the Document.Author property value to "Alfreds Futterkiste", your HTML output file contains the following tags.

    <head>
    <title> Inventory Report </title>
    <meta name="author" content="Alfreds Futterkiste">
    </head>
    

To edit default properties of a report

  1. On the Report menu, click Properties.

  2. In the Report Properties dialog box, click the Document Properties tab.

  3. In the list of document properties, click the property you want to edit.

  4. Click the Edit button to open the Expression Builder Dialog Box.

  5. Enter the expression that you want evaluated at run-time, and click OK.

    This will store a value to the selected property.

    The expression can be any Visual FoxPro expression or a Visual FoxPro command (for example, DATETIME()).For a description of the default properties, see Document Properties Tab, Report Properties Dialog Box (Report Builder).

To add custom properties to a report

  1. On the Report menu, click Properties.

  2. In the Report Properties dialog box, click the Document Properties tab.

  3. Click the Add button to open the Add Property Dialog Box (Report Builder).Add Property Dialog Box (Report Builder)

  4. Choose a property type and enter the property Name and Value.

    The ellipsis button (...) beside the Value box opens the Expression Builder dialog box. For a description of the properties types, see Add Property Dialog Box (Report Builder).

To delete report properties

  • Select the property you want to delete, and click Clear.

Note

Clicking Clear deletes the property and the value. If you only want to clear the value, click Edit and delete the value in the Expression Builder.

See Also

Reference

Guide to Reporting Improvements

Other Resources

ReportListener Foundation Classes