..2 Form

The Form's source is here .

How to import Form into the system see here .

Markup of template

Add new elements to existing markup of template as shown below :

Details (how it's done):

So, we have to insert any chart (i.e.Chart model) from the Excel collection into the worksheet of template. This is most easily to do via dummy dataset (which, of course, will not be displayed in Printing form):

Select the Dummy dataset sell range, after that, go to menu Excel: Insert--> Chart and pick a chart that you need :

Finally, the Chart model (chart, based on Dummy dataset) will be placed on the worksheet:

  • Now you can change all chart formatting options (styles, colors, shadows, transparency, borders, lines width, relative positioning of the chart elements and other options) , to reach design which you need .

  • The location of the Chart model in the Excel-template does not metter.

  • You able to delete the Dummy dataset after you have added the Chart model into the worksheet (the Dummy dataset does not matter), however, it would be better to leave it for clarity.

Form structure

Add the «Chart» component under the «Pattern», as shown below :

Setup the «Chart» component

Select the «Chart» component node in the Form structure tree. In the Properties tab perform next steps :

  • in the Item «Area in the template» perform Template binding ;

  • in the Item «Layout options»:

        • press the button «Model» and in the next popup-list pick the Chart, which you want to set as format sample ;

        • press the button «Series name» , to switch to the mode «from Dataset grid column captions» ;

  • in the Item «Dataset»:

        • press the button «Grid» and in the next popup-list pick the Grid, which will data provider for the Chart;

        • press the button «Series» and assign each of chart Series to appropriate column of the scified Grid ;

Activate the Form by pressing a button

Form is ready to use now.

Explanations

  • Location of the Chart model on the Excel-template worksheet does not matter for final location of «Chart» in the Printing form at runtime.

The «Chart» location in the Printing form at runtime is only defined in the Item «Area in the template» of the Properties tab (location can only be within borders of the the superior «Pattern»).


  • For clarity, in this example the «Chart» takes not all area, but only the central part (light colored rectangle with dotted border) of the superior «Pattern».

However, nothing prevents us to perform Template binding with entire area «Pattern». As result chart will not have a gray border around it.


  • The initial references of chart series (to the Dummy dataset) will be redefined at runtime: There will be references to the appropriate columns of the Dataset grid instead of Dummy dataset.

At the same time, the Dummy dataset will not be displayed in the Printed form at runtime (because it is not assigned to Form components) .


  • You can define the Chart title statically, in the Excel-template (Chart model). But, you also can define a context field, from which the chart title will be taken at runtime, to dynamically set it from printing program.