Opening Report By clicking a btn
(Report should have generated in the same session by calling an application engine )
Steps
1)Create filePath from CDM_FILELIST_VW
2) use ViewUrl /ViewContentUrl function.
Example:
Component ProcessRequest &RQST;
/***Generating the file Path of Report Repository***/
&PRCSINSTANCE = &RQST.ProcessInstance;
Local Rowset &RSFileList, &RSCDM_LIST_VW;
&RSFileList = CreateRowset(Record.CDM_FILELIST_VW);
&RSFileList.Fill("where prcsinstance=:1 and cdm_file_type=:2", &PRCSINSTANCE, "XLS");
&RSCDM_LIST_VW = CreateRowset(Record.CDM_LIST_VW);
&RSCDM_LIST_VW.Fill("where prcsinstance=:1 and prcsname=:2", &PRCSINSTANCE, "XMLP");
/**For ViewUrl Function**/
&fname = &RSCDM_LIST_VW(1).CDM_LIST_VW.URL.Value | "/" | &RSCDM_LIST_VW(1).CDM_LIST_VW.CONTENTID.Value | "/" | &RSFileList(1).CDM_FILELIST_VW.FILENAME.Value;
/**For ViewContentURL Function**/
&outputdir = &RSCDM_LIST_VW(1).CDM_LIST_VW.OUTPUTDIR.Value;
&fname1 = "ftp://usrname:pass@hostname/dpappweb3/dev/hcmdev/psreports/" | &outputdir | "/" | &RSFileList(1).CDM_FILELIST_VW.FILENAME.Value;
ViewContentURL(&fname1);
/**********If we are using Viewurl then we need to make pathname like below*************/
/*&fname = &RSCDM_LIST_VW(1).CDM_LIST_VW.URL.Value | "/" | &RSCDM_LIST_VW(1).CDM_LIST_VW.CONTENTID.Value | "/" | &RSFileList(1).CDM_FILELIST_VW.FILENAME.Value;*/
/*Format : url/contentid/filename*/
ViewURL(&fname);
/************************************************************************************/
No comments:
Post a Comment