# Viewer Object in web-client with VelocityReport Plugin

**URL:** <https://forum.servoy.com/t/viewer-object-in-web-client-with-velocityreport-plugin/18309>\
**Category:** Classic Servoy\
**Created:** [January 8, 2015, 11:10am UTC](https://forum.servoy.com/t/viewer-object-in-web-client-with-velocityreport-plugin/18309 "2015-01-08T11:10:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nisalaperera](https://avatars.discourse-cdn.com/v4/letter/n/90db22/32.png) [@nisalaperera](https://forum.servoy.com/u/nisalaperera)\
**Post date:** [January 8, 2015, 11:10am UTC](https://forum.servoy.com/t/viewer-object-in-web-client-with-velocityreport-plugin/18309/1 "2015-01-08T11:10:18Z")

</div>

I have used the VelocityReport Plugin with Servoy 7.4.

Can we get the viewer object (like pop-up in smart-client) in web-client?

[attachment=0]preview.png[/attachment]

I have tried as follows.

```auto
	var template = "quotation.html";
	var previewParams = {
		showToolBar: true,
		useSaveLocalPDF : true,
		usePrint : true,
		useFontZoom : false,
		useTogglePaginated: false,
		showStatus: false,
		openInPaginated : true,
		bounds : [-1, -1, 870, 600],
		verticalScrollbar : plugins.VelocityReport.PREVIEW.VSCROLLBAR_ASNEEDED
	}
	
	plugins.VelocityReport.setDefaultPreviewParameters(previewParams);
	var context = new Object();
	context.title = 'Testing';
	context.body_content = '<h1>TESTING</h1>';

	if(application.getApplicationType() == APPLICATION_TYPES.WEB_CLIENT) {
		plugins.VelocityReport.previewReport(template, context, viewerSaveCallback, 'HTML');
	}
	else {
		plugins.VelocityReport.previewReport(template, context, 'HTML');
	}

```

And I have tried with changing the webMode.

```auto
plugins.VelocityReport.previewReport(template, context, viewerSaveCallback, 'PDF');

```

Please advice.

 ![preview.png](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/2X/8/8f71e2079abcf2a73e37fee30e8259d639136e7f.png)

---

<div class="post-metadata">

**Author:** ![ptalbot](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/ptalbot/32/4952_2.png) [@ptalbot](https://forum.servoy.com/u/ptalbot)\
**Post date:** [January 8, 2015, 1:27pm UTC](https://forum.servoy.com/t/viewer-object-in-web-client-with-velocityreport-plugin/18309/2 "2015-01-08T13:27:09Z")

</div>

Basically no, because it’s a java window.  
So Velocity shows the preview as HTML in a browser window instead, or returns a PDF.  
Nothing prevents you to put the HTML from a report inside your own window and add buttons yourself though.
