Skip to Content
0
Former Member
Apr 27, 2009 at 07:09 AM

java.lang.String getInputFormat() giving output "."

30 Views

Hi All,

I am capturing all the prompts of webi document and identifying the date prompt..

The problem is "prompt.getInputFormat()" returns "." for one of the prompts.

where as in API doc it is memtioned

Unless this is a date prompt, this method always returns "" if ReportEngine.getCanEditDocument() returns false. That is to say, the ReportEngine instance used to open this DataProvider was opened to run Desktop Intelligence documents.

public ArrayList getWebiReportPromtstest(String reportIID,IInfoStore infoStore,IEnterpriseSession eSession)

{

ArrayList promptList=new ArrayList();

System.out.println("*************inside getWebiReportPromts********");

String query = "SELECT * FROM CI_INFOOBJECTS WHERE SI_ID="+reportIID;

System.out.println("query---"+query);

try

{

IInfoObjects boInfoObjects = (IInfoObjects) infoStore.query(query);

IWebi webiDoc = (IWebi)boInfoObjects.get(0);

if(webiDoc.hasPrompts())

{

System.out.println("*************inside has prompt********");

ReportEngines boReportEngines = (ReportEngines) eSession.getService("ReportEngines");;

ReportEngine boReportEngine = boReportEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);

DocumentInstance boDocumentInstance = boReportEngine.openDocument(webiDoc.getID());

int reportid = webiDoc.getID();

Prompts prompts = boDocumentInstance.getPrompts();

PromptsBean Promptbean =null;

for(int j=0;j<prompts.getCount();j++)

{

System.out.println("*************inside for loop********");

Prompt prompt = prompts.getItem(j);

System.out.println("promptname----"+prompt.getName());

System.out.println("input format="+prompt.getInputFormat());

}

}

}

catch (SDKException e)

{

// TODO Auto-generated catch block

e.printStackTrace();

}

return promptList;

}

Can anybody throw some inputs on how to identify whether the prompt is "Date".

Thanks,

Praveen.