My requirement is to export the report data from web viewer to xlsx format. But xlsx option is not coming at all in export dialog.
I'm using jetty web server and birt runtime 4.2.2.
Below is the relevant piece of code in /root/pr/lib/birt-runtime-4_2_2/birt/webcontent/birt/pages/dialog/ExportReportDialogFragment.jsp (which I modified to view xlsx option as per another article in StackOverflow.com).
<%
<%-- String[] supportedFormats = ParameterAccessor.supportedFormats; --%>
String[] supportedFormats = {"pdf","xls","xlsx"};
%>
<TABLE CELLSPACING="2" CELLPADDING="2" CLASS="birtviewer_dialog_body">
<TR HEIGHT="5px"><TD></TD></TR>
<TR>
<TD>
<label for="exportFormat"><%=BirtResources.getMessage( "birt.viewer.dialog.export.format" )%></label>
<SELECT ID="exportFormat" NAME="format" CLASS="birtviewer_exportreport_dialog_select">
<%
ParameterAccessor.sortSupportedFormatsByDisplayName(supportedFormats);
for ( int i = 0; i < supportedFormats.length; i++ )
{
%>
<OPTION VALUE="<%= supportedFormats[i] %>"><%= ParameterAccessor.getOutputFormatLabel( supportedFormats[i] ) %></OPTION>
<%
}
%>
</SELECT>
</TD>
</TR>
And in /root/pr/lib/birt-runtime-4_2_2/birt/WEB-INF/viewer.properties, I've added below 2 lines at proper place.
viewer.extension.xlsx=xlsx,
viewer.label.xlsx=XLSX
But still in web viewer the xlsx option is not coming.
Could you please help me to find any way out ?
Here, I've found a solution to my question.
Firstly, to integrate birt 4.4.2 with jetty and to replace to older version, we need to replace all old version birt jars from application's WEB-INF/lib directory with new version birt jars. It is better to take a backup of WEB-INF/lib directory before deleting all old version jars from lib directory and putting new jars instead.
Secondly, we need to put the new birt-runtime directory (e.g. birt-runtime-4_4_2) into application's "lib" directory (where the old birt-runtime directory should also reside) and refer these new jars from eclipse java build path and remove the old birt-runtime jar references. Make a minor change to compile the birt-chart newly and run to get the desired result. After this, rename or remove the old birt-runtime directory from application's "lib" directory, where both the old and new runtime directories are residing.
XLSX emitter has been included in BIRT 4.3, so even by changing JSP pages and .properties files it can't work with a 4.2.2 runtime.
An option would be to include the spudsoft emitter by your own in your existing birt install, but this is complicated, you would better upgrading to a recent version such BIRT 4.4.2.
Related
I use YARD to generate a doc for ruby project. This project includes a README.md file and looks like below:
# MyTool
<p align="center">
<img src="static/logo/mytool.png">
</p>
Welcome to your new gem!
...
## Copyright
Copyright (C) 2019 Company. See [License](LICENSE.txt) for further details.
The doc generated by YARD includes this readme file, but it has a litte problem. The paths to the files static/logo/mytool.png and LICENSE.txt are wrong. The generated index.html points to doc/static/logo/mytool.png and doc/LICENSE.txt, so the link is broken when I click on it.
I tried to move these files to doc folder, but YARD generates references like this doc/doc/static/logo/mytool.png. Note double doc in reference.
I'm newbe wih YARD and ruby. What is the best practice to handle this problem? Can YARD copy this files to doc folder?
Check out the --asset option, via yard help doc or here. Given your example above, this should do the trick:
yard doc --asset static --asset LICENSE.txt
We are looking into using MyBatis Generator to create our base entities classes and create the CRUD operations
We have created the generatorConfig.xml file and run the MyBatis Generator
In our target folder all classes were created as expected
Now we convert the project to use Gradle (Gradle STS) since this is the convention for all our other projects
once we do that and we re-run the MyBatis Generator we get the following error
"Cannot find source folder for project "
What are we doing wrong?
This is the config file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<context id="context1">
<jdbcConnection connectionURL="jdbc:sqlserver://<>.database.windows.net:1433;database=dbName;user=dbUser;password=password" driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver" password="...." userId="...." />
<javaModelGenerator targetPackage="javaModelGenerator" targetProject="myBatisArt\src" />
<sqlMapGenerator targetPackage="sqlMapGenerator" targetProject="myBatisArt\src" />
<javaClientGenerator targetPackage="javaClientGenerator" targetProject="myBatisArt\src" type="XMLMAPPER" />
<table catalog="myDB" tableName="Companies">
</table>
</context>
</generatorConfiguration>
I created the Java project "myBatisArt"
On first run , all files were created OK.
Then when hitting "Configure-->Convert to Gradle (STS) Project
(see image)
and running the generation process again i get the error
"Cannot find source folder for project"
Tried to alter the targetProject property to myBatisArt\src\main\java as suggested. but this did not help.
On the other hand the src folder was not defined as a "src" folder in eclipse.
When i went to Properties=>Java Build Path=>Source and added "src" folder it solved the problem
Now i can run "MyBatis Generator" and i get no error.
But, on the third hand, when i refresh the STS project , the src folder is no longer defined as a "src" folder again and i have to re-define it.
I guess that , as Lance said, since STS is legacy I have these problems.
I created two maven project: project-applet and project-webapp.
The java applet works fine: I can start it with the applet-viewer in a static html file with the necessary applet-tag.
Now I'm trying to move this static html file into a servlet (actually just it's content) index.jsp
<html>
<body>
<applet
code="project.applet.Applet.class"
codebase="/lib"
archive="project-applet-0.1.0.BUILD-SNAPSHOT.jar" width="900"
height="300"> Your browser is completely ignoring the applet tag! </applet>
</body>
</html>
I'm building everything with maven. The project-applet-0.1.0.BUILD-SNAPSHOT.jar is in the project-webapp-0.1.0.BUILD-SNAPSHOT.war file in this position WEB-INF/lib/.
I also tried to just copy it to project-webapp/src/main/webapp/ with codebase="/" but this didn't help even if the jar can be download from localhost:8080/project-webapp/project-applet-0.1.0.BUILD-SNAPSHOT.jar.
Can someone help me?
Thanks!
If the jar is lying at localhost:8080/project-webapp/project-applet-0.1.0.BUILD-SNAPSHOT.jar, the codebase is like this codebase="/project-webapp/"
I'm trying to run the example CLIPS GUI projects, both versions 0.2 and 0.3, however without success. Nothing special - I create a simple Eclipse project with the codes, using Debian 64bit and I always end up with the "CLIPSJNI.SymbolValue cannot be cast to CLIPSJNI.MultifieldValue" exception. I got the libCLIPSJNI.so in /usr/lib64. Any help or suggestions appreciated.
I think your issue is that either the rule or resource files are not being found in your projects. There are probably multiple (or better) ways to do this, but what I did was create a CLIPSJNI project to contain the CLIPSJNI.dll, CLIPSJNI.jar, and libCLIPSJNI.jnilib files and then a separate project for each of the demos. I placed the clp files at the root level of the demo project, the java code within the src directory and the resources folder within the src directory:
Animal
src
AnimalDemo.java
resources
AnimalResources.properties
.
.
.
animaldemo.clp
bcdemo.clp
I placed an archive zip of the projects at https://sourceforge.net/projects/clipsrules/files/CLIPS/Misc/: CLIPSJNI_0_3_Eclipse_projects_64Bit.zip
I'm trying to make a copy of the xmlSettings example in openframeworks from the examples > addons directory to do some testing, but it has no .xcodeproj file within it, so I'm not sure how to make a working example within xcode. I've used the project generator to generate empty projects, and I've copied projects that contain the xcodeproj file, but I've never had to deal with this scenario and I haven't had any luck finding a tutorial online. Thanks for the help.
Even without the xcode project you should be able to use the ofxXmlSettings addon like so:
Right click the addons folder of your oF project, select Add > Existing Files... and select the ofxXmlSettings folder included in the oF/addons folder
Include the header file in your testApp.h file #include "ofxXmlSettings.h"
Use the addon:
in testApp.h declare an instance: ofxXmlSettings xml;
and use in setup() to load/save an xml file:
xml.clear();
xml.addTag("root");
xml.pushTag("root", 0);
for(int i = 0 ; i < 10 ; i++){
xml.addTag("child");
xml.addAttribute("child", "id", (i+1), i);
}
xml.popTag();
xml.saveFile("test.xml");
Also if it helps, I've posted a zipped version of the sample xcode project here. Note that I'm using an older version of Xcode(3.2.6) on an older os(10.6.8), so not 100% it will work on your configuration.