Hi,
I'm trying to create a report to output the number of folders and files within some folder that exists in our OpenKM. I would like to allow the folder to be selected when the report is generated, but I can't get OpenKM to ask the name of the folder.
I've created the following params.xml file:
Could somebody point what I'm missing?
Tks,
Roberto
I'm trying to create a report to output the number of folders and files within some folder that exists in our OpenKM. I would like to allow the folder to be selected when the report is generated, but I can't get OpenKM to ask the name of the folder.
I've created the following params.xml file:
Code: Select all
OpenKM ask for the date, but the value field for folder does not appear and remains blank. I would like to use value of 'path' to feed the following query in the report:<?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="path" name="path" type="folder"/>
<input label="From" name="from_date" type="date">
<validator type="req"/>
</input>
</report-parameters>
Code: Select all
When I run the report, it returns blank. If I use some hardcoded path in the query instead of the variable, the report works fine, so I know that the rest of the code is sound.import com.openkm.dao.*;
import com.openkm.dao.bean.*;
import com.openkm.bean.*;
import com.openkm.util.*;
import com.openkm.api.*;
List al = new ArrayList();
ContentInfo ci = OKMFolder.getInstance().getContentInfo(null, "/okm:root/"+path);
Map usr = new HashMap();
usr.put("Folders", ci.getFolders());
usr.put("Documents", ci.getDocuments());
usr.put("Size", FormatUtil.formatSize(ci.getSize()));
al.add(usr);
return al;
Could somebody point what I'm missing?
Tks,
Roberto