Johnny Ye’s Blog

Johnny Ye’s Blog

Entries for the ‘Business Objects’ Category

How to change Business Objects Scheduler default expiration date

Open the
recurrence.jsp in c:\Program Files\Business Objects\Tomcat55\webapps\PlatformServices\jsp\Shared_Recurrence
Add these two Classes to the import at the top of the file, so it looks like this.
<%@ page import="com.businessobjects.webutil.clientaction.ActionHelper,
com.businessobjects.clientaction.shared.recurrence.RecurrenceBean,
com.businessobjects.webutil.shared.CalendarUtils,
com.crystaldecisions.sdk.framework.IEnterpriseSession,
com.crystaldecisions.sdk.occa.infostore.IInfoObject,
com.crystaldecisions.sdk.plugin.desktop.calendar.ICalendar,
com.businessobjects.webutil.Encoder,
com.businessobjects.clientaction.shared.CalendarData2,
java.util.*,
java.text.DateFormat,
java.text.SimpleDateFormat"%>

Go to line 416, look for
document.getElementById("recurrence:endDate").value = "< %=calendar.getEndDate()%>";
replace it with:
<%
DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
Date ed = df.parse(calendar.getStartDate());
Calendar calEd=Calendar.getInstance();
calEd.setTime(ed);
calEd.add(Calendar.YEAR,1);
%>
document.getElementById("recurrence:endDate").value = "<%=df.format(calEd.getTime())%>";

You can change the 1 in calEd.add(Calendar.YEAR,1); to however many years you want to add to the start date.

How to clear Audit Database in Business Ojbects XI R3

The Audit DB is growing really fast, probably because I put too much into auditing. After archiving the database, I needed a way to clear the audit database.
I found the statement in Business Objects Board. http://www.forumtopics.com/busobj/viewtopic.php?t=105734&highlight=audit

select count(Event_ID) from AUDIT_DETAIL where event_id IN
(select Event_ID from AUDIT_EVENT where Start_Timestamp
between '01/01/2008' and '9/01/2008')

delete from AUDIT_DETAIL
where event_id in (select Event_ID from AUDIT_EVENT
where Start_Timestamp between '01/01/2008' and '9/01/2008')
go
delete from AUDIT_EVENT
where Start_Timestamp between '01/01/2008' and '9/01/2008'
go

Business Objects XI Session Removal Tool

Business Objects XI doesn’t come with a standard tool that let administrators to remove user session. But this is doable using their SDK. (Download here  BO XI kill session tool).  Note: I only tested in XI R3

[caption id="attachment_204" align="alignnone" width="64" caption="BO XI kill session tool Download"][/caption]

Unzip and put the folder KillSession into the webapps folder under tomcat.

Before you can use it, copy the all library files from CmcAppActions (C:\Program Files\Business Objects\Tomcat55\webapps\CmcAppActions\WEB-INF\lib) to the C:\Program Files\Business Objects\Tomcat55\webapps\KillSession\WEB-INF\lib

You might need to restart Tomcat (or not ? ).

http://yourserver:8080/KillSession

use it at your own risk

Business Objects XI R3, server stuck in starting stage

Recently, our Business Objects servers keep failing and getting stuck in the starting stage. So I use the SDK to this little program to check the expected time/stage of the server, if the expected time is less than now, then restart the server.

[caption id="attachment_204" align="alignnone" width="200" caption="Restart BO Server Java Source"][/caption] [caption id="attachment_204" align="alignnone" width="200" caption="BO XI R3 Restart Server"][/caption]

usage:

C:\Program Files\Business Objects\javasdk/bin/java -jar Monitor.jar [servername] [username] [password] [authMethod]