Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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 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 context.Parent to reach the object outside the repater. As rhe repater "data" feature only works with the macro it does not expect any = or [= .

MyReport.html
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Dokümanlarınız</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>Dokümanlarınız</title>
	</head>
	<body>
		<dcc:repeater>       
			<dcc:panel name="empty">        
    	    	Hiç içerik bulunamadı.
		   </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>Dokümanlarınız</title>
	</head>
	<body>
			<ul>
			<dcc:repeater>       
	     		<li>
					[=d.OutputGeodiContent.DisplayName] <br>
					Benzeyen Dokümanlar
					<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 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>Dokümanlarınız</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>
						Bu projeyi düzenleyebilirsiniz. Bu içeriğe ait tarama hatası var : [=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>
  • No labels