Viewer Object in web-client with VelocityReport Plugin

Questions and answers on developing, deploying and using plugins and JavaBeans

Viewer Object in web-client with VelocityReport Plugin

Postby nisalaperera » Thu Jan 08, 2015 1:10 pm

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?

preview.png
pop-up in smart-client
preview.png (56.09 KiB) Viewed 2219 times


I have tried as follows.

Code: Select all
   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.
Code: Select all
plugins.VelocityReport.previewReport(template, context, viewerSaveCallback, 'PDF');


Please advice.
Regards
Nisala Perera
Returnpool Lanka Pvt Ltd.
nisalaperera
 
Posts: 16
Joined: Fri Sep 12, 2008 6:23 am

Re: Viewer Object in web-client with VelocityReport Plugin

Postby ptalbot » Thu Jan 08, 2015 3:27 pm

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.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 1 guest