Quantcast
Viewing all articles
Browse latest Browse all 5661

How to set a webi report's caching format?

Hello Community,

 

I have come to a hurdle that I can not conquer on my own and for as much as I have tried can not find samples or documents on how to accomplish this.

 

I am writing code to schedule webi reports and the piece that handles the caching format and locales keeps failing. I have used 2 approaches:

 

The first approach I used the IWebiProcessingInfo.getPrecacheTypes()

 

here is some reference:

Webi document: webi (IInfoObject)

caching: an panelcontaining a list object containing the selected locales

 

try {

            if (caching.getFormatOptionExcel()) {

                ((IWebiProcessingInfo) webi).setPreCacheXLSEnabled(true);

                loadLocales(IPrecacheType.CeOutputType.OUTPUT_XLS, caching.getSelelectedLocales());

            }

} catch (SDKException ex) {

            Exceptions.printStackTrace(ex);

        }

 

private void loadPreCacheAndLocales(int type, List locales) throws SDKException {

        IPrecacheType pt = ((IWebiProcessingInfo) webi).getPrecacheTypes().add(type);

        pt.getLocales().clear();

        pt.getLocales().addAll(locales);

    }

 

Although this bit of code executes successfully, when you try reschedule the object via the CMC I get a null pointer exception on the web page.

 

 

The second approach I used is: ReportEngine preloadOutputCache(int, String, OutputCacheEntry[])

 

try {

if (caching.getFormatOptionExcel()) {

                ((IWebiProcessingInfo) webi).setPreCacheXLSEnabled(true);

                ReportEngine wbe = getWebiEngine();

                wbe.preloadOutputCache(webi.getID(), agent.getSeverName(),

                    new OutputCacheEntry[]{new OutputCacheEntry(OutputFormatType.XLS, caching.getSelectedLocalesAsArray())});

            }

 

} catch (SDKException ex) {

            Exceptions.printStackTrace(ex);

        }

 

 

This approach erros out with the following:

 

com.businessobjects.sdk.core.exception.common.NotImplementedException: This feature is not implemented. (Error: RWI 00013)

  at com.businessobjects.sdk.core.exception.ExceptionBuilder.make(ExceptionBuilder.java:144)

  at com.businessobjects.sdk.core.exception.ExceptionBuilder.make(ExceptionBuilder.java:115)

  at com.businessobjects.rebean.wi.internal.WIReportEngine.preloadOutputCache(WIReportEngine.java:519)

 

Anybody know whats going on or perhaps point me in the right direction on how to correctly set the caching format and local for a webi document.

 

Thanks guys!


Viewing all articles
Browse latest Browse all 5661

Trending Articles