reportingwysiwyg.frx 26.7 KB
Newer Older
1
2
3
4
5
6
7
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE root [
<!ENTITY nbsp "&#160;">
<!ENTITY reg "&#174;">
]>
<html xmlns:frx="urn:FrxReports">
<head>
metzlerd's avatar
metzlerd committed
8
<title>WYSIWYG Reporting</title>
9
10
11
12
13
<frx:category>Help</frx:category>
<frx:options hidden="1" />
<frx:fields>
  <frx:field id="title" link="reports/help.reportingwysiwyg#{link}" />
	<frx:field id="admin_reports" link="admin/structure/forena">admin/structure/forena</frx:field>
metzlerd's avatar
metzlerd committed
14
	<frx:field id="reports_add" link="reports/add">reports/add</frx:field>
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
	<frx:field id="my_reports" link="forena" target="_self">My Reports</frx:field>
	<frx:field id="repords_add" link="reports/add">reports/add</frx:field>
	  <frx:field id="crosstab_template" link="reports/help.renderers#frxcrosstab"
    target="_blank">Crosstab template</frx:field>
  <frx:field id="svggraph_template" link="reports/help.renderers#frxsvggraph"
    target="_blank">SVG Graph template</frx:field>
</frx:fields>
<frx:parameters />
<frx:docgen />
</head>
<body>
  <div class="toc" id="help-toc-1" frx:block="forena_help/reportingwysiwyg_topics">
    <h3>Including</h3>
    <ul>
      <li id="help-toc-2" frx:foreach="/book/chapters/chapter">{title}<span frx:if="{subtitle}">: {subtitle}.</span></li>
    </ul>

  </div>
	<h2 id="intro">Introduction</h2>
	<p>
metzlerd's avatar
metzlerd committed
35
36
		Forena is built of the idea of using <abbr title="Structered Query Language">SQL</abbr> to get data out of a database 
		and use XHTML and CSS to format it into web reports. It is designed to leverage existing knowledge of <abbr
37
			title="HyperText Markup Language">HTML</abbr>, <abbr title="Cascading Style Sheets">CSS</abbr>, <abbr
metzlerd's avatar
metzlerd committed
38
			title="Structered Query Language">SQL</abbr> and JavaScript to help you create rich interactive web reports.
39
40
41
42
43
44
	</p>
	<p>
		A <strong>What You See Is What You Get </strong>(WYSIWYG) compatible report editor is provided to make the creation of a basic
		reports very easy. You don't have to know <abbr title="eXtensible HyperText Markup Language">XHTML</abbr> and <abbr
			title="Cascading Style Sheets">CSS</abbr> to create a simple report, but the more you now about <abbr
			title="HyperText Markup Language">HTML</abbr> and <abbr title="Cascading Style Sheets">CSS</abbr>, the more you will be able
metzlerd's avatar
metzlerd committed
45
		to achieve.
46
47
	</p>
	<p>
metzlerd's avatar
metzlerd committed
48
		The main differences with other open source reporting solutions such as JasperReports <sup>&reg;</sup> or mondrian are:
49
50
51
52
53
54
55
56
57
58
59
60
61
	</p>

	<ol>
		<li>Forena leverages <abbr title="HyperText Markup Language">HTML</abbr> and <abbr title="eXtensible Markup Language">XML</abbr>
			in ways that these report engines do not. In Forena everything is <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>
			natively, so that is your templating language. This means rather than having users enter parameters, most often they are
			doing <em>click-through</em> drilling down to their data. Forena produces paper as a secondary thing rather than a primary
			concern. We are NOT interested in printing most of the time, but rather exploring the data.
		</li>
		<li>Forena lets you consume hierarchical data from non-relational sources such as RSS feeds, etc (anything in <abbr
			title="eXtensible Markup Language">XML</abbr> format) and has special considerations for databases that can generate <abbr
			title="eXtensible Markup Language">XML</abbr> natively (e.g. Postgres or Oracle SQL).
		</li>
metzlerd's avatar
metzlerd committed
62
63
		<li>Forena is designed to make generating data sources and reports be report developer friendly. Data queries
			, often called data blocks,  are simple files that can be version controlled and edited using normal development toos. They are often parameterized <abbr
64
65
66
67
68
69
70
71
72
			title="Structered Query Language">SQL</abbr> files, so they don't take much to use. Time from a good select statement to a
			report is typically 5 minutes or less.
		</li>
		<li>Forena doesn't require a Java stack! So you can install it on a hosting service, etc.</li>
	</ol>
	<p>
		Novice users may want to start by creating reports using the built-in <abbr title="What You See Is What You Get">WYSIWYG</abbr>
		report editor. Users with knowledge of <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>, <abbr
			title="Cascading Style Sheets">CSS</abbr> and <abbr title="eXtensible Markup Language">XML</abbr> may choose to edit the
metzlerd's avatar
metzlerd committed
73
74
		FRX report definition files directly. The <abbr
			title="Forena Report XML">FRX</abbr> Reporting Guide is available for those who are interested in doing so.
75
	</p>
metzlerd's avatar
metzlerd committed
76
	<h2 id="create">Creating a Report</h2>
77
78
79
80
	<p>To create a new report using the WYSIWYG report editor, use either of these methods to do so:</p>
	<ul>
		<li>Use the menu option Create Report, which is typically located in the navigation menu block, provided it has been
			enabled by your site administrator during Forena's administration, as explained within {enable_create_report}.</li>
metzlerd's avatar
metzlerd committed
81
		<li>Visit the {admin_reports} page and select the Create New Report link on that page.</li>
82
	</ul>
metzlerd's avatar
metzlerd committed
83
	<h3>Specify the Title and Name</h3>
84
85
86
87
88
	<p>
		The <strong>Title</strong> field indicates the title of the report as it will appear for the user. In this example we'll use
		"Test Simple Report" as the title of our report.
	</p>
	<p>
metzlerd's avatar
metzlerd committed
89
		The <strong>Report Name</strong> is a unique name that is used to save the report definition. In this example we
90
		will use test/simple as the Report Name, which implies that our report will be stored in directory <strong>test</strong>, and
metzlerd's avatar
metzlerd committed
91
92
		that the filename of our report will be <strong>simple.frx</strong> The .frx extention is automatically added to the
		filename. 
93
94
95
96
97
98
99
	</p>
	<p>
		For this simple report, you can leave the remaining fields blank, and hit the CREATE button. After doing so, you'll
		be taken to the Report Editing screen, which has an URL like /reports/test.simple/edit.
		Notice the warning message at the top of this edit screen, which states "All changes are stored temporarily. Click Save to
		make your changes permanent. Click Cancel to discard your changes.".
	</p>
metzlerd's avatar
metzlerd committed
100
101
	<h3>Save the Report</h3>
	<p>Saving the report will  store all details in the .frx file we specified and display an informational message at the top of the screen, which states "Your report,
102
		test/simple has been saved.". Voilà!</p>
metzlerd's avatar
metzlerd committed
103
104
	<p>Note that your test/simple report does NOTshow up in the list of reports shown via menu item {my_reports}. 
	   That's because we have not specified a category yet for our report, something we'll be doing via
105
106
		the General Tab later on.</p>
	<h3>Retrieving your report</h3>
metzlerd's avatar
metzlerd committed
107
108
	<p>To retrieve your report later on, go to URL /reports/test.simple. If you want to change
		the report definition click on the tiny edit icon.</p>
109
	<h2 id="datablocks">Data Blocks</h2>
metzlerd's avatar
metzlerd committed
110
111
	<p>Data blocks correspond to a specific query to a database or application. These data blocks are typically created
      by a site administrator or developer.</p>
112
113
114
	<h3>Adding a first Data Block to your report</h3>
	<p>
		Data blocks can be added to a report via the Report Editing screen. To
metzlerd's avatar
metzlerd committed
115
116
117
		add such a data block to our test/simple report, click on the tiny icon with a green plus sign labeled "Insert Data"  which can be found on the Report Editing screen (if you're not yet on the report editing
		screen. After doing so, you will be taken to the <strong>Select Data Block</strong> screen. Select a data block to be used on the report. 
		You may search for the name of any provided data blocks.
118
119
120
121
	</p>
	<p>
		For this report, we'll use one of the sample queries, i.e. <strong>sampledb/users_by_state</strong>. Select this data block by
		just clicking on it, which will take you to the <strong>Preview Data Block</strong> screen. If the selected data block was
metzlerd's avatar
metzlerd committed
122
		contains parameters you'll be prompted to enter a values.  You must be able to generate data previews prior to selecting a data block.
123
124
125
	</p>
	<p>The Preview Data Block screen gives you a preview of the data included in the data block you selected. This preview
		shows a sample table layout of the data returned by that data block. You may need to specify required parameters in a report
metzlerd's avatar
metzlerd committed
126
127
		in order to generate sample data before your report preview can be created. You cannot use the editor to add data to
		the report unless you can provide parameters that cause the query to actually return data. Keep pressing Preview until you
128
129
130
131
		see the data that you're expecting in the report. Don't worry if the preview shows too many fields, or isn't quite in the
		right format. You'll be able to control that in the Layout tab later on.</p>
	<p>
		To confirm your data block selection press the <strong>Select</strong> button, which will take you to the <strong>Add
metzlerd's avatar
metzlerd committed
132
			Data</strong> screen. Using the Add Data screen
133
		you can customize the columns of the selected data block (their order, which ones to include/exclude, etc), and optionally
metzlerd's avatar
metzlerd committed
134
		enter a header for it. You can also select any of the available templates to decide the basic look
135
136
137
138
139
140
141
142
143
		and feel of the data block that you are adding to the report. Some of these templates are straight forward, such as the <strong>Simple
			Table display</strong>. Here are some of the more sophisticated data block templates to choose from (including a link with details
		about their corresponding renderers and FRX syntax, which includes some examples using these templates also):
	</p>
	<ul>
		<li>{crosstab_template}.</li>
		<li>{svggraph_template}.</li>
	</ul>
	<p>
metzlerd's avatar
metzlerd committed
144
145
		<strong>Note:</strong> by using the WYSIWYG editor you don't have to know about the .frx syntax of any of these
		templates, but the constructed report will still be an .frx file saved on the file system which may be manipulated directly.
146
147
148
149
150
	</p>
	<p>Use the Preview button to see the effects of your customizations. Feel free to experiment with these templates to get a
		report that looks as close as possible to the design you are looking for. Note that you will be able to further customize
		these layouts later on by using the layout tab on the report editor screen.</p>
	<p>
metzlerd's avatar
metzlerd committed
151
152
		When you're finished selecting your customizations on the Add Data screen, use the <strong>Insert</strong> button to 
		add the selected data block to the report. 
153
154
155
156
	</p>
	<h3>Adding additional Data Blocks to your report</h3>
	<p>
		The steps required for adding additional Data Blocks to your report are mostly similar to the steps to add a first Data Block
metzlerd's avatar
metzlerd committed
157
		to your report using the tiny icon with a green plus sign. If the additional data block is to be inserted
158
159
160
161
		before the already existing one, use the icon <strong>above</strong> the existing data block. If however the additional data
		block is to be inserted after the already existing one, use the icon <strong>below</strong> the existing data block.
	</p>
	<h3>Editing Data Blocks in your report</h3>
metzlerd's avatar
metzlerd committed
162
	<p>Sometimes you may want to edit the presentation of an existing data block in a report, here are a few samples
163
164
165
		why you'd want to do so:</p>

	<ul>
metzlerd's avatar
metzlerd committed
166
167
168
		<li>Add some extra columns to the report</li>
		<li>Remove some of the existing columns in the report</li>
		<li>Change the order of presentation of the columns</li>
169
170
171
172
	</ul>
	<p>
		To edit an existing data block in the report, go to the report edit screen and click on the hyperlink related to the data
		block to be edited. This will take you to the <strong>Edit Block</strong> screen. The features available on this Edit Block
metzlerd's avatar
metzlerd committed
173
		screen are identical to those on the <strong>Add Data</strong> screen.
174
175
176
	</p>
	<h3>Removing Data Blocks from your report</h3>
	<p>
metzlerd's avatar
metzlerd committed
177
178
		If you want to remove a data block from the report, go to the report edit screen and click on the tiny icon with a red minus
		sign, and which says "Remove Data" if you move your mouse pointer over it. After doing so, you will be taken to a screen that
179
		says something like <strong>Are you sure you would like to remove the ... content</strong>. Select the <strong>Yes</strong>
metzlerd's avatar
metzlerd committed
180
		button to confirm the removal of the data block from your report or <strong>No</strong> to cancel your request.
181
182
183
	</p>
	<h2 id="general">General</h2>
	<p>
metzlerd's avatar
metzlerd committed
184
		Using the <strong>General</strong> tab on the report editing screen, you can specify various general options of the report. If
185
		you're not yet on the report editing screen, you can access it by clicking on the tiny edit icon shown when viewing the
metzlerd's avatar
metzlerd committed
186
		report.
187
188
189
190
191
192
193
	</p>
	<p>Explanation of the available options on this form are as follows:</p>
	<ul>
		<li><strong>Title</strong> - The title of the report, which can be used to modify the original title that was entered
			when the report was first created.</li>
		<li>Use the <strong>Visibility</strong> options to enter these specifications of the report:
			<ul>
metzlerd's avatar
metzlerd committed
194
195
196
				<li><strong>Category</strong> - This controls under which group the report appears under the {my_reports} list. A
					report without a category will not show up in it.</li>
				<li><strong>Hidden</strong> - Checking this checkbox will cause the report not to be listed in the {my_reports} list regardless of Category.</li>
197
198
199
			</ul>
		</li>
		<li><strong>Menu</strong> - Click on the menu link to expand it so that some additional options related to it become
metzlerd's avatar
metzlerd committed
200
			visible. By checking the <strong>Provide a menu link</strong> checkbox, some additional options will become
201
202
			available to actually specify the various options to create a Drupal menu pointing to the report, i.e.:
			<ul>
metzlerd's avatar
metzlerd committed
203
204
				<li><strong>Menu Path</strong> - The site relative path for the menu item. Parameters may be embedded in the url using
					a :parm syntax (e.g. states/:state).</li>
205
				<li><strong>Additional Arguments </strong> - Additional parameters that should be extracted after the menu path using a
metzlerd's avatar
metzlerd committed
206
					:parm syntax (e.g. :parma/:parmb.)</li>
207
208
				<li><strong>Type of menu to create</strong> - Use standard conventions for creating a menu item in the format of normal
					menu items, tabbed menus, etc.</li>
metzlerd's avatar
metzlerd committed
209
			</ul> <strong>Note</strong>: changes to values of menu options  only become visible after {clear_drupal_cache}</li>
210
211
212
213
214
215
		<li id="report-caching"><strong>Cache</strong> - Click on the cache link to expand it so that some additional options
			related to it become visible. These additional options can be used to enable some options related to the caching of the
			report, which is a technique to reduce the resources required for rendering the report, in situations such as:
			<ul>
				<li>reports containing data that don't change a lot (e.g. you know that the nature of the report's data only change on
					a daily basis).</li>
metzlerd's avatar
metzlerd committed
216
217
218
				<li>reports that are about some pretty hefty analysis,( e.g. queries that give sums/aggregate for
					large numbers of rows). </li>
			</ul> Available caching options are:
219
			<ul>
metzlerd's avatar
metzlerd committed
220
				<li><strong>Duration</strong> - The duration that a cached report remains in the cache. Use <a href="http://php.net/manual/en/datetime.formats.relative.php"
221
222
223
224
225
226
					target="_blank"> relative formats</a> according to the php documentation.</li>
				<li><strong>Per User </strong> - Indicate if you want the cache to be by user.</li>
				<li><strong>Per Document Type</strong> - Indicate if you want the cache to be by Document Type.</li>
			</ul></li>
	</ul>
	<p>
metzlerd's avatar
metzlerd committed
227
228
		Use the <strong>Update</strong> button to update changes to the report and return to the preview screen.  Your changes will not 
		be saved until the <strong>Save</strong> button is selected.</p>
229
	<h2 id="doctypes">Document Types</h2>
metzlerd's avatar
metzlerd committed
230
231
232
	<p>The output of any report is normally an HTML document.  It can  optionally be exported in several common document formats.</p>
	<p>The exact list of document types avalable your report is determined by your site
		administrator and may include:</p>
233
234
235
236
237
238
239
240
241
242
243
	<table>
		<tr>
			<th>csv</th>
			<td>Comma Separated Values.</td>
		</tr>
		<tr>
			<th>email</th>
			<td>eMail message.</td>
		</tr>
		<tr>
			<th>html</th>
metzlerd's avatar
metzlerd committed
244
245
246
247
248
			<td>HyperText Markup Language without the drupal theme.</td>
		</tr>
		<tr>
		    <th>PDF</th>
		    <td>Adobe Portable Document Format</td>
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
		</tr>
		<tr>
			<th>svg</th>
			<td>Scalable Vector Graphics.</td>
		</tr>
		<tr>
			<th>doc</th>
			<td>MS Word format.</td>
		</tr>
		<tr>
			<th>xls</th>
			<td>MS Excel format.</td>
		</tr>
		<tr>
			<th>xml</th>
			<td>eXtensible Markup Language.</td>
		</tr>
	</table>
	<p>
		Using the <strong>Document Types</strong> tab on the report editing screen, you can check one or more of the
metzlerd's avatar
metzlerd committed
269
270
		available options to add a corresponding link to your report. If you're not yet on the report editing screen, you can access
		it by clicking on the tiny edit icon shown when viewing the report. 
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
	</p>
	<h2 id="layout">Layout</h2>
	 <p>
    Using the <strong>layout</strong> tab on the report editing screen, you can specify various layout options of the report (if
    you're not yet on the report editing screen, you can access it by clicking on the tiny edit icon shown when viewing the
    report).
  </p>
  <p>Explanation of the available options on this form are as follows:
  </p>
  <table>
    <tbody>
      <tr>
        <th>Skin</th>
        <td><p>The skin of a report determines the look and feel of the report and allows you to leverage a common set of CSS and
          JavaScript libraries to make the most out of your reports. In conventional report writers this can be thought of as what
          kind of paper form the report printed on. These days most layout is controlled by Cascading Style Sheets (CSS) and
          JavaScript libraries.</p>
          <p> A site administrator may enable additional report skins by creating corresponding .skinfo
          files. These .skinfo files define which specific CSS files and JavaScript files will get included when that skin is
          selected in a report. </p>
          <p>
metzlerd's avatar
metzlerd committed
292
          See the Skins Guide for more information on definiing custom skins.</p>  
293
294
295
296
297
298
299
        </td>
      </tr>
      <tr>
        <th>Body</th>
        <td>
           Here you can edit directly the contents of the report.  This can be used when you need more customization than can be provided using 
           the custom templates provided by forena.  For more information how to specify a proper body section and the use of the special frx attributes 
metzlerd's avatar
metzlerd committed
300
           in the html, see the FRX Reporting guide. 
301
302
303
304
305
306
307
308
309
310
311
312
313
        </td>
      </tr>
      <tr>
        <th>CSS Styles</th>
        <td><p>Specify small CSS snippets that can be used anywhere in the report, as in this example:</p>
            <style frx:renderer="FrxSource">div.FrxTable { line-height: 2.5; color: #FF6633; }</style>
          <p>This will change the look-and-feel of the table content a little bit. In this specific case the height of the
          table rows will be higher then the height for standard table displays, while the color of the text in the table cells is
          shown in a kind of orange.</p>
        </td>
      </tr>
    </tbody>
  </table>
metzlerd's avatar
metzlerd committed
314

315
316
317
  <h2 id="parameters">Parameters</h2>
    <p>
    Parameters can be used to provided inputs to a report. Using the <strong>Parameters</strong> tab on the report editing screen,
metzlerd's avatar
metzlerd committed
318
    you can enter new report parameters, and/or edit or delete existing parameters.
319
320
321
  </p>
  <p>
    To add a new parameter, click on the General tab, and then click on the link that says <strong>Add Parameter</strong>. After
metzlerd's avatar
metzlerd committed
322
    doing so, you will be taken to the <strong>Parameters</strong> screen. Available options are: 
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
  </p>
  <table >
    <tbody>
      <tr>
        <th>label</th>
        <td>The label displayed to the user when prompted in the parameters form.</td>
      </tr>
      <tr>
        <th>id</th>
        <td>The unique id for the report parameter. Generally these must match exactly the parameters expected by the data values.</td>
      </tr>
    </tbody>
  </table>
  <p>
    Enter an appropriate value for each of these fields, and confirm them by pressing the <strong>Add</strong> button, which will
metzlerd's avatar
metzlerd committed
338
    take you to the next Edit screen.
339
340
  </p>
  <p>
metzlerd's avatar
metzlerd committed
341
342
    On the <strong>Parameters</strong> screen, click the tiny gear icon next labeled 'Configure
    Parameter'. This will allow you to further specify the following: 
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
    </p>
  <table>
    <tbody>
      <tr>
        <th>label</th>
        <td>The label displayed to the user when prompted in the parameters form.</td>
      </tr>
      <tr>
        <th>require</th>
        <td>Indicate of a value for this parameter is required to display the report. If there is not a default value, the user will be prompted to enter a value.</td>
      </tr>
      <tr>
        <th>default value</th>
        <td>Value to be used when none is specified.</td>
      </tr>
      <tr>
        <th>description</th>
        <td>Tell the users about what the parameter is used for as well as proper formats for entry.</td>
      </tr>
      <tr>
        <th>Input Control Type</th>
        <td>Indicates the type of control or widget used prompt for user input.</td>
      </tr>
      <tr>
        <th>Data Source</th>
        <td>Used in conjunction with the control field to determine which values will be made available to radio buttons, check-boxes or select lists. The value should be a <strong>data block</strong> that users of this report will have access to. Blocks should be written to return key value pairs for use in these controls. <strong>Note</strong>: this is indeed assumed to be a data <strong>block</strong>, and not a data <strong>source</strong>, even though the label here suggests so ...).</td>
      </tr>
metzlerd's avatar
metzlerd committed
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
			<tr>
				<th>Data Field</th>
				<td>The name of the column from the data block specified in <strong>Data Source</strong> that is used to populate the
					return <strong>values</strong> of the select or radio buttons. If omitted,
					then the 1st column of the data block is used as the Data Field.
				</td>
			</tr>
			<tr>
				<th>Label Field</th>
				<td>The name of the column from the data block specified in <strong>Data Source</strong> that is used to populate the <strong>labels</strong>
					of select or radio buttons. If omitted, then the 2nd column of the data block is used as the Label Field, provided such 2nd
					column exists (if not, then the 1st column is used instead).
				</td>
			</tr>
			<tr>
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
        <th>Options</th>
        <td>Used to configure the Input Control Type.</td>
      </tr>
      <tr>
        <th>Class</th>
        <td>Specify the html class to be applied to this parameter.</td>
      </tr>
    </tbody>
  </table>
  <h2 id="fields">Fields</h2>
  <p>Fields in the report are the tokens which are used to substitute data into the report. These report fields are found
    between the curly braces, and exists in multiple flavors:</p>

  <ul>
    <li>The data fields as contained in the report's data blocks (e.g. corresponding to various columns returned by the SQL
      query related to the data block).</li>
    <li>The fields defined on the spot while editing the report, and this by just typing the variable name (= token) of the
      field, surrounded by curly braces, anywhere within the body part of the report (via the layout tab).</li>
    <li>The fields corresponding to the arbitrary variables defined in a report skin file.</li>
  </ul>
  <p>
metzlerd's avatar
metzlerd committed
406
    Select on the gear symbol next to the first use of the particular report field to configure the following properties:</p>
407
408
409
410
411
412
413
414
415
416
417
  <ul>
    <li>The formatting of the field's output.</li>
    <li>The field's links to be created.</li>
    <li>The field's default value to be displayed if no value is present.</li>
  </ul>
  <p>
  The options available to configure these properties are further detailed below.
  </p>
  <h3>Field output formatting</h3>
  <p>
    Fields can be formatted a number of different ways depending on the format and format-string specified for each field. The
metzlerd's avatar
metzlerd committed
418
    following table illustrates the supported options:
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
  </p>
  <table>
    <tbody>
      <tr>
        <th>Format</th>
        <th>Description</th>
        <th>Format String</th>
      </tr>
      <tr>
        <td>drupal_date_format</td>
        <td>Formats a Drupal date. Drupal dates are natively large numbers that are expressed as the number of seconds since
          the UNIX epoch date.</td>
        <td>Use <strong>small</strong>, <strong>medium</strong> or <strong>large</strong> to specify any of the site defined
          dates, or alternatively specify a custom date format. See <a href="http://php.net/manual/en/function.date.php"
          target="_blank">http://php.net/manual/en/function.date.php</a> for possibilities for custom formatting.
        </td>
      </tr>
      <tr>
        <td>drupal_node_content</td>
        <td>Loads content from the given nid and display it using teaser or full display.</td>
        <td>Specify <strong>teaser</strong> to get teaser view.
        </td>
      </tr>
      <tr>
        <td>drupal_translation</td>
        <td>Use Drupal's translation API to translate the value prior to display.</td>
metzlerd's avatar
metzlerd committed
445
        <td>Specify a field containing the serialized data used for translations (e.g. watchdog table). Normally
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
          you can leave this blank.</td>
      </tr>
      <tr>
        <td>iso_date</td>
        <td>ISO standard dates are of the form, YYYY-MM-DD followed by a 24 hour timestamp (e.g. 2012-12-01 20:30:30). Dates in
          this format may be reformatted.</td>
        <td>Use <strong>small</strong>, <strong>medium</strong> or <strong>large</strong> to specify any of the site defined
          date formats, or alternatively specify a custom date format. See <a href="http://php.net/manual/en/function.date.php"
          target="_blank">http://php.net/manual/en/function.date.php</a> for possibilities for custom formatting.
        </td>
      </tr>
      <tr>
        <td>number</td>
        <td>Use the PHP number formatter function.</td>
        <td>Indicate a sample numeric format for decimal places and thousands separator. (eg. 9.999.00).</td>
      </tr>
      <tr>
        <td>sprintf</td>
        <td>Use PHP's sprintf function for adding labels and such.</td>
        <td>See <a href="http://us.php.net/manual/en/function.sprintf.php" target="_blank">http://us.php.net/manual/en/function.sprintf.php</a>
          for possibilities.
        </td>
      </tr>
metzlerd's avatar
metzlerd committed
469
470
471
472
473
      <tr>
        <td>template</td>
        <td>The field is epxected to contain a template containing further tokens for expansion.  This is useful for form letter data that
          may be stored in the database.</td>
      </tr>
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
    </tbody>
  </table>
  <h3>Field linking</h3>
  <p>Fields can be transformed into hyperlinks also. The following table illustrates the supported options:
  </p>
  <table>
    <tr>
      <th>Link</th>
      <td>Specify a site relative URL. When specified, all references to this field in the report will be displayed as a links
        to the URL specified.</td>
    </tr>
    <tr>
      <th>Pass through URL parameters</th>
      <td>Automatically pass through URL parameters on this link.</td>
    </tr>
    <tr>
      <th>rel</th>
      <td>Relationship attribute to apply to the link.</td>
    </tr>
    <tr>
      <th>class</th>
      <td>CSS class applied to be applied to the link.</td>
    </tr>
    <tr>
      <th>Target</th>
      <td>Specify a target of the page you want the window to open in. BLANK can be used to always open a page in a new
metzlerd's avatar
metzlerd committed
500
        window. If you specify a target beginning with the word "popup", Forena will automatically open up the window in a
501
502
503
504
505
506
507
508
509
510
511
512
513
        popup.</td>
    </tr>
  </table>
  <h3>Field default value</h3>
  <table>
    <tr>
      <th>Default Value</th>
      <td>The value to use when no value is present in the data.</td>
    </tr>
  </table>
  
</body>
</html>