cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

Cognos Reporting : Prompt Page

mrane
1-Newbie

Cognos Reporting : Prompt Page

Hi,

I am in the process of creating a prompt page for a Cognos report. I*E task is the data source for the same. I know, one can create a prompt page by simply adding @param to the task

Ex:

@param java.lang.String Number

The above provides a simple text box on the prompt page. Would you be able to tell me how can we have a drop-down or radio box as input on the prompt page ?

The values from the prompt page will be read in the I*E task before the task is fired. The input value will form a part of the where clause for the task.

Thanks,

Malavika

6 REPLIES 6

Hi Malavika

Were you able to get a solution to this? I am looking for something similar. I don't think it will be possible using anything on the task. A template will have to be created.

Thanks

Pardeep

mrane
1-Newbie
(To:psingh-8)

Unfortunately, I haven't found a solution just yet.

Have you tried a custom page?

mrane
1-Newbie
(To:psingh-8)

Not really. Have you tried it already ? What are the other things that you tried but did not work.

I am just starting with it. Will keep you posted.

I am not sure about which reports you are running and how you are running report. however if you are running report from action you can build custom input pages for taking input from user and call cognos report

create input.jsp - Custom input page to take input from user. Use HTML from to call redirecttoReport.jsp file to run Report on submit action.

redirecttoReport.jsp validate input from user and then call congas report. Below is sample code I used to run cognos report.

<%

    String ncId = request.getParameter("ncId");

    String partOid = (String)request.getParameter("oid") ;

    String localeSt =  request.getHeader("Accept-Language"); 

    Locale locale = BOMReportHelper.getLocale(localeSt);

   

    String reportOid = PartCognosReportHelper.getReportOid("CUSTOM_REPORT");

    ReferenceFactory  refFactory = new ReferenceFactory();

    ObjectReference  reportRef = (ObjectReference) refFactory.getReference( reportOid );

    String  href = "";

   

    try {

        if( (ReportHelper.isThirdPartyReportingEnabled() && ReportHelper.manager.thirdPartyReportDefExists( reportRef ) ) {

                href = "generateReport.jsp?objectID="+partOid+"&locale="+locale+"&hostName="+hostName+"&sessionId="+sessionId+"&reportOid="+reportOid+"&moduleName="+moduleName+"&ncId="+ncId;

            } else {

                href = "generateReport.jsp" + "?u8=1&oid="+partOid+"&ncId="+ncId+"&moduleName="+moduleName+"&sessionId="+sessionId+"&hostName="+hostName+"&actionName="+action;

            }

    } catch(WTException wt) {

        href = "generateReport.jsp" + "?u8=1&oid="+partOid+"&ncId="+ncId+"&moduleName="+moduleName+"&sessionId="+sessionId+"&hostName="+hostName+"&actionName="+action;

    }

%>

<jsp:forward page="<%=href%>"/>

see below two files for details about custom input pages from Congos however you may need to make some changes in you report aswell

Windchill\codebase\netmarkets\jsp\part\report\bomPromptPage.jsp

Windchill\codebase\netmarkets\jsp\part\reports\dispatcherSingleLevelBOM.jsp

Hope it helps!!!

Thanks

shreyas

Top Tags