-
Notifications
You must be signed in to change notification settings - Fork 16
Digital Financial Reporting examples
This page shows a number of examples of XBRL instance documents being rendered. Some are test cases while others are submissions to the SEC. You can see other examples live on our web site www.xbrlquery.com or use the site to render your own instance documents.
The examples begin with code to show how instance rendering can be produced in code then there are several screenshots of the presentation you can expect.
Here's how to create and HTML rendering of instance data in code. Don't want to code? Visit our site.
Half of this code is setting up boilerplate stuff. The interesting stuff is in the second half from line 22.
click to see the code
// Boilerplate stuff to setup error monitoring/reporting
$log = \XBRL_Log::getInstance();
$observer = new Observer();
$log->attach( $observer );
// An array to contain report information
$results = array();
// Indenting to include in messages
$indent = 0;
// The language to use (if the taxonomy support languages)
$lang = null;
// Assuming you have opened an instance get the taxonomy
$instanceTaxonomy = $instance->getInstanceTaxonomy();
$instanceTaxonomy->generateAllDRSs();
// Use the validate method if you want the $reports array to include information about validation errors
$instance->validate();
// Create a reporting instance
$dfr = new XBRL_DFR( $instanceTaxonomy );
// Use this line if computation checking should include formula results (or null)
$formulaSummaries = $dfr->validateFormulas( $results, $instance, $indent );
// Create the structure of the layout for all networks
$presentationNetworks = $dfr->validateDFR( $formulaSummaries );
// Create the HTML for each network
$results['renders'] = $dfr->renderPresentationNetworks( $presentationNetworks, $instance, $formulaSummaries, $observer, $lang, false );
// Record any issues logged and release the log and observer
$results['issues'] = $observer->getIssues();
$log->detach( $observer );
Here is an example of the network of a submission being rendered. This rendering has been generated by the information included in the presentation linkbase of this taxonomy and this instance document. This examples renders data for a network that uses a 'roll forward' pattern.
The second example shows a rendering of the income statement network from the Microsoft 2018 10K submission to the SEC. It illustrates that any instance document can be rendered. This is an example that shows renderings also present footnotes.
Reporting is not just about the numbers (or text if its a policy disclosure). This example shows the structure of a network rendering can be displayed. Useful to show users how the layout is constructed.
The rendering of data shows the results of calculation linkbase comparisons and of XBRL formulas. The rules rendering shows these computations in more detail.
Instance renderings can include any number of dimensions. This simple example shows members for just a single dimension presented across the columns with a total. A rendering of a variance might have a similar layout. The number of dimensions that can appear in a rendering is not limited. If a dimension has only one member that is reported, that dimension will become a slicer rather than clutering the columns with unused members.
Copyright © 2021 and later years Lyquidity Solutions Limited
- About us
- Purpose
- XBRL support
- Road Map
- Why PHP?
- Contributing
- License
- Reference links
- Case Study
- Digital Financial Reporting
- Digital Financial Reporting examples
Overview
Class and function reference
Compiled taxonomy structure
Common arrays
Compiling
Compiling
Processing linkbases
Additional taxonomy processing
Extension taxonomies
Compiled taxonomy folder
How do I...?
Navigate a node tree
Find a node in a tree
Find elements in a taxonomy
Load an instance document
Find elements in an instance
Create a simple report
Create a comparison report
Example custom report
Work with dimensions
Sign and Verify
Validate
Change the logging
Capture validation information