Hi Julien
1621021 - Which SDK Jars are required for BI 4.0 Java custom application?
This KBA gives the list for old BIP 4.0.
BR
Jean-Pierre
Hi Julien
1621021 - Which SDK Jars are required for BI 4.0 Java custom application?
This KBA gives the list for old BIP 4.0.
BR
Jean-Pierre
thanks
Hello,
I just started using the Java Report Engine SDK for exporting Webi-Reports on BI4.x.
What I want to achieve is the following workflow:
Connect to the server, open a webi-document and export report-sets as pdfs.
Imagine a report that contains "sales revenue" for different "cities" in different "states" in several "years".
What actually works very fine for me is to get the full report with the entire dataset or to select for example some special cities or years using the setPrompts()-method.
But what I really want is to get a set of pdfs with for example all combinations of states and years (4 states, 3 years --> 12 pdfs).
I actually tested my code with to nested loops with the following code:
for .... { for ... { doc.refresh(); .... doc.setPrompts(); save(doc,filename); } }
Now the thing is, that I was wondering if this is the right way to call the refresh()-method every time or if there is a more simple way.
I suppose there is some sort of caching when the refresh-method is called for example severeal thousand times in a row?
By the way, I don't need the prompts if there is another way for filtering the data.
thanks for any advice.
best regards,
peter
First off, you need to call .refresh() AFTER setting the prompts - otherwise it won't have the correct prompt values before your export.
Another way to do this might be to put the report into a Publication, which can burst it for you. You'll need to create a second report that will pull the information about where to burst the report into separate files. This can then be scheduled directly in BO and doesn't need to have any code written.
-Dell
Thanks for the advice concerning the publications, I will have a look on that.
By the way, I tried the refresh() both after and before setting the prompts. At least in my test, that doesn't make any differences.
Hi Peter,
The refresh method just refreshes the document. During a refresh all data providers are refreshed, this mean that the query is executed and the data is fetched from the micro cube. During the query execution, any prompts and contexts in the document are raised.
Calling the refresh method before or after setting the prompts makes difference if in BI InfoView for the report prompts you have turned on option "Keep last values selected". If this option is on and you call refresh method after setting the prompts, it keeps the last value. If this option is off and you call refresh after setting the prompts, the prompts values will be gone and you will not have exact values.
Regarding the publications, you can go through the below links:
Hope this helps.
Regards,
Rajarsh
Friends,
Wish you a Happy New Year..
Í'm facing a breaker here. I tried to refresh a crystal report via RAS SDK. I got the below error..
The system cannot find the path specified---- Error code:-2147467259 Error code name:failed
So i just referred the RAS Log generated and below is what i found.
../cdtsagent.cpp (3321)
COM: 0x80070003
The system cannot find the path specified. -- detail msg end -->
ErrorLog 2015 1 2 6:46:49.392 26787 1062 (XBBKLME:267) (../reporthandler.cpp:12471): CReportHandler::buildReportViewerError: CSResultException thrown. ErrorSrc:"CRPE" FileName:"../reporthandler.cpp" LineNum:12467 ErrorCode:515 ErrorMsg:"This field name is not known.
Error in File {72A288FD-8118-11E4-90BA-005056B20305}.rpt:
Error in formula FRM_Total_Matches:
'//{#RT_System_Matched_ST}+{#RT_Manual_Match_ST}
This field name is not known.
Details: errorKind" DetailedErrorMsg:""
ErrorLog 2015 1 2 6:46:49.568 26787 1062 (XBBKLME:267) (../cdtsagent.cpp:3323): CDTSagent::doOneRequest reqId=134: <-- detail msg begin -- Analysis Server: 0x80004005
But the above field is validated and report works good when you refresh from Infoview with any custom DB connection.
Scenario appears like , If the custom DB configuration of crystal report is similar to the DB i want to connect , report output gets generated. Else it shoots the above error in log..
Awaiting your help guys..
Thanks,
Bharath
Hi Bharath,
What is the BO Product version you are using?
Are you using replaceConnection() method of RAS sdks to change the database connection while viewing the reports?
If yes, what hapens when you oint your report to the same database from CR designer which throws you the error from the code
Thanks,
Prithvi
Prithvi ,
I'm using BO XI 3.1 .
And Yes I'm using ReplaceConnection ( code below that i use to change DB connection)
// read initial connection info from SP based report.
ConnectionInfos conns = reportClientDoc.getDatabaseController().getConnectionInfos(null);
IConnectionInfo oldConnInfo = conns.getConnectionInfo(0);
// Modify conninfo during runtime applicable for current env
PropertyBag newLogon = new PropertyBag();
newLogon.putStringValue("Server", dbService);
newLogon.putBooleanValue("Trusted_Connection", false);
PropertyBag newAttrib = new PropertyBag();
newAttrib.putStringValue(PropertyBagHelper.CONNINFO_CRQE_DATABASETYPE, "Oracle Server");
newAttrib.putBooleanValue(PropertyBagHelper.CONNINFO_SSO_ENABLED, false);
newAttrib.putStringValue(PropertyBagHelper.CONNINFO_DATABASE_DLL, "crdb_oracle.dll");
newAttrib.putStringValue(PropertyBagHelper.CONNINFO_CRQE_DATABASENAME, "");
newAttrib.put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES, newLogon);
newAttrib.putBooleanValue(PropertyBagHelper.CONNINFO_CRQE_SQLDB, false);
newAttrib.putStringValue(PropertyBagHelper.CONNINFO_CRQE_SERVERDESCRIPTION, "Modified description");
IConnectionInfo newConnInfo = new ConnectionInfo();
newConnInfo.setAttributes(newAttrib);
newConnInfo.setUserName(dbUser);
newConnInfo.setPassword(dbPass);
// Replace the conninfo at runtime
System.out.println("attributes before change : " + oldConnInfo.getAttributes());
System.out.println("attributes after change : " + newConnInfo.getAttributes());
reportClientDoc.getDatabaseController().replaceConnection(oldConnInfo, newConnInfo, null, DBOptions._useDefault);
When i try to refresh from CR designer , it runs completely fine with any DB Connection. Its very weird.
Any ideas? Am i missing anything in the code?
Thanks,
Bharath
In replace connection method. Use DBOptions._doNotVerifyDB.
Test and let me know if you get the same error?
Thanks,
Prithvi
Sure Prithvi.. Thanks for the Heads up..!
Prithvi,
It seems to work. I'm gonna give test run to all reports and let you know .. Thanks a lot.
Thanks,
Bharath
Hi Rajarsh,
Sorry for the late response.I was away on vacation..
Here is where I saw the sample code Opendocument single logon.
Anyway,I 'll use the less complex solution as you suggested.
Thank a lot.
Hi can any one please tell how we can get reports and tabs layout information in SAP 4.1 Java API
Thanks
Hi Alphonse,
Please provide more information about what you want to achieve here?
- Kind of reports?(crystal, webi)
- What exact information are you looking for?
- Were you able to get the same in BO 3.1? If yes, a small code snippet would be great.
Regards,
Rajarsh
Hi Rajarsh
Thanks much for your quick response.
1 . I am trying to get WebI Report information
2. Im Looking for:
For Example If I have a table in a block and a chart in a block, I need to get the table layout information and chart layout information. The column values in the table, borders, size, conditional formatting etc. Same for chart like X, Y axis values, legends labels, formattings etc.
3. Yes I am able to get this in BO 3.1
In BO 3 I we can able to get it from Report Eingine, Document Instance
We can get hierarchy like Report->Document->Block-:Report->Cell
But I cant get it in 4.1
IInfoObject infoObject = (IInfoObject) infoObjects.get(i); | |||
DocumentInstance documentInstance = reportEngine.openDocument(infoObject.getID()); | |||
documentInstance.getReports().getItem(0).getBlockInfo().getBlocks().getItem(0) |
Hi Alphonse,
A major chunk of REBEAN SDK's have been deprecated from BO 4.0 onwards and is no longer functional. You can get the list of deprecated API's in the below SAP note:
1587987 - Which classes and interfaces are removed or no longer functional in Java Report Engine SDK in BI 4.0?
You will have to use Restful Webservices SDK's to achieve your requirement in BO 4.1. The Restful SDK's works with simple request/response methods and are language independent. You can download the Developer Guide for the same from the below link:
http://help.sap.com/saphelpiis_sbo41sp4wi-sdk/frameset.htm?cd1b6c13b540481781591c7945b5fd26.html
In the guide goto "RESTful Web Service API Quick Reference", the headings "Report URLs","Report Drill URLs", "Report Element URLs" might be of your interest.
Hope this helps.
Regards,
Rajarsh
Thanks much Rajarsh. Will try this.
Prithvi,
I'm facing the scenario with few reports with different error "Failed to retrieve data from Database". But the same connection works with both Infoview & CR designer. I've pasted the RAS log below. Need your help.
../cdtsagent.cpp (3321)
COM: 0x80070003
The system cannot find the path specified. -- detail msg end -->
ErrorLog 2015 1 6 2:43:17.516 16024 1370 (XBBJ4ND:350) (../reporthandler.cpp:12471): CReportHandler::buildReportViewerError: CSResultException thrown. ErrorSrc:"CRPE" FileName:"../reporthandler.cpp" LineNum:12467 ErrorCode:723 ErrorMsg:"Failed to retrieve data from the database.
Failed to retrieve data from the database.
Failed to export the report. the database.
Error in File {737CE39C-8118-11E4-8204-005056B20302}.rpt:
Failed to retrieve data from the database.
Details: [Database Vendor Code: 936 ]" DetailedErrorMsg:""
ErrorLog 2015 1 6 2:43:17.729 16024 1370 (XBBJ4ND:350) (../cdtsagent.cpp:3323): CDTSagent::doOneRequest reqId=134: <-- detail msg begin -- Analysis Server: 0x80004005
../cdtsagent.cpp (3321)
COM: 0x80070003
The system cannot find the path specified. -- detail msg end
Thanks,
Bharath
For the non working reports, check verify on first refresh option and test.
In CR Designer, Go to File--> Report Options
Check the Verify on First Refresh option. Save the report back to enterprise and test it. Do the test for a single report first.
Thanks,
Prithvi