• REPORT (.rep) openKM

  • Nous essayons de faire OpenKM aussi intuitif que possible, mais tout avis est bienvenu.
Nous essayons de faire OpenKM aussi intuitif que possible, mais tout avis est bienvenu.

Moderator: dedisoft

Forum rules: Avant de poser une question, merci de regarder la documentation du wiki ou d'utiliser la fonction recherche du forum. Et rappelez vous que nous n'avons ni boule de cristal ni possibilité de lire dans les pensées, aussi pensez à spécifier quelle version d'OpenKM vous utilisez ainsi que la version du navigateur web et du système d'exploitation. Pour de plus amples informations lisez Comment reporter un bug efficacement (anglais).
 #43037  by jimac
 
Good Day!

Can I know how to make a report wherein it contain the inputted metadata of the documents as well as who created the document?

PLEASE SEE THE ATTACHED PICTURE TO SEE WHAT Im talking about


Thanks!
Attachments
meta.png
meta.png (19.59 KiB) Viewed 22133 times
 #43052  by jllort
 
You must do an sql query for it based on this tables:
OKM_NODE_BASE -> WHERE NBS_UUID is the object uuid ( from here can get the document name )
OKM_NODE_PROPERTY -> NPG_NODE value is NBS_UUID

Note: Into OKM_NODE_DOCUMENT have specific document data ( common document data is at OKM_NODE_BASE table )
 #43057  by jimac
 
jllort wrote:You must do an sql query for it based on this tables:
OKM_NODE_BASE -> WHERE NBS_UUID is the object uuid ( from here can get the document name )
OKM_NODE_PROPERTY -> NPG_NODE value is NBS_UUID

Note: Into OKM_NODE_DOCUMENT have specific document data ( common document data is at OKM_NODE_BASE table )
Hello Jllort,

I don't know how to make sql query, can you send me the sql query of it?
 #43058  by jimac
 
jimac wrote:
jllort wrote:You must do an sql query for it based on this tables:
OKM_NODE_BASE -> WHERE NBS_UUID is the object uuid ( from here can get the document name )
OKM_NODE_PROPERTY -> NPG_NODE value is NBS_UUID

Note: Into OKM_NODE_DOCUMENT have specific document data ( common document data is at OKM_NODE_BASE table )
Hello Jllort,

I don't know how to make sql query, can you send me the sql query of it (code) quote]

Thank You!

Btw, I have installed ireport. So in making a report, I will first open the sqlreportpattern.jrxl in ireport then
when you have given me the sql query , I will then put it in the database query right? then put it also in report query.. then thats it right?
 #43060  by jllort
 
Is correct, you must replace existing query by your own.
Take here an approach of the query;
Code: Select all
SELECT NBS_NAME, (SELECT  NPG_VALUE FROM OKM_NODE_PROPERTY WHERE NPG_GROUP='okg:consulting' AND NPG_NAME='okp:consulting.comment' AND NPG_NODE=NBS_UUID) AS COMMENT FROM OKM_NODE_BASE WHERE NBS_UUID IN (SELECT DISTINCT(NPG_NODE) from OKM_NODE_PROPERTY WHERE NPG_GROUP='okg:consulting')
 #43061  by jimac
 
jllort wrote:Is correct, you must replace existing query by your own.
Take here an approach of the query;
Code: Select all
SELECT NBS_NAME, (SELECT  NPG_VALUE FROM OKM_NODE_PROPERTY WHERE NPG_GROUP='okg:consulting' AND NPG_NAME='okp:consulting.comment' AND NPG_NODE=NBS_UUID) AS COMMENT FROM OKM_NODE_BASE WHERE NBS_UUID IN (SELECT DISTINCT(NPG_NODE) from OKM_NODE_PROPERTY WHERE NPG_GROUP='okg:consulting')

Hello Jllort,

Can I know how to also include the username in the sql query that you have given me, as well as the date when the document is created??

I would also like to know how to display all the metadata of a document, since in my case, every document uploaded have a specific property group. The one that you gave me only displays a single data of a document.



I am also studying how to do it. But I really need your help.

Thank you very much Jllort!

THIS is my PROPERTY GROUPS:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.0//EN"
                                 "http://www.openkm.com/dtd/property-groups-2.0.dtd">
<property-groups>
     <property-group label="Sales Order" name="okg:sales">
    	 <input label="S.O No. :" type="text" name="okp:sales.so" width="150px"/>
    	 <input label="Company :" type="text" name="okp:sales.company" width="150px"/>
          <select label="Type :" name="okp:sales.type" type="simple">
      <option label="Hardware" value="Hardware"/>
      <option label="Software" value="Software"/>
    </select>
    	 <input label="Date" type="date" name="okp:sales.date" />
     	 <input label="Date of P.O" type="date" name="okp:sales.datepo" />
    </property-group>
     <property-group label="Purchase Order" name="okg:po">
    	 <input label="P.O No. :" type="text" name="okp:po.ponum"/>
    	 <input label="Date" type="date" name="okp:po.date" />
     	 <input label="To :" type="text" name="okp:po.to"/>
         <input label="Attention :" type="text" name="okp:po.attn"/>
         <input label="Terms :" type="text" name="okp:po.terms"/>
    </property-group>
    <property-group label="Delivery Receipt" name="okg:dr">
    	 <input label="D.R No. :" type="text" name="okp:dr.drno"/>
         <input label="S.O No. :" type="text" name="okp:dr.sonum"/>
    	 <input label="Date" type="date" name="okp:dr.date" />
         <input label="Account Manager :" type="text" name="okp:dr.am"/>
         <input label="Reference :" type="text" name="okp:dr.reference"/>
         <textarea label="Notes" name="okp:dr.notes" height="250px" width="300px" /> 
    </property-group>
    
        <property-group label="Sales Invoice" name="okg:si">
    	 <input label="S.I No. :" type="text" name="okp:si.sino"/>
          <input label="S.O No.. :" type="text" name="okp:si.sono"/>
         <input label="Tin No. :" type="text" name="okp:si.tin"/>
    	 <input label="Date" type="date" name="okp:si.date" />
         <input label="Salesperson :" type="text" name="okp:si.salesperson"/>
    </property-group>
       <property-group label="Check Voucher" name="okg:cv">
    	 <input label="C.V No. :" type="text" name="okp:cv.cvno"/>
         <input label="Payee :" type="text" name="okp:cv.payee"/>
         <input label="Date" type="date" name="okp:cv.date" />
    </property-group>
     <property-group label="Collection Receipt" name="okg:cr">
    	 <input label="Collection Receipt No. :" type="text" name="okp:cr.crno"/>
         <input label="Date" type="date" name="okp:cr.date" />
    </property-group>
    <property-group label="Official Receipt" name="okg:or">
    	 <input label="O.R No. :" type="text" name="okp:or.orno"/>
         <input label="Date" type="date" name="okp:or.date" />
         <input label="Received From :" type="text" name="okp:or.rf"/>
    </property-group>
    
 #43066  by jimac
 
Update:


Hello Jllort,
:D :lol:

I tried creating a report.
It seems like it can't display multiple property groups.
I first created a report for my okg:si .

When I saved my file, I uploaded the .jrxml in openKM but there is an error.

THIS IS THE ERROR:
Class: java.lang.IllegalArgumentException
Message: protocol = http host = null
Date: Mon Jan 23 17:13:12 CST 2017



also, how to create parameters just like the in the available reports in openKM, wherein there is a from and to date
??

Thank you very much!!! :)


This is my sql query:
Code: Select all
SELECT NBS_NAME,NBS_AUTHOR,(SELECT  NPG_VALUE FROM OKM_NODE_PROPERTY WHERE NPG_GROUP='okg:si' AND NPG_NAME='okp:si.tin' AND NPG_NODE=NBS_UUID) AS TIN,(SELECT  NPG_VALUE FROM OKM_NODE_PROPERTY WHERE NPG_GROUP='okg:si' AND NPG_NAME='okp:si.salesperson' AND NPG_NODE=NBS_UUID) AS SALESPERSON,(SELECT  NPG_VALUE FROM OKM_NODE_PROPERTY WHERE NPG_GROUP='okg:si' AND NPG_NAME='okp:si.date' AND NPG_NODE=NBS_UUID) AS DATE, (SELECT  NPG_VALUE FROM OKM_NODE_PROPERTY WHERE NPG_GROUP='okg:si' AND NPG_NAME='okp:si.sino' AND NPG_NODE=NBS_UUID) AS SI_NUMBER FROM OKM_NODE_BASE WHERE NBS_UUID IN (SELECT DISTINCT(NPG_NODE) from OKM_NODE_PROPERTY WHERE NPG_GROUP='okg:si')
Attachments
This is the report I created
This is the report I created
report_sample.png (49.16 KiB) Viewed 22092 times
Last edited by jimac on Tue Jan 24, 2017 3:04 am, edited 1 time in total.
 #43071  by jimac
 
UPDATE:
Log :
Code: Select all
2017-01-24 15:52:36,538 [http-bio-0.0.0.0-8080-exec-10] INFO  com.openkm.util.FormUtils$LocalResolver- resolveEntity(publicId=-//OpenKM//DTD Report Parameters 2.1//EN, systemId=http://www.openkm.com/dtd/report-parameters-2.1.dtd) => NULL
2017-01-24 15:52:37,783 [http-bio-0.0.0.0-8080-exec-10] ERROR com.openkm.servlet.admin.ReportServlet- protocol = http host = null
java.lang.IllegalArgumentException: protocol = http host = null
	at sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java:176)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1132)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
	at java.net.URL.openStream(URL.java:1045)
	at net.sf.jasperreports.engine.util.JRLoader.loadBytes(JRLoader.java:331)
	at net.sf.jasperreports.engine.util.JRLoader.loadBytesFromLocation(JRLoader.java:462)
	at net.sf.jasperreports.engine.JRImageRenderer.getInstance(JRImageRenderer.java:217)
	at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:1057)
	at net.sf.jasperreports.engine.fill.JRFillImage.evaluate(JRFillImage.java:1004)
	at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258)
	at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499)
	at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:326)
	at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:262)
	at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
	at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946)
	at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845)
	at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)
	at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)
	at com.openkm.util.ReportUtils.generateReport(ReportUtils.java:201)
	at com.openkm.util.ReportUtils$1.execute(ReportUtils.java:388)
	at org.hibernate.impl.SessionImpl.doWork(SessionImpl.java:1997)
	at com.openkm.util.ReportUtils.executeDatabase(ReportUtils.java:384)
	at com.openkm.util.ReportUtils.execute(ReportUtils.java:363)
	at com.openkm.servlet.admin.ReportServlet.execute(ReportServlet.java:276)
	at com.openkm.servlet.admin.ReportServlet.doGet(ReportServlet.java:113)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
2017-01-24 16:00:00,177 [Thread-105] INFO  com.openkm.core.UserMailImporter- *** User mail importer activated ***
2017-01-24 16:00:21,723 [Thread-105] ERROR com.openkm.util.MailUtils- Couldn't connect to host, port: smtp.gmail.com, 143; timeout -1
com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.gmail.com, 143; timeout -1;
  nested exception is:
	java.net.ConnectException: Connection timed out: connect
	at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:724)
	at javax.mail.Service.connect(Service.java:364)
	at javax.mail.Service.connect(Service.java:245)
	at com.openkm.util.MailUtils.importMessages(MailUtils.java:581)
	at com.openkm.core.UserMailImporter.runAs(UserMailImporter.java:95)
	at com.openkm.core.UserMailImporter.run(UserMailImporter.java:66)
	at sun.reflect.GeneratedMethodAccessor278.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at bsh.Reflect.invokeMethod(Reflect.java:166)
	at bsh.Reflect.invokeObjectMethod(Reflect.java:99)
	at bsh.BSHPrimarySuffix.doName(BSHPrimarySuffix.java:176)
	at bsh.BSHPrimarySuffix.doSuffix(BSHPrimarySuffix.java:120)
	at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:80)
	at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
	at bsh.Interpreter.eval(Interpreter.java:664)
	at bsh.Interpreter.eval(Interpreter.java:758)
	at bsh.Interpreter.eval(Interpreter.java:747)
	at com.openkm.util.ExecutionUtils.runScript(ExecutionUtils.java:112)
	at com.openkm.core.Cron$RunnerBsh.run(Cron.java:103)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection timed out: connect
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at java.net.Socket.connect(Socket.java:538)
	at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:312)
	at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:236)
	at com.sun.mail.iap.Protocol.<init>(Protocol.java:117)
	at com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:121)
	at com.sun.mail.imap.IMAPStore.newIMAPProtocol(IMAPStore.java:746)
	at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:689)
	... 20 more
2017-01-24 16:09:39,774 [http-bio-0.0.0.0-8080-exec-10] INFO  com.openkm.util.FormUtils$LocalResolver- resolveEntity(publicId=-//OpenKM//DTD Property Groups 2.0//EN, systemId=http://www.openkm.com/dtd/property-groups-2.0.dtd) => C:\openkm-6.3.1-community\tomcat\webapps\OpenKM\WEB-INF\classes\dtd\property-groups-2.0.dtd
2017-01-24 16:10:05,870 [http-bio-0.0.0.0-8080-exec-4] INFO  com.openkm.util.FormUtils$LocalResolver- resolveEntity(publicId=-//OpenKM//DTD Report Parameters 2.1//EN, systemId=http://www.openkm.com/dtd/report-parameters-2.1.dtd) => NULL
2017-01-24 16:10:10,905 [http-bio-0.0.0.0-8080-exec-10] INFO  com.openkm.util.FormUtils$LocalResolver- resolveEntity(publicId=-//OpenKM//DTD Report Parameters 2.1//EN, systemId=http://www.openkm.com/dtd/report-parameters-2.1.dtd) => NULL
2017-01-24 16:10:11,668 [http-bio-0.0.0.0-8080-exec-10] ERROR com.openkm.servlet.admin.ReportServlet- protocol = http host = null
java.lang.IllegalArgumentException: protocol = http host = null
	at sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java:176)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1132)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
	at java.net.URL.openStream(URL.java:1045)
	at net.sf.jasperreports.engine.util.JRLoader.loadBytes(JRLoader.java:331)
	at net.sf.jasperreports.engine.util.JRLoader.loadBytesFromLocation(JRLoader.java:462)
	at net.sf.jasperreports.engine.JRImageRenderer.getInstance(JRImageRenderer.java:217)
	at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:1057)
	at net.sf.jasperreports.engine.fill.JRFillImage.evaluate(JRFillImage.java:1004)
	at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258)
	at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499)
	at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:326)
	at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:262)
	at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
	at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946)
	at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845)
	at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)
	at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)
	at com.openkm.util.ReportUtils.generateReport(ReportUtils.java:201)
	at com.openkm.util.ReportUtils$1.execute(ReportUtils.java:388)
	at org.hibernate.impl.SessionImpl.doWork(SessionImpl.java:1997)
	at com.openkm.util.ReportUtils.executeDatabase(ReportUtils.java:384)
	at com.openkm.util.ReportUtils.execute(ReportUtils.java:363)
	at com.openkm.servlet.admin.ReportServlet.execute(ReportServlet.java:276)
	at com.openkm.servlet.admin.ReportServlet.doGet(ReportServlet.java:113)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

params.xml:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE report-parameters PUBLIC "-//OpenKM//DTD Report Parameters 2.0//EN"
                                   "http://www.openkm.com/dtd/report-parameters-2.0.dtd">
<report-parameters>
	<input label="From" name="from_date" type="date">
		<validator type="req"/>
	</input>
	<input label="To" name="to_date" type="date">
		<validator type="req"/>
	</input>
</report-parameters>

Please see the attached files.


Can you tell me what is wrong?
It tells :
Class: java.lang.IllegalArgumentException
Message: protocol = http host = null
Date: Tue Jan 24 11:21:56 CST 2017


Thanks!
Attachments
host.png
host.png (71.43 KiB) Viewed 22091 times
error report1.png
error report1.png (50.67 KiB) Viewed 22092 times
to.png
to.png (47.45 KiB) Viewed 22092 times
from.png
from.png (39.14 KiB) Viewed 22092 times
 #43090  by jllort
 
Before building the report, must concentrate first on getting the correct sql ( this is your problem ).

About host=null error, take a look at top right corner, there's an image, set there your application url for getting the image or remove it. Take in mind when the report is executed the engine resolve the image url, seems in your case is not able to resolve ( when report is executed from server, us we inject the variable host, when you execute from ireport tool, the application will show you and inport for setting it, anyway the url must point to a valid image ).
 #43094  by jimac
 
Okay, Thank you Jllort. :)
--


Property group:
Code: Select all
  
    <property-group label="CDI Request" name="okg:cdir">

    <input label="Return Slip No.:" type="text" name="okp:cdir.fn" >
        <validator type="req"/>
     </input>
         <input label="Store Name/No.#:" type="text" name="okp:cdir.stn"/>
         <input label="Requested Amount:" type="text" name="okp:cir.ram"/>
    </property-group>
    
    
     <property-group label="CDI Approval" name="okg:cdiap">
        <input label="Return Slip No.:" type="text" name="okp:cdir.ffn" >
        <validator type="req"/>
        </input>
        <input label="Store Name/No.#:" type="text" name="okp:cdir.stno"/>
        <input label="Approved Amount:" type="text" name="okp:cdir.pam"/>
       </property-group>   

I am creating a new report.
what is the sql query for this? (please see the attached picture)

Thank you for continuously helping me. :D
Attachments
Is this possible to do? Thanks
Is this possible to do? Thanks
711.png (20.94 KiB) Viewed 22061 times
 #43110  by jllort
 
- First select NBS_UUID from node base what have group okg:cdir
Code: Select all
SELECT NBS_UUID FROM OKM_NODE_BASE WHERE NBS_UUID IN (SELECT DISTINCT(NPG_NODE) from OKM_NODE_PROPERTY WHERE NPG_GROUP 'okg:cdir') and NBS_UUID IN (SELECT DISTINCT(NPG_NODE) from OKM_NODE_PROPERTY WHERE NPG_GROUP 'okg:cdiap')
- then from each one simply must do a subquery for getting each value
Code: Select all
(SELECT  NPG_VALUE FROM OKM_NODE_PROPERTY WHERE NPG_GROUP='okg:cir' AND NPG_NAME='okp:cdir.stno' AND NPG_NODE=NBS_UUID) AS TIN
It's exactly the same case of the previous SQL I have wrote before. Try understanding what is doing this query. You will not advance in anyway if I wrote for you.

Also you might be interested on creating database views for it ( https://dev.mysql.com/doc/refman/5.7/en ... -view.html ).
 #43120  by jimac
 
jllort wrote:- First select NBS_UUID from node base what have group okg:cdir
Code: Select all
SELECT NBS_UUID FROM OKM_NODE_BASE WHERE NBS_UUID IN (SELECT DISTINCT(NPG_NODE) from OKM_NODE_PROPERTY WHERE NPG_GROUP 'okg:cdir') and NBS_UUID IN (SELECT DISTINCT(NPG_NODE) from OKM_NODE_PROPERTY WHERE NPG_GROUP 'okg:cdiap')
- then from each one simply must do a subquery for getting each value
Code: Select all
(SELECT  NPG_VALUE FROM OKM_NODE_PROPERTY WHERE NPG_GROUP='okg:cir' AND NPG_NAME='okp:cdir.stno' AND NPG_NODE=NBS_UUID) AS TIN
It's exactly the same case of the previous SQL I have wrote before. Try understanding what is doing this query. You will not advance in anyway if I wrote for you.

Also you might be interested on creating database views for it ( https://dev.mysql.com/doc/refman/5.7/en ... -view.html ).
--
Hello Jllort,

I guess what I want can't be done since the two document have different node id.
BTW, Thank you for helping me.

Uhm, Can I know why are the imports not recognized? Please see the attached picture.
I also tried the script of JavaReportPattern but then, the imports are not also recognized in the scripting tab in openKM.
Why is it like that?


Thanks
Attachments
sc.png
sc.png (77.56 KiB) Viewed 22033 times
 #43129  by jllort
 
Please do not merge distinct questions in the same topic, please an a single topic for each question ( otherwise it creates a lot of confusion to other readers )
 #43137  by jimac
 
jllort wrote:Please do not merge distinct questions in the same topic, please an a single topic for each question ( otherwise it creates a lot of confusion to other readers )
Okay. Sorry
 #43159  by jimac
 
jllort wrote:Please do not merge distinct questions in the same topic, please an a single topic for each question ( otherwise it creates a lot of confusion to other readers )
Hello Jllort,

This is my sql query:
Code: Select all
SELECT NBS_NAME,NBS_CREATED,(SELECT  NPG_VALUE FROM OKM_NODE_PROPERTY WHERE NPG_GROUP='okg:cdir' AND NPG_NAME='okp:cdir.fn' AND NPG_NODE=NBS_UUID) AS RET_SLIP_NO,(SELECT  NPG_VALUE FROM OKM_NODE_PROPERTY WHERE NPG_GROUP='okg:cdir' AND NPG_NAME='okp:cdir.stn' AND NPG_NODE=NBS_UUID) AS STORE_NAME_NO,(SELECT  NPG_VALUE FROM OKM_NODE_PROPERTY WHERE NPG_GROUP='okg:cdir' AND NPG_NAME='okp:cir.ram' AND NPG_NODE=NBS_UUID) AS S_REQ_AMT,(SELECT  NPG_VALUE FROM OKM_NODE_PROPERTY WHERE NPG_GROUP='okg:cdir' AND NPG_NAME='okp:cdir.date_req' AND NPG_NODE=NBS_UUID) AS date_req FROM OKM_NODE_BASE WHERE NBS_UUID IN (SELECT DISTINCT(NPG_NODE) from OKM_NODE_PROPERTY WHERE NPG_GROUP='okg:cdir'  AND NBS_CREATED BETWEEN $P{from_date} AND $P{to_date})
When I generate the report, the documents in the trash is also generated in the report.
How to fix it?

do i need to purge the trash always? is there no other way?

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.