Document Fragments and Virtual Documents provide two different approaches to structuring generated reports. Document Fragments exist at the template-level to provide greater flexibility in:
- what information can be reported. For example Document Fragments may report information obtained from Model Scripts, SQL Queries or Element Filters.
- how that information is structured. For example you can use multiple fragments to report on the same set of elements multiple times.
Virtual Documents provide a visual, model-driven approach to structuring and sequencing reports. Like Document Fragments, they also allow you to aggregate templates, but operate on a predefined set of input packages.
This makes Virtual Documents useful when you have a particular report, or set of reports, to execute in a given model.
Neither capability is a replacement for other - rather they are complementary. It is entirely feasible, for example, that a Virtual Document's template calls one or more Document Fragments to extract necessary information for the report.