on 04-29-2009 3:50 PM
Hi,
I'm developping in a jsp page scheduling a job on a Business Objects Enterpise server XI R2 SP4.
The report has a parameter, which must be modified with a given value:
The problem arrives if the parameter of my report has no default value set thru the CMC: no matter the value I'll give, the report scheduling will occur in a failed report. When looking at the history of this report thru the CMC, The given parameter won't be used.
Now, If I set a default value to this parameter in the CMS, the given value thru this program will be used ( the default value isn't used) , and the scheduling will work: In the history of this report, the occurence will be marked as "complete".
Easy solution would be that all my reports should have a default value for their parameters: but there are too many, and itsn't a god solution.
A more nice solution would be to find out why this is happening, and how can I solve this in the code ?
p.s.: the report that I try to generate is a .rpt (Crystal Report).
Thanks for your help.
This is a regression issue and is targeted to get fixed in Fix pack 5.5 on XI R2. Appearently if you can downgrade to XI R2 SP3 it should work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Aasavari : I re-installed a new XI R2 SP2 Business Objects enterprise server ( I couldn't downgrade from SP4 to SP3)., and now this works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the code: sorry I have some layout problems with this forum 😐
final String baseUri = "http://myserver:18080/dswsbobje/services/";
final String login = new String("administrator");
final String password = new String("adminpass");
URL boConURL = new URL(baseUri + "session");
Connection boConnection = new Connection(boConURL);
EnterpriseCredential boCredential = new EnterpriseCredential();
boCredential.setLogin(login);
boCredential.setPassword(password);
Session boSession = new Session(boConnection);
SessionInfo boSI = boSession.login(boCredential);
URL bipConURL = new URL(baseUri + "biplatform");
boConnection.setURL(bipConURL);
BIPlatform bipService = new BIPlatform(boConnection, boSession.getConnectionState());
return bipService;
ResponseHolder rh = bipService.get("path://InfoObjects/" + request.getParameter("reportPath") + "@SI_SCHEDULEINFO,SI_PROCESSINFO", null);
// <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="938225"></a>
InfoObjects reports = rh.getInfoObjects();
if (reports == null) {
return;
}
step = "CrystalReport scheduleReport";
CrystalReport myReport = (CrystalReport)reports.getInfoObject(0);
SchedulingInfo schedulingInfo = myReport.getSchedulingInfo();
boolean newSchedulingInfo = false;
if (schedulingInfo == null) {
schedulingInfo = new SchedulingInfo();
newSchedulingInfo = true;
}
schedulingInfo.setRightNow(Boolean.TRUE);
schedulingInfo.setScheduleType(ScheduleTypeEnum.ONCE);
Destinations destinations = (Destinations)schedulingInfo.getDestinations();
if(destinations ==null) { destinations = new Destinations(); }
DiskUnmanagedScheduleOptions diskUnmanagedOptions = new DiskUnmanagedScheduleOptions();
DestinationFiles destinationFiles = diskUnmanagedOptions.getDestinationFiles() ;
if(destinationFiles ==null) { destinationFiles = new DestinationFiles(); }
String destinationFile[] = new String[1];
destinationFile[0] = outputFolder + request.getParameter("outputPdf");
destinationFiles.setDestinationFile(destinationFile);
diskUnmanagedOptions.setDestinationFiles(destinationFiles);
Destination destination = new Destination();
destination.setDestinationScheduleOptions(diskUnmanagedOptions);
Destination dest[] = new Destination[1];
dest[0] = destination;
destinations.setDestination(dest);
schedulingInfo.setDestinations(destinations);
ReportProcessingInfo reportProcessingInfo = myReport.getPluginProcessingInterface();
ReportParameter[] repParams = reportProcessingInfo.getReportParameters().getParameters();
if(repParams != null){
//set the report parameter values
CurrentValues oCurrentValues = new CurrentValues();
repParams[1].setCurrentValues(oCurrentValues);
PromptValue[] oPromptValue = new PromptValue[1];
oPromptValue[0] = new PromptValue();
oPromptValue[0].setData("5");
oCurrentValues.setCurrentValue(oPromptValue);
repParams[0].setCurrentValues(oCurrentValues);
}
out.write("***************************************************************<br/>");
for (int j = 0; j < repParams.length; j++) {
out.write(j+": "+ repParams[j].getParameterName().toString() + "<br/>");
out.write(j+": "+ repParams[j].getCurrentValues().toString() + "<br/>");
out.write(j+": "+ repParams[j].getValueType().toString() + "<br/>");
out.write(j+": "+ repParams[j].getCurrentValues().getCurrentValue(0).getData() + "<br/>");
}
}
CrystalReportFormatOptions crystalReportFormatOptions = reportProcessingInfo.getReportFormatOptions();
if(crystalReportFormatOptions == null){
crystalReportFormatOptions = new CrystalReportFormatOptions();
}
crystalReportFormatOptions.setFormat(ReportFormatEnum.PDF);
reportProcessingInfo.setReportFormatOptions(crystalReportFormatOptions);
myReport.setPluginProcessingInterface(reportProcessingInfo);
if (newSchedulingInfo) {
myReport.setSchedulingInfo(schedulingInfo);
}
bipService.schedule(reports);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.