Populating cells of an electronic financial statement6292811Abstract A computer-implemented method of populating row and column cells of an electronic financial statement document containing with formulas and data, and related apparatus. A formula for a cell in a financial statement is generated from a row definition for the row and a column definition for the column of the cell, where the row definition defines a term of the statement and the column definition specifies a period of time. The resulting statement is displayed to a user, and new formula expressions can be generated to reflect changes in the statement. The statement can have three kinds of columns, namely base columns, subtotal columns, and grand total columns. Data in columns of an input database corresponds to a database period of time, and the base columns in the statement have statement period unit. For each base column of the statement, a correspondence to more than one column of the input database can be computed dynamically. The cells of the statement column can be populated using data from the corresponding database columns. The cells can be repopulated in response to a change in the statement period unit. Claims What is claimed is: Description MICROFICHE APPENDIX
Definition of Net Sales Term
KBATOM Net_Sales
ISA Net_Expression
PNAME Net Sales
PARTOF SALES_SECTION
MARGIN_ANALYSIS
PREDEFINEDALIASES "Revenue"
"Revenues"
"Sales-Net"
"Net Revenues"
ACTUALFORMULA Gross_Sales - (Discounts + Allowances +
Returns)
STOCKFLOW Flow
NAMEFORMAT (Income_statement grayshade)
LINEFORMAT (income_statement skipafter)
INFORMULA Contribution_Margin
Gross_Profit
Net_Sales_Cash
Sales_Growth_Percent
Contribution_Margin_Percent
Gross_Margin_Percent
SG_and_A_Percent_Of_Sales
R_and_D_Percent_of_Sales
Operating_Income_Margin_Percent
Return_on_Sales
Referring to FIG. 5, system 22 automatically populates the mockup financial statement (FIG. 2) with financial terms corresponding to a financial statement heading (called a SecName in KBProps) as follows (step 114). System 22 invokes a lookupKB module to obtain from financial knowledge base 23 a SectionList, which is a list of one or more financial terms to enter into terms column 38 based upon the SecName (step 150). For each term (called an itemname) in the SectionList, system 22 performs the following steps (step 152). System 22 determines the type of the term from the ISA relation for the term (step 154). If the term is a section or a total expression (step 156), system 22 recursively invokes step 114 to create a section or a total expression associated with the term (step 157); otherwise, system 22 adds the term to terms column 38 (SheetFirstColumn) of the mockup financial statement spreadsheet (step 158). If the term was added by the user (step 160), system 22 automatically populates terms section 38 with any calculated terms used by the spreadsheet formula associated with the user-added term (step 162); otherwise, system 22 stores the properties of the term as a finRow object in an electronic spreadsheet that corresponds to a finStatement object (discussed in the following section). The finRow object includes references of direct predecessors and a row name reference (step 164). System 22 sets the format for the cell in which the term was added based on a predefined or default format specified to financial statement editor 24 (step 166). System 22 then returns to step 122 for the next itemname in the SectionList and repeats the above process (step 168). Internal Data Structures As mentioned above, a mockup financial statement is represented to a user as an electronic spreadsheet on a computer display device. System 22 also maintains an internal parallel representation of the financial statement in the form of a finStatement object that includes a finRows object and a finColumns object which respectively correspond to the terms and time periods in the mockup financial statement. A finStatement object has the following properties.
finStatement Properties Type Description
Name String Name of spreadsheet where
statement appears
finRows() finRow
numRows Integer Number of rows in this statement
fincolumns() finColumn
numColumns Integer Number of columns in this
statement
IsINPUTSheet Boolean True if this is the input sheet
TimePeriodRange Range Row corresponding to the
time period labels
TimeStyleSelected Integer Index of selected time style for this
statement
A finStatement object for an input sheet has the following additional properties:
Additional finStatement
Properties Type Description
Formatted Boolean Input sheet has been set
up with headers and labels
DataRequired Boolean Blanks exist in the data area
A finRows object has the following properties:
finRow Properties Type Description
Name String Built-in financial term
in knowledge base
Alias String User's name for this term
ChangedStyle Boolean User changed the dictionary-defined
formatting style of the
name or the line
DuplicateOf String Existing term user duplicated
to create this row
NumDuplicates Integer Number of duplicates user has
created of this existing term
DuplicateCode Integer Unique identifier for this duplicate
ItemizationOf String User has itemized this existing term
ItemizationCode String Unique identifier for this itemization
NumItemizations Integer Number of itemizations user
has created of this term
Hidden Boolean This row is currently hidden in the
currently displayed statement
UserDefinedInput Boolean User converted this to an input
(by editing mockup financial
statement)
AssumeZero Boolean User wants to assume values are zero
DependentMadeInput Boolean User made parent an input
and hid this predecessor
HistDataSource Integer Source of historical data (e.g., user
database)
HeaderOf String This row is a header for the indicated
section
Calculated Boolean Term is calculated (not an input)
according to dictionary definition
Format Integer Current style of name (e.g.,
bold, italic) and line shading,
spacing
Parent String finStatement name
directPredecessors() String Terms directly referenced in
this item's formulas
NumDirectPredecessors Integer Number of direct predecessors
DirectDependents() String Terms using this term in a formula
NumDirectDependents Integer Number of direct dependents
RefersTo Variant Entire row in spreadsheet (an
Excel range object)
NumSecondaryRefs Integer Number of times this term has been
cloned
SecondaryReferenceOf Range Term this is a clone of
UserDefinedRow Boolean Entire row is set by user (ignored by
financial statement editor)
PriorYrHistory String Value = X for term having
X.sub.13 Prior in its formulas
A finRow object for an input statement includes all of the above properties, along with the following additional properties.
Additional Input finRow
Properties Value Description
InputforStmts() Integer finStatement numbers for
which this row is an input
NumInputStmts Integer Number of statements for
which this row is an input
ExclusivelyOneFstmt Boolean Row is only an input for the
statement being processed
A finColumn object has the following properties.
finTime_Styles Property Type Description
Name String Name user has defined for this view
BaseDate Date Date to use for "this period"
(generally last year)
BeginDate Date Beginning date of period (may be
historical)
EndDate Date Ending date of period
Periodunit String Duration of one period (e.g., year)
numPeriods Integer Number of period labels in the range
BasePeriodsAreTotals Boolean Period unit is greater than
database unit and therefore base
columns are totals
NumInputPeriods Integer Number of period labels
generated for input spreadsheet
ActuallyWroteTotals Boolean Total labels were included (property
is ignored if duration is too short)
SubTotalUnit String Period unit of subtotals; non-blank
causes subtotal columns to be
computed and shown
GrandTotalUnit String Period unit of grand totals; non-blank
causes grand total columns to be
computed and shown
InvalidRange Boolean Indicates that defined time style has
invalid dates
DBInconsistent Boolean Previous style is inconsistent
with new database
A finTime_Styles object has the following properties.
finColumn Properties Type Description
Name String Defined name of the column
Time Date Actual date corresponding to label in
spreadsheet
Parent String finStatement name
ColumnNumber Integer Number of column in spreadsheet
LabelCell Range Cell corresponding to the time label
PeriodKind String Period of Time (e.g., year, month)
Refers to Variant Entire column in spreadsheet
TotalStartColumn Integer Spreadsheet column that is first in
sequence for computing total
TotalEndColumn Integer Input column that is last in
sequence for base period of statement
(when base periods are totals)
TotalType String "", "SubTotal", or "GrandTotal"
IncompleteTotal Boolean Too few preceding columns to
calculate this total
The database module has the following properties.
Database Object
Properties Type Description
Exists Boolean True if database is linked to this project
PeriodUnit String Period unit represented by columns of this
database
Financial Statement Editing Tools Referring to FIG. 6, system 22 includes a menu 167 of financial statement editing tools which allow the user to edit a mockup financial statement. A user can insert a term from statement editor 24 into the financial statement by selecting an INSERT TERM editing tool 170. A user can create an alias for a term by selecting an ALIAS editing tool 171 to change the displayed name of a term. System 22 maintains the integrity of the financial statement by preserving the original meaning of the term as specified in financial statement editor 24. A user can duplicate a term by selecting a DUPLICATE editing tool 172. This breaks up a single input term into two separate input terms. System 22 maintains the integrity of the financial statement by replacing each instance of the original input term in a spreadsheet formula with the sum of the two new input terms. A user can itemize a term by selecting an ITEMIZE editing tool 173. This breaks up a term into one or more subitems. System 22 inserts into the financial statement a new total term whose value is the sum of the subitems. A user can convert a calculated term into an input term by selecting a CONVERT TO INPUT editing tool 174, which obtains the term's value from financial database 30 or directly from the user. A user can also can re-convert a converted input term back to a calculated term by selecting a CONVERT TO CALCULATED editing tool 175. A user can direct system 22 to convert a calculated term to an input term and set the term's value to zero when populating the mockup financial statement with values by selecting an ASSUME ZERO editing tool 176. A user can hide a term by selecting a HIDE TERM editing tool 169. A user can direct system 22 to show hidden terms (e.g., hidden predecessors of a calculated term that are automatically added to the mockup financial statement by system 22) by selecting a SHOW HIDDEN editing tool 177. A user can delete a term by selecting a DELETE TERM editing tool 178. A user can toggle headings so that the user can see the grids and conventional alphanumeric headers for the matrix of rows and columns by selecting a HEADINGS editing tool 179. A user can change the format of the mockup financial statement, for example, by changing the appearance (style) of a row or by moving a row to a different location by selecting one or more FORMATTING TOOLS 180. A user can also direct system 22 to report the properties of a term by selecting an EXPLAIN TERM tool 181. Once a mockup financial statement has been created, a user can direct system 22 to create (or update) an input statement and populate the mockup financial statement with data and spreadsheet equations by selecting an UPDATE editing tool 182. A user can also direct system 22 to modify the time periods shown in a time periods area 36 (FIG. 2) by selecting a MODIFY PERIODS editing tool 187. A user can also direct system 22 to change the selected database 30 (FIG. 1) by selecting a CHANGE DATABASE editing tool 189. Insert Term. System 22 allows a user to insert a financial term (which may be an entire financial section) into the mockup financial statement. System 22 maintains the integrity of the financial statement by automatically inserting calculated terms that are predecessors of the inserted term; the automatically inserted terms, however, are hidden in the mockup financial statement. Referring to FIG. 7, a financial term may be inserted into a mockup financial statement as follows (step 183). A user positions the cursor in an open cell of terms column 38 and activates INSERT TERM editing tool 170 from the financial statement editing tools menu. System 22 displays three-pane browser 111 (FIG. 3C) and the user uses it to select the term to be added (e.g., gross profit). System 22 verifies that the term is not already in the mockup statement (step 184). If the selected term is a section (e.g., costs) or a total expression as determined from the ISA relation for the term (step 185), system 22 creates a section for the term in accordance with the definition contained in financial knowledge base 23 (step 114; FIG. 5); otherwise, system 22 inserts the term (e.g., gross profit) in terms section 38 (step 186). System 22 automatically inserts into terms section 38 each of the calculated predecessor terms (e.g., net sales and cost of sales) that appears in the spreadsheet formula associated with the added term, if any (step 188). After the calculated terms are added, system 22 hides them so that they are not displayed on the mockup financial statement. System 22 also sets the DependentTo property of the predecessor terms (step 190). System 22 activates the cell containing the added term and protects the mockup financial statement (step 192). System 22 then returns control to the event loop and responds to subsequent user actions (step 92). Alias. System 22 allows the user to change the name of a financial term appearing in the mockup financial statement, while maintaining the original meaning of the term as specified in financial statement editor 24. Referring to FIG. 8, an alias for a term may be created as follows (step 200). A user positions a cursor in the cell of the term to receive the alias and selects ALIAS editing tool 171 from the editing tools menu. System 22 highlights the term name and allows the user to replace the term name with an alias (step 204). The user may alternatively type over the displayed name. System 22 records the alias in the alias property section of the associated finRow object (step 206). When the user updates the mockup financial statement, system 22 displays the user-defined alias wherever the original term appears in the mockup financial statement, including the input statement and the formulas in which the term is a direct predecessor, but not in financial knowledge base 23 in three-pane browser 111 (FIG. 3C). System 22 then returns control to the event loop and responds to subsequent user actions (step 92). Duplicate. System 22 allows the user to create and rename multiple copies of an input term so that multiple inputs that should be summed together in one or more spreadsheet formulas can be separately displayed in the mockup financial statement. System 22 maintains the integrity of the financial statement by summing the copied terms in the spreadsheet formulas that are dependents of the term that was originally duplicated. Referring to FIG. 9, a user can break up an input term into two separate input terms by duplicating the row containing the term. For example, a user can break up Returns term 132 into "European Returns" and "U.S. Returns" by positioning the cursor in a cell containing the Returns term and selecting DUPLICATE editing tool 172 (step 210). If the term to be duplicated is not an input term (default input or user-defined input) (step 212), system 22 returns control to the event loop and responds to subsequent user actions (step 92)--i.e., system 22 does not allow a user to duplicate a calculated term, an itemized term or an itemization If the term is an input term and the term is not a duplicate of a another term (step 214), system 22 inserts into the mockup financial statement a row with a label built from the duplicated term and a unique identifier suffix (e.g., "Returns1") and creates a corresponding finRow object pointing back to the original source term (e.g., the DuplicateOf property is set to Returns) (step 216). System 22 also allows the user to set an alias for the inserted term (e.g., to change "Returns1" to "European Returns") (step 216). If the user selects for duplication an already duplicated term (e.g., Returns1), system 22 looks up the source term (e.g., Returns) (step 218) and duplicates the source term (step 216). After a duplicate term has been created, system 22 returns control to the event loop and responds to subsequent user actions (step 92). If an input term is duplicated on one statement, wherever that term is referenced in formulas on other statements, the sum of the duplicates (e.g., Returns+Returns1) is used. The references in the other statements become secondary references by virtue of the duplication in the one statement. Thus, a duplicated input term is treated on other statements exactly as it is treated on the statement in which it is duplicated. System 22 does not allow a user to duplicate a secondary reference. Itemize. System 22 allows the user to define a term as a sum of one or more user-defined inputs by itemizing the term. A term that is itemized will be referred to as an "itemized term" and the one or more user-defined inputs that are summed to obtain the value of the itemized term will be referred to as "itemizations." Referring to FIG. 10, a user can itemize an input term to create a total term (e.g., TotalReturns) which represents the sum of two or more user-defined input terms (e.g., European Returns+U.S. Returns) by selecting ITEMIZE editing tool 173 from the financial statement editing tools menu when the cursor is positioned on the term to be itemized (e.g., Returns) (step 220). If the term to be itemized is not an input term (default input or user-defined input) (step 222), system 22 returns control to the event loop and responds to subsequent user actions (step 92)--i.e., system 22 does not allow a user to itemize a calculated term or a duplicated term. If the term is an input and the term is not an itemization of another term (step 224), system 22 inserts into the mockup financial statement a row with the same label as the itemized term with a unique identifier attached (e.g., "Returns1" ) and creates a corresponding finRow object pointing back to the original source term (i.e., the ItemizationOf property is set to "Returns") (step 226). System 22 also allows the user to set an alias of the itemized term (e.g., to change "Returns1" to "European Returns") (step 226). If the user itemizes an itemized term (e.g., Returns1), system 22 looks up the source term (step 228) and itemizes the source term (step 226). If the source term (e.g., Returns) has not been renamed (step 230), system 22 changes the term's label by prepending the word "Total" to the original label (e.g., to yield "TotalReturns") (step 232). System 22 then returns control to the event loop and responds to subsequent user actions (step 92). If an input term (e.g., Returns) is itemized on one financial statement in a project workbook, the total term (e.g., TotalReturns) is referenced wherever the original term (e.g., Returns) is referenced on other financial statements (either as an inserted term or in a formula) in the workbook. Thus, an itemized term is treated on other financial statements exactly as it is treated on the statement in which it is itemized. System 22 does not allow the user to itemize a secondary reference. If an input term that is already duplicated or itemized on one financial statement is inserted into another financial statement, the new insertion is defined as a secondary reference in the associated finRow object and cannot itself be itemized. The original itemization on the one financial statement is defined as a primary reference and its clones on the other financial statements are secondary references to the itemization. If a calculated term on one financial statement is required by a formula on another financial statement, then a reference is made from the second financial statement to the first financial statement (i.e., the original term does not have to be copied into the second financial statement). Delete Term. Referring to FIG. 11, a user can delete a row so that a term does not appear in the mockup financial statement by selecting DELETE TERM editing tool 178 from the financial statement editing tools menu when the cursor is positioned on the row to be deleted (step 240). If the row is a blank row (step 242), system 22 simply deletes the row (step 244) and returns control to the event loop and responds to subsequent user actions (step 92). If the row contains a calculated term (e.g., gross profit term 136; FIG. 4) that is not defined to be an input term (i.e., the user did not convert a previously calculated term into an input term using CONVERT TO INPUT editing tool 174) and that has direct dependents (e.g., gross profit term 136; FIG. 4) (step 246), system 22 notifies the user that calculated terms with dependents cannot be deleted (step 248) and returns control to the event loop (step 92). If the row contains an itemized term (step 250), system 22 notifies the user that itemized terms cannot be deleted (step 252) and returns control to the event loop (step 92). If the row contains an itemization (step 254), system 22 deletes the row from the mockup financial statement, deletes the corresponding finRow from the finStatement object for the mockup financial statement, reduces by one the Numltemizations property of the source term, and restores the original source name if there are no itemizations for the term (e.g., changes "TotalReturns" to "Returns") (step 256). System 22 then returns control to the event loop and responds to subsequent user actions (step 92). If the row to be deleted contains a duplicate term (step 258), system 22 deletes the row from the mockup financial statement, deletes the corresponding finRow from the finStatement object for the mockup financial statement, and reduces by one the NumDuplicates property of the source term (step 260). System 22 then returns control to the event loop and responds to subsequent user actions (step 92). If the row to be deleted contains an input term (default input or user-defined input) or a calculated term with no direct dependents (i.e., there is no other term in the mockup financial statement that depends on the term), system 22 deletes the row from the mockup financial statement (step 262). If the term is calculated from input terms, system 22 asks the user whether the input terms should also be deleted (step 268). If the user indicates that the input terms should be deleted, system 22 deletes each of the direct predecessors of the deleted calculated term (step 270). System 22 then returns control to the event loop and responds to subsequent user actions (step 92). The deletion of an input term from one financial statement has no effect on the appearance of that term on other financial statements because deletion of a term from one statement indicates only that the term should not appear on that statement, not that the term is to be ignored in calculations. If the term to be deleted is a primary calculated term, system 22 converts one of the secondary references to be the primary term and all of the other references are modified to point to the converted term. Converting a calculated term to an input term and re-converting an input term back to a calculated does not affect references to the term on other financial statements because all references will still refer to the converted term and use its value. A term that is converted to input can only be hidden, not deleted. Hide Terms. A user can hide a term appearing in the mockup financial statement by selecting HIDE TERM editing tool 169 when the cursor is positioned in the cell of the term to be hidden. If the cell does not contain a term, system 22 deletes the row containing the cell; otherwise, system 22 sets the Hidden property of the finRow object for the term to True. The row corresponding to this term is then not displayed on the mockup financial statement (or, later, on the completed financial statement report) because spreadsheet program 26 is configured to display only terms with Hidden property values set to False. Hidden terms cannot be duplicates or itemizations. The user may reveal a term by selecting an UNHIDE TERM editing tool, which directs system 22 to set the Hidden property of the finRow object to False. A user can obtain a list of terms that are hidden in the mockup financial statement by selecting SHOW HIDDEN editing tool 177. System 22 responds by displaying a list of the names (aliases, if previously set) of the terms with Hidden properties set to True. If there are no hidden terms in the statement, system 22 displays the message, "There are no hidden items in this statement." Convert to Input, Assume Zero Convert to Calculated. A user can convert a calculated term into an input term by selecting CONVERT TO INPUT editing tool 174. A user may also convert a calculated term into an input term and have the term's value set to zero when the financial statement is populated with values by selecting ASSUME ZERO editing tool 176. System 22 responds in either case by setting the UserDefinedlnput finRow property for the term to True. A section header cannot be converted to an input. A Total term cannot be assumed to have a value of zero; the user must delete itemizations before the term can be assumed to be zero. A user can change a term from an assumed zero term to a regular input term by selecting CONVERT TO INPUT editing tool 174. The user is given the option of recursively hiding the predecessors (former inputs) of a calculated term that is converted to input or assumed to be zero. If the term converted to input or assumed zero is the only dependent of a predecessor to be hidden, system 22 hides the predecessor and marks the DependentMadelnput and DependentMadeZero properties of the predecessor so that it does not appear in the input statement. A user can reconvert a term converted to input or assumed to be zero back into a calculated term by selecting CONVERT TO CALCULATED editing tool 175. System 22 responds by setting the UserDefinedlnput and AssumeZero finRow properties for the term to False. The user is given the option of displaying any hidden predecessors for the term converted back to calculated. In the case of an itemization, system 22 displays each of the itemizations and hides the Total term. In the case of an arbitrary dependent, system 22 recursively displays each of the predecessors and sets the DependentMadeinput and DependentAssumeZero finRow properties of the predecessors to False so that the input statement will contain the proper terms when updated. An itemization and a section header cannot be converted to be calculated terms. Explain Terms Headings Formatting Tools. A user can view the properties of a term by selecting the EXPLAIN TERM editing tool 181. System 22 responds by displaying the stored values for each of the finRow properties for the specified term, including the definition of the term contained in financial knowledge base 23 and any user-defined properties. As mentioned above, by selecting HEADINGS editing tool 179, a user can toggle the display of the mockup financial statement formatted as specified in statement editor 24 or formatted with Excel grids and conventional alphanumeric headings for the matrix of rows and columns corresponding to the financial statement. By selecting one or more FORMATTING TOOLS 180, a user may, for example, move a row up, move a row down, and change the appearance of text in the financial statement (e.g., bold, italic, underline, double underline, indent, shading such as gray shading or green shading). The following table summarizes some of the editing options available to a user.
Editing Options
User Action System Response
Press Enter (or Return) key when cursor positioned Insert a new term
on a blank row
Type over term name Create an alias
Press backspace key followed by Enter (or Return) Delete a term
key
Select search tool in financial knowledge base Display an
dialogue alphabetical list of
all terms in the
financial
knowledge base
Select statement name then pull down menu Add a blank row
INSERT/Rows above the first term
Type over statement name (automatically changes Replace statement
statement tab) name
Use Excel's formatting tool bar (automatically Reformat statement
displayed when a cell is selected in formattable name, period labels,
areas) data, and borders
Create a blank row before and after terms to be Create a new section
grouped, then type a section header name in the first
blank row
Select the header for a section, then apply the Move Move an entire
Up or Move Down editing tool section
Select either an Itemization TOTAL or an existing Create a new
item, then apply the Itemization editing tool subitem
Apply the Show Hidden editing tool Reveal hidden
terms created
when formulas are
generated
Type a new number over a calculated value Temporarily reveal
the effect
of changing a
calculated value;
the number will
revert to its
calculated value
when user
selects another cell
Enter values in the input spreadsheet (user-defined Enter or modify
values appear in magenta there and in the mockup input values,
statement if they overwrite database values, in green propagate through
if user supplies initial values, and in blue if values formulas
correspond to database values)
Create a new statement or revise an existing full Create a statement
statement, then save the project template
Save a project before closing, then open the saved Re-edit a project
project during a later
Excel session
To clone a term, insert term again on any Create a secondary
spreadsheet reference
In addition, in an alternative implementation, financial statement editor 24 allows a user to type a new value over an input value in the mockup statement, which is treated as if the user had entered the value in the corresponding cell of the input statement. Modify Periods and Change Database. System 22 changes the selected database 30 of the current project when the user selects the CHANGE DATABASE editing tool 189 from the financial statement editing tools (FIG. 6). As appropriate, system 22 updates the database and time style properties described above. In particular, the Exists database property is set to true if as a result of the change a database is linked to the current project, and to false otherwise; and the PeriodUnit database property is set to a string (such as "month", "quarter", or "year") identifying the period unit represented by columns of the selected database. System 22 does this by reading and interpreting the column labels of the selected database. For databases that are Excel worksheets, the database time properties are detected automatically by comparing the first two column labels on the DATA sheet of the database. The labels are standard dates acceptable to Excel, with the addition of quarter data labels, which have four parts: first, one of Q, Qtr, or Quarter; second, a quarter number, 1, 2, 3, or 4; third, a space; and fourth, a two-digit or four-digit year. Changing the selected database also causes system 22 to update values of finTime_Styles object properties as appropriate. In particular, the BasePeriodsAreTotals property is set to true if the mockup statement period unit is greater than database unit and therefore mockup statement base columns are totals of database columns, and to false otherwise. System 22 sets the property DBInconsistent to true or false according to whether the previous finTime_Styles style is inconsistent with newly selected database. When a project is reloaded, system 22 determines whether the database linked to the project has changed. In one implementation, this is done simply by asking the user. If the database has changed, the input statement is recreated. Changing the selected database causes system 22 to update and populate the mockup statement according to the newly set database and column properties, as will be described. Through the MODIFY PERIODS editing tool 187, system 22 allows the user to specify the period unit of mockup statement base columns (which may be an integer multiple (one or greater) of the database period unit), and to include total columns in the mockup statement. Total columns may be subtotal or grand total columns. The period units may be selected from day, week, month, quarter, and year. A subtotal column sums preceding base columns, and a grand total column sums preceding subtotal columns. Using the editing tools and user interface provided by system 22, the user can at any time define or redefine the start and end dates for the statement sequence of columns (periods), which will be called the base period duration. The base period duration and the period unit define a time period style, which therefore defines the period of time covered by the statement and the temporal granularity of the statement. If the base period duration is not co-extensive with the a subtotal or grand total period unit, system 22 alerts the user and offers to extend the end date to allow computing the total. System 22 also detects and adjusts for a start date which is not on a period boundary: for example, if the start date is November, then the first quarter ending December 31st cannot be calculated and remains blank. A formula can include the distinguished term "DaysInPeriod", for which will be substituted the number of days in the period for the column in which the formula appears. For example, if DaysInPeriod appears in a formula in a column whose period unit is Quarter, then the number 90 will be substituted. In response to the user defining or redefining any of the time or time period parameters described above, system 22 sets the affected database, column, and time style properties, inserts total columns (or updates previously inserted total columns), and updates and populates the mockup statement accordingly. In particular, if the base period duration is changed, the input statement is recreated. Data Import System 22 optionally includes linking tools for importing data. For example, to facilitate use of data from Compustat financial databases (Standard & Poor's Compustat is a division of The McGraw-Hill Companies, Inc.), a workbook template is provided in which the row names are the names used in dictionary 23 and columns are formulas that are programmed to access data from Compustat databases. When the user enters Compustat as the database name in selecting database 30, system 22 opens an empty Compustat workbook and a Compustat database, typically on a CD-ROM. When the user has identified the company whose financial information is to be used, system 22 reads the data and populates a Compustat worksheet in the Compustat workbook to create an Excel database, in which the first column carries the term names and the first row, the data labels, both in the form expected by system 22 and dictionary 23 This Compustat worksheet is then used as the database source of input for the input statement. To assist the user in handling the general case, system 22 optionally provides tools to create a linking worksheet that creates a level of indirection between the names used by the system and print, label, and code names that may be used by a database from which data is to be imported. The linking worksheet in effect maps terms from the input database to dictionary 23. When a user requests system 22 to create a linking worksheet to an import database, system 22 opens the import database and, examining its first column, tries to match terms from the input database to those in dictionary 23. In column 1 of the linking worksheet, system 22 stores the terms from the import database. In the rows of column 2, system 22 stores the corresponding terms from dictionary 23. In the rows of column 3, system 22 stores a Boolean value set to true if the database row is a subitem of the matching term from dictionary 23, which information is received from the user. If this value is true, system 22 will itemize the corresponding row in the mockup statement and insert the import database term as a subitem in the row. In the rows of column 4, system 22 stores a Boolean value set to true if the import database term provides as data information that in dictionary 23 is calculated. If this value is true, system 22 will edit the term in the mockup statement at statement creation time to convert it to input. In the rows of column 5, system 22 stores a Boolean value set to true if the import database stores the term with a sign opposite to that expected by dictionary 23. If this value is true, system 22 will invert the imported data when populating the input statement. System 22 cannot guarantee that the linking worksheet will be defined completely or correctly, so the user must check this worksheet and possibly complete it by hand. For example, the user will want to confirm that names in columns 1 and 2 are properly matched, and that the Boolean values in columns 3 through 5 are properly set. In addition, if the import database has a single term that corresponds to a sum of rows in dictionary 23, the user will have to handle this as a special case. This may require the user to define terms to disaggregate the input database total or to define terms that use the total provided by the input database. Updating and Populating the Mockup Statement System 22 automatically creates (or updates) the input statement when the user selects UPDATE editing tool 182 from the financial statement editing tools (FIG. 6), or selects the input statement tab located at the bottom of the project workbook window displayed on user interface 28. System 22 creates input statement 52 by collecting all of the inputs needed to populate the mockup statement with values. For example, as shown in FIG. 12, an input statement 300 created for income statement 44 (FIG. 4) contains all of the inputs needed to populate income statement 44 with values. The input terms are inserted into terms area 60 and the associated values (obtained from another spreadsheet, an external database, or direct user input) are located in inputs area 62 under time periods area 58. System 22 first establishes an input statement, a spreadsheet named "INPUT", to which financial terms and values will be written. When the input statement is first created, the time range is displayed based upon the time style defined in the referenced financial statement. System 22 defines a parallel finStatement that contains pointers back to the INPUT spreadsheet and contains all of the information about these rows and columns of the INPUT spreadsheet. The INPUT spreadsheet is fully described by internal objects corresponding to the type data structure of a finStatement with its finRows, finColumns, and finCells. As explained below, once all of the inputs have been added to the INPUT spreadsheet, system 22 sets pointers from the mockup financial statement to the INPUT spreadsheet and sets the formulas for calculated terms. Referring to FIG. 13, a user may update the input statement by selecting UPDATE editing tool 182 (step 308). If there have not been any changes to the mockup financial statement that affect the input statement (step 310), system 22 returns control to the event loop and responds to subsequent user actions (step 92). System 22 verifies that there are calculated terms in the mockup financial statement (step 312). System 22 opens and clears the input statement (step 314). System 22 looks up or adds a finStatement object for the input statement (step 316). System 22 automatically inserts project name 54, input statement identifier 56, and time periods captions 58 into the input statement (step 318). For each finRow associated with the mockup financial statement, system 22 performs the following steps (step 320). If the term is not a header, not a secondary reference, not a term whose dependent was converted to an input or assumed to be zero, and not itemized (step 322), system 22 copies the input term from the mockup financial statement into the input statement (step 324; FIG. 13A). In effect, step 322 screens out headers and calculated terms that are not needed in the input statement. System 22 then repeats step 322 for the next finRow associated with the mockup financial statement (step 326). System 22 deletes terms that are not needed from the input statement (step 328). System 22 inserts formulas on the mockup financial statement (step 330; FIG. 13B). System 22 then relocks the data cells, protects the sheets, displays the statement selected by the user (input statement or mockup financial statement), and displays the financial statement editing tools menu (step 332). System 22 returns control to the event loop and responds to subsequent user actions (step 92). Referring to FIG. 13A, in order to copy the required input terms from the mockup financial statement to the input statement, each finRow of the mockup financial statement is processed as follows (step 324). If the term depends upon a term from a different time period (a "prior expression") (step 340), system 22 extracts the source term and marks the PriorYrHistory property of the finRow object for the term (step 341). For example, the term change_in_deferred_taxes, which is part of cash flow statement 48 (FIG. 2A), is defined as deferred_taxes minus deferred_taxes prior; the source term is deferred_taxes. If the term is a calculated term (step 342), and the term is not a top level term (i.e., the term appears in a spreadsheet formula) (step 344) or a user-defined input term (step 346) and the term is not a prior expression (step 348), system 22 parses the spreadsheet formula for the term and recursively returns to step 324 for each term in the spreadsheet formula (step 349). After each of the term's inputs has been copied into the input statement, the next finRow object is processed (step 326). If the term is not calculated (step 342) and is not a top level term (step 350), system 22 determines whether the term appears in the mockup financial statement (step 352). If the term appears in the mockup financial statement, system 22 processes the next finRow object (step 326). If the term does not appear in the mockup financial statement (step 352), or if the term is a top level term (i.e, a spreadsheet formula is not currently being analyzed) (step 350), system 22 determines the DuplicateCode and the ItemizationCode properties of the finRow object for the term (step 354); these properties are used for looking up the term in the input statement. If the term is in the input statement (step 356), system 22 marks a reference to the mockup financial statement and sets a "previously in sheet" property for the term (step 358). If the term is not in the input statement (step 356), system 22 creates a finRow object, marks a reference to the mockup financial statement, and copies the PriorHistory property of the term (step 360). If the term is not a top level term (step 362) and is a term that was just added to the input statement in step 360 (step 364), system 22 processes the next finRow object for the mockup financial statement (step 326); if the term was not just added to the input statement in step 360 (step 364), system 22 sets the label using the PNAME relation of the term and defines the row name reference for the term (step 366). Referring to FIG. 13B, if the term is a top level term (step 362, FIG. 13A) and the source term appearing in the mockup financial statement is aliased (step 368), system 22 sets the alias property and label property in the finRow object for the term and defines the row name reference (step 370). If the term appearing in the mockup financial statement is not aliased (step 368), system 22 sets the label property in the finRow object for the term and defines the row name reference (step 372). System 22 sets the AssumeZero and UserDefinedInput properties and copies the UserDefinedlnput, DuplicateCode, and ItemizationCode values in the finRow object for the term (step 374). System 22 sets the input values, including the values obtained from financial database 30 (FIG. 1) and the font color values described above (step 376). System 22 then processes the next finRow object for the mockup financial statement (step 326). Referring to FIG. 13C, system 22 inserts formulas into the mockup financial statement as follows (step 330; FIG. 13). For each row in the mockup financial statement, system 22 performs the following steps (step 390). If the row contains a section header term (step 392), system 22 proceeds to the next row (step 390). If the row contains a term that is in the input statement (step 394), system 22 creates a reference from each column in the mockup financial statement to the corresponding column in the input statement (step 395); system 22 then proceeds to the next row (step 390). If the row contains an itemized term (step 396), system 22 creates an item total spreadsheet formula, copies it into the first column cell of the row, and uses Excel to copy the appropriate formulas into the remaining columns of the mockup financial statement (step 398). If the row contains a calculated term and its dependents are assumed to be zero or its dependents have been converted to inputs (step 400), system 22 proceeds to the next row (step 390). If the row contains a calculated term and all of its predecessors appear in the mockup financial statement and none of the predecessors are prior expressions (step 402), system 22 creates the formula, copies it in the first column cell of the row, and uses Excel to copy the appropriate formulas into the remaining columns of the mockup financial statement (step 404). If the row does not contain a calculated term (step 406), system 22 proceeds to the next row in the mockup financial statement (step 390). If the row contains a calculated term (step 406), system 22 inserts formulas for the calculated term into each column of the mockup financial statement (step 408), then proceeds to the next row in the mockup financial statement (step 390). Referring to FIG. 13D, system 22 defines formulas for a calculated term appearing in a row of the mockup financial statement as follows (step 408). For each column in the mockup financial statement, system 22 performs the following steps (step 410). If the first column is being populated and the term's formula includes a recursive prior expression (e.g., x=f(x_prior)) (steps 411 and 412), system 22 creates a reference to the input statement in the first column cell (step 414); if the term's formula includes a prior expression that is not recursive (e.g., y=f(x_prior)), system 22 copies a null value into the first column cell (step 418). If the first column cell does not include a prior expression or the first column is not being populated (step 411), system 22 creates the formula for the term, as defined in financial knowledge base 23, and copies it into the cell (step 420). System 22 then proceeds to the next column in the mockup financial statement (step 410). System 22 creates names for the primitive terms in a formula defined in financial knowledge base 23 as follows. If the primitive term is in the mockup statement, its name or alias is used; otherwise, system 22 looks in other statements, avoiding secondary references (because they cannot be referenced by other sheets), and finally looks in the input statement. If the term is a prior term, the prior column for the current period is identified, and the Excel intersect operator is used to specify the cell for the term. If the term is a duplicate, a "+" is prepended to it, to which will be joined the other associated duplicate term(s). If the term was found in a different spreadsheet, the spreadsheet name is inserted to produce a formula of the form: <sheet name>!<row name><sheet name>!<column name>. (The space between > and < is the Excel intersect operator.) Thus, if a calculated term has inputs that do not appear in the mockup financial statement or has a formula with a prior expression, system 22 creates in the formula a reference to the statement and column of the cell containing the appropriate input value. System 22 does not insert into the input statement terms that are referenced as secondary references on any financial statements. In formula creation, system 22 creates references back to the primary reference. Referring to FIG. 13E, system 22 performs step 395 (FIG. 13C) as follows, for each column in the statement (step 432), in time sequence order from beginning with the earliest column. If the column is a subtotal or a grand total (decision step 434), then if the value in the underlying database is a stock (that is, cumulative and thus already a sum, such as accounts receivable) (decision step 436), system 22 copies the cell formula from the preceding column (step 438); otherwise, the underlying database value is a flow (that is, a value for a period, such as net sales), and system 22 sets the cell formula to calculate the sum of the appropriate preceding sequence of values (step 440). In this step 440, a number of cases are handled. If the total is incomplete (for example, a first quarter total in a statement that begins in the second month of the quarter), the result is blank. If there is only one total column and it is the last column in the statement, the resulting formula is "=SUM(INPUT!X)", where X is the row on the INPUT sheet. This formula sums all the row X cells. If the column is a subtotal, the resulting formula is "=SUM((X<column_first>):(X<column_last>))". In this case, the columns are on the mockup statement and so no reference to the INPUT sheet is required. The formula uses the Excel intersect operator to identify the cell where row X intersects the first or the last column in the sequence to be summed. Finally, if the column is a grand total, system 22 works back from the immediately preceding column, which must be a subtotal, to create a formula that sums the subtotal columns in the grand total sequence, using the Excel "+" operator to create the sum. The columns in the sequence are found using the TotalStartColumn and TotalEndColumn properties of grand total and subtotal finColumn objects and the base and subtotal period units. If the column is not a subtotal or grand total column and if the column needs totals for base periods ("yes" branch from decision step 442), then if the value is a stock (decision step 444), system 22 sets the cell formula using the column identified by the TotalEndColumn property, which is the last INPUT column in sequence for base period of the mockup statement (step 446); otherwise, the value is a flow and system 22 sets the cell formula to sum the INPUT columns corresponding to the period covered by the present statement column (step 448). If the column does not need totals for base periods ("no" branch of decision step 442), the column is a regular period unit and the cell formula is set to copy the value from the corresponding INPUT column (step 450). If subtotal or grand total columns intervene, the column number of the present statement column will differ from that of the corresponding INPUT column; system 22 keeps track of the correspondence so the columns can be mapped to each other. Formula Generation Summarized The following table and discussion summarize formula generation by system 22. Each cell in the table indicates how a formula for the indicated type of column is generated.
Base period total Additional total
Regular column (smallest unit of (subtotal or grandtotal
(period unit same statement > database unit > smallest unit
of
Term X as database unit) unit) statement)
Input Stock Input!X Last column of this Previous column in the
database input statement
sequence
Input Flow Input!X Sum of inputs for this Sum of columns of
previous
database sequence type
Calculated Formula as is Formula as is; inputs Previous column,
except
Stock must be in the sheet "prior" refers to
previous
column of same period
type
Calculated Flow Formula as is Formula as is; inputs Formula as is (sums
up the
must be in the sheet column)
A formula in the dictionary is a symbolic expression with only terms, e.g., Current_Liabilities=Notes_Payable+Accounts_Payable+Income_Taxes_Payable+Ac crued_Expenses+Other_Current_Liabilities+Current_Portion_Of_Long_Term_Debt. Formula generation modifies such expressions to include sheet and column labels as necessary, but only as necessary, to make the formulas easier to read. Excel allows "English" labels to be used in formulas, but column lookup is not smart. For that reason, columns labels must be specified if the statements have different column labels (see discussion of INPUT!X, below). Also, the input sheet does not include total columns, therefore, there may not be a one-to-one correspondence between input and statement columns (which Excel requires for English formulas). For example, input columns may be Months, and the statement could include columns for Quarters and Years. Finally, formulas with "prior terms" require special treatment. A prior term always requires a column label qualification; although columns usually do not need to be specified. In the preceding table, the notation "INPUT!X" indicates that for term X, the Excel formula is simply "=INPUT!X", i.e., the value in the statement cell is the value of the corresponding cell on the input sheet named INPUT (the INPUT row with label X and INPUT column with same label as the statement). Note that by default, Excel will match columns ordinally, that is, if INPUT!X appears in the third column of a statement, then Excel will use the value in row X and the third column of the INPUT sheet. Excel does not examine labels, but rather uses column order. The designation "Stock" indicates that the value in the database is a stock value, meaning that it is cumulative (that is, already a sum), such as Accounts Receivable. The designation"Flow" indicates that the value in the database is a flow value, meaning that it relates solely to the corresponding period, such as Net Sales. The designation "Sum of inputs for this sequence" indicates an Excel formula that is the sum of the corresponding INPUT columns; for example, if a period is Qtr3, then the corresponding input sequence is July, August, September from the same year. The last column of this input sequence would be September. The designation "Formula as is" indicates that the Excel formula is simply the symbolic formula using terms as they appear in the statement, without column labels, for example, "=Revenues-Expenses". In this situation, Excel automatically substitutes the values for the corresponding terms in the same column, for example, Profits Qtr3=Revenues Qtr3-Expenses Qtr3. The Qtr3 indicators need not be specified. By default Excel will treat all the terms in a formula as being rows in the statement in which the formula appears and by default will assume that all values come from the same column as the cell in which the formula appears. Note that a prior term (e.g., "Accounts_Receivable_prior") always requires a column label qualification, to refer to the previous column of the same period type. The designation "inputs must be in the sheet" indicates that in certain cases, to make the formulas easier to generate and easier for the user to read, terms that are inputs (appearing in the INPUT sheet) are copied over to the statement that uses them. This makes it possible to use a formula as is, rather than substituting references to the INPUT sheet and its columns. The designation "previous column in the statement" indicates the column immediately preceding this total column; for example, if a subtotal period unit is YEAR, then the previous column in the statement would be a base period column, which could be a day, week, month, or quarter, namely the last day, week, month, or quarter of that year. The designation "sum of columns of the previous type" indicates that the formula for computing this total is generated by summing the columns of the next smaller period unit. For example, if the grandtotal type is YEAR and the subtotal type is MONTH, then the "previous type" is MONTH, and the total for the year will be the sum of the month columns. In practice, the "previous type" is the period type of the column immediately preceding this total column. The designation "previous column" indicates a value that is the same as the value in the immediately preceding column; for example, if grandtotal type is YEAR and subtotal type is MONTH, then Accounts Receivable 1996=Accounts Receivable December 96. The designation "prior refers to previous column of the same period type" applies to a calculated stock; the prior reference in a total column refers to the value for the previous column of that total type, for example "prior" in a 1996 column refers to the value for 1995. For example, assuming grandtotal type is YEAR and subtotal type is MONTH, and having a dictionary formula "Sales Growth %"=(NetSales_-Net_Sales_prior)/Net_Sales_prior; then the column formula would be Sales Growth % 1996=(Net_Sales December 96-Net_Sales 1995)/Net_Sales 1995. Data Export The financial knowledge base 23 includes two properties to facilitate data export, EXPORTKEY and EXPORTPRINT. Both have values of type "string". These properties can be edited by a user through the user interface, or they can be defined in a predefined workbook. If the value of EXPORTKEY for a term is non-blank, the term's row will be added to an export file when the export file is created, by a user invoking an export command, for example. In the export file, the value of property EXPORTPRINT will be the print name of the term, replacing the contents of the first column of the mockup statement. Optionally, the value of EXPORTKEY can be a database code for use by a database system reading the export file, and in that case the code value can also be included with the row in the export file. Optionally, too, system 22 can include in the export file a header providing time style information. Using these features, a user of system 22 can easily export a statement created by the system for use by another application, and in particular by another financial analysis application, in a form that is easily imported by the other application. Other Features As mentioned above, overwriting a term name assigns an alias to a predefined term contained within financial knowledge base 23. A user may also extend the dictionary of financial terms in financial knowledge base 23 and give formula definitions to new terms by example. For example, a user-defined term and an associated formula may be inserted into a financial section of a mockup financial statement, and system 22 can be directed to add the user-defined formula to financial knowledge base 23. System 22 prompts the user to indicate whether the added term should be added to the dictionary section corresponding to the section in which the term appears in the mockup financial statement. If not, system 22 prompts the user to identify the section to which the term should be added, or whether a new user-defined statement template should be created. A user can also override a predefined formula. The user is prompted to indicate whether the existing term is to be converted into a new term (i.e., the new term will be used only where the user references the term) or whether the built-in term is to be redefined. System 22 shows in blue user-defined terms and terms with redefined formulas. For example, if a user redefined the net revenue term, system 22 displays in blue all cells with values derived from built-in formulas that depend on net revenue. The mockup financial statement shown in FIG. 2 displays financial information as a matrix of rows of financial terms and columns of time periods. Financial reports can be constructed in other ways. In one arrangement, a financial report presents financial information as a matrix of rows of contexts and columns of financial terms; this is useful when there is to be one report for each time period. For example, a financial report for a database of assets can show unit price, number of units, value, change, percentage ownership, and tax liability. In another arrangement, a financial report presents financial information as a matrix of rows of periods and columns of financial terms; this is useful when there is to be one report for each context. For example, a financial report for a projection of liabilities, such as a mortgage payment calculation, can show balance, payment, and interest per period for each of a number of properties. In sum, a novel toolkit for creating and editing reports has been described. The toolkit includes a knowledge base with a dictionary of domain-specific terms, which can be selected by a user to create and edit a report. The toolkit can also assemble predefined reports that can be customized with one or more editing tools. The toolkit can be used to help frame, formulate, and interpret an analysis for common business purposes. In the implementation described, the toolkit manages electronic spreadsheets using a knowledge base that represents how terms in domain-specific reports (i.e., financial statements) are related. This toolkit enhances an Excel spreadsheet by managing information and models and providing an interface between spreadsheets (cell and formulas) and databases (inputs). The toolkit provides a library of reusable components (objects) that contains definitions of numeric calculations in terms of business, organization, product, geographic, and time relations. The toolkit allows a user easily to create a standardized report based upon a predefined template or to create an arbitrary, syntactically and semantically correct report from the terms contained within the built-in dictionary, which may be customized with user synonyms. The toolkit also creates an input spreadsheet that can be used to link all non-calculated cells appearing in a report to a user-supplied database. The input spreadsheet readily allows a user to perform what-if analyses. The present invention has been described in terms of specific embodiments. The invention, however, is not limited to these specific embodiments, and other embodiments are within the scope of the claims.
|
Same subclass Same class Consider this |
||||||||||
