from steelscript.appfwk.apps.datasource.modules.analysis import CriteriaTable from steelscript.appfwk.apps.report.models import Report, TableField from steelscript.appfwk.apps.report.modules import raw report = Report.create(title='Criteria Circular Dependency') report.add_section() a = CriteriaTable.create('test-criteria-circulardependency') TableField.create(keyword='t1', obj=a, post_process_template='table_computed:{t2}', hidden=False) TableField.create(keyword='t2', obj=a, post_process_template='table_computed:{t3}', hidden=False) TableField.create(keyword='t3', obj=a, post_process_template='table_computed:{t1}', hidden=False) report.add_widget(raw.TableWidget, a, 'Table')
from django import forms from steelscript.appfwk.apps.datasource.modules.analysis import CriteriaTable from steelscript.appfwk.libs.fields import Function from steelscript.appfwk.apps.report.models import Report, TableField from steelscript.appfwk.apps.report.modules import raw from . import criteria_functions as funcs report = Report.create(title='Criteria Changing', field_order=['first', 'second']) section = report.add_section(title='Section 0') TableField.create('first', 'First Choice', section, field_cls=forms.ChoiceField, field_kwargs={'choices': (('a', 'Option A'), ('b', 'Option B'))}) TableField.create('second', 'Second Choice', section, field_cls=forms.ChoiceField, pre_process_func=Function(funcs.preprocess_changesecond), dynamic=True) a = CriteriaTable.create('test-criteria-changingchoices') report.add_widget(raw.TableWidget, a, 'Table')
from steelscript.appfwk.apps.datasource.modules.analysis import CriteriaTable from steelscript.appfwk.apps.report.models import Report, TableField from steelscript.appfwk.apps.report.modules import raw report = Report.create(title='Criteria Two Reports - 2') TableField.create(keyword='k2', label='Key 2', obj=report, initial='r2') # Section report.add_section(title='Section') # Table a = CriteriaTable.create('test-criteria-tworeports-2') TableField.create(keyword='k1', label='Key 1', obj=a, initial='r1') report.add_widget(raw.TableWidget, a, 'Table 2')
from steelscript.appfwk.apps.datasource.modules.analysis import CriteriaTable from steelscript.appfwk.apps.report.models import Report, TableField from steelscript.appfwk.apps.report.modules import raw report = Report.create(title='Criteria Two Reports - 1') # Section report.add_section(title='Section') # Table a = CriteriaTable.create('test-criteria-tworeports-1') TableField.create(keyword='k1', label='Key 1', obj=a, initial='r1') report.add_widget(raw.TableWidget, a, 'Table 1')