DW_append_report {formods}R Documentation

Append Report Elements

Description

Takes the current state of the app and appends data views to an xlsx report object.

Usage

DW_append_report(state, rpt, rpttype, gen_code_only = FALSE)

Arguments

state

DW state from DW_fetch_state()

rpt

Report with the current content of the report which will be appended to in this function. For details on the structure see the documentation for FM_generate_report.

rpttype

Type of report to generate (supported "xlsx").

gen_code_only

Boolean value indicating that only code should be generated (FALSE).

Value

list containing the following elements

See Also

FM_generate_report

Examples

# We need a state object to use below
sess_res = DW_test_mksession(session=list())
state = sess_res$state

rpt = list(summary = list(), sheets=list())

rpt_res = DW_append_report(state,
 rpt     = rpt,
 rpttype = "xlsx")

# Shows if report elements are present
rpt_res$hasrptele

# Code chunk to generate report element
cat(paste(rpt_res$code, collapse="\n"))

# Tabular summary of data views
rpt_res$rpt$summary

[Package formods version 0.1.6 Index]