HTML Report

Can be created by copying an HTML content to the Report Folder . If a custom rule, image name, icon is to be defined, a jSettings file should be placed next to it.

You can use MacrosLocalization Methods and custom server tags (Control) in HTML.

You need to know the type of object passed to the report content and edit the report accordingly. In the reports you create with GEODI Pro, the macro data object is GeodiEntry Array. The object for Mobidi Server Reports is the MobidiEntry Array.

Server tag (Control) usage

You can use dcc: [Control] tag definitions in HTML content. These HTML elements are rendered on the server, allowing you to deliver the content you want to the client in any format. Click here for all the special tags you can use.

Use dcc: Repeater to access each item in the Array. Repeater allows you to browse the given data collection. If the data value is not given, it tries to browse the active data. The data in the repeater changes to the array element to be navigated. You can use the context of the parent to reach the object outside the repeater. As the repeater "data" feature only works with the macro it does not expect any = or [= elements.

MyReport.html
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Your Documents</title>
	</head>
	<body>
		<ul>
			<dcc:repeater>       
	     		<li>[=d.OutputGeodiContent.DisplayName]</li>
			</dcc:repeater>
		</ul>
	</body>
</html>

If no data is found in the Repeater tag using panel objects known by Repeater, special messages can be given.


MyReport.html
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Your documents</title>
	</head>
	<body>
		<dcc:repeater>       
			<dcc:panel name="empty">        
    	    	No content found.
		   </dcc:panel>     
			<dcc:panel name="header">        
    	    	<ul>
		   </dcc:panel>       
		   <dcc:panel name="body">        
				<li>[=d.OutputGeodiContent.DisplayName]</li>   
		   </dcc:panel>       
		   <dcc:panel name="footer">       
				 </ul>
	    	</dcc:panel>      
		</dcc:repeater>
	</body>
</html>

Use of nested control


MyReport.html
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Your documents</title>
	</head>
	<body>
			<ul>
			<dcc:repeater>       
	     		<li>
					[=d.OutputGeodiContent.DisplayName] <br>
					Similar Documents
					<ul>
						<dcc:repeater data='d.WS.Query.QueryForDocuments(d.WS.ToQuery("similar:(docid:"+(d.OutputGeodiContent.SystemContentID)+")"))'>       
							[=d.OutputGeodiContent.DisplayName] 
						</dcc:repeater>	
					</ul>
				</li>
			</dcc:repeater>
	</body>
</html>

Control visible condition

All dcc elements have a macro visible "visible" feature. With this feature help, you can define rules in the representation. Unlike you are processing rules on Javascript, elements that do not follow this rule are not passed to the client. Possible deficits are avoided.

MyReport.html
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Your Documents</title>
	</head>
	<body>
		<ul>
			<dcc:repeater>       
	     		<li>[=d.OutputGeodiContent.DisplayName]</li>
				<dcc:panel visible='=c["geodi"].WsHasPermission("GEODI.WS.EDIT") && !string.IsNullOrEmpty(d.OutputGeodiContent.ScanError)'>
					<div>
						You can edit this project. This content has a crawl error : [=d.OutputGeodiContent.ScanError]
					</div>
				</dcc:panel>
				
			</dcc:repeater>
		</ul>
	</body>
</html>

Editing report return type

You can change the return type with the jSettings file. In this way, you can serve with the Report link or you can create and download content in different formats. You can download a txt or xmld file instead of HTML.

With this example, the Report will be in  RSS format. By sharing the link of the report, RSS Service can be offered.

MyRSSReport.jSettings
{
    ID:"MyRSS",
	DisplayName:"[$.en:My RSS Report;tr:Benim RSS Raporum]",
	 IconName:"Layer/newspaper",
    __type: "Factory.ActionFactory:HTMLReporter",
	ActionTargets:"*",
	ConditionMacro:'c.HasPermission("DECE.SYSTEMMANAGER")',
	ForcedExtension:"xml"
	
}
MyRSSReport.html
<rss version="2.0">
	<channel>
		<title>GEODI</title>
		<link>[=c.ResolveUrl("~/")]</link>
		<dcc:repeater>       
		<item>
	    	<title>[=HttpUtility.HtmlEncode(d.OutputGeodiContent.DisplayName)]</title>
		    <link>[=c["geodi.link"\].ViewerLink(d)]</link>
    		<description>[=HttpUtility.HtmlEncode(d.EntryBackRef.OutputSummary)]</description>
		</item>
		</dcc:repeater>
	</channel>
</rss>