Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
HTML
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
	<TITLE>Management Report: System Status Report</TITLE>
	<!--check for right levels up-->
	<link href="css\styles.css" rel="styleSheet" type="text/css">
	<link href="css\tables.css" rel="styleSheet" type="text/css">
</head>
<body>

$CHART(chartMainH)$


</BODY>
</HTML>

Setting up a report with a table

In this example we will create a report with a table containing water levels at a specific location. The descriptions of the elements, as in the previous chapter, are not repeated.

Declaration

In the next code block is a configuration of a simple chart:

Code Block
xml
xml

<htmlTableFormat id="SimpleTable" tableStyle="tableStyle1">
			<column>allSeries</column>
			<row>time</row>
			<includeBeforeOrEqualToTimeZeroInChoiceFormat>false</includeBeforeOrEqualToTimeZeroInChoiceFormat>
			<relativeWholePeriod start="-5" end="5" unit="day"/>
			<topLeftText>Datum-Tijd</topLeftText>
			<cellFormat>{0,number,0.00}</cellFormat>
			<topFormat/>
			<leftFormat>{0,date,dd MM yyyy HH mm}</leftFormat>
			<missingValueText>#</missingValueText>
			<nullValueText>-</nullValueText>
		</htmlTableFormat>

Different tablestyles can be chosen. Here examples of the different standard table styles can be found.
The HTMLTableFormat ID will later be used to refer to this layout. In above section is described what information is to be placed in the columns and in the rows. In this case the columns contain the locations, and the rows the date/time.

Report

In the next block of code we connect the chart layout to a time serie.

Code Block
xml
xml

<report>
		<inputVariable variableId="OB_H1" variableType="any">
			<timeSeriesSet>
				<moduleInstanceId>ImportAquaView</moduleInstanceId>
				<valueType>scalar</valueType>
				<parameterId>H.meting</parameterId>
				<locationSetId>OB_H.meting</locationSetId>
				<timeSeriesType>external historical</timeSeriesType>
				<timeStep unit="minute" multiplier="5"/>
				<relativeViewPeriod unit="hour" start="-10" end="10"/>
				<readWriteMode>read only</readWriteMode>
			</timeSeriesSet>
		</inputVariable>
<htmlTable id="test_tabel" formatId="SimpleTable">
			<timeSeries>OB_H1</timeSeries>
		</htmlTable>
		<template>template.html</template>
		<outputFileName>chartreport.html</outputFileName>
	</report>

In the htmlTable section the connection is made between the time serie(s) and the table layout (as defined in the declarations section).

Info

The formatID should be the same as the ID of the HTMLFormat as defined in the declarations section!
The element "Timeseries" contains the ID of the inputvariable!
The ID of the table(in this example "tabel") will appear later in the template HTML file.

HTML template file

The template file for the HTML table is the same as for the chart, except that the tag is different:
$TABLE(test_tabel)$