Reports With XML Publisher: (Using BI Publisher and Microsoft Word) Connected Query Report
Reports With XML Publisher: (Using BI Publisher and Microsoft Word) Connected Query Report
Date 08/03/2013
By Ayesha Jaffar
2.
3.
4.
5.
After pressing Next you have to select parent query table and child parent query for connecting.
Map fields in parent child relationship for maintain connection and press next.
Check that below given xml is according to your data and click Complete.
Go to Reporting Tools -> Connected Query -> Connected Query Viewer search there this query
by name.
6. Click Preview XML link and save this this in C:\temp.
7. Now make report named MY_PR_REPORT and upload this document in that. Then that report
must be give us its own generated XML file.
In App Designer:
1.
2.
3.
4.
*/
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* Hard code my State value - would normally pull from a field on the page */
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
try
rem &State = GetField(CC_TEMP_DEPT.DEPARTMENT_ID).Value;
GetField(MY_DEMO_WORK.TEST_COMPONENT).Value = "";
/*MessageBox(0, "", 0, 1, GetField(GEN_CONN_REPORT.DEPARTMENT_ID).Value);*/
CommitWork();
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* Declare and Instantiate (construct) your Report Definition Object
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
Local PSXP_RPTDEFNMANAGER:ReportDefn &oReportDefn = create
*/
PSXP_RPTDEFNMANAGER:ReportDefn(&MyReportName);
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* Get a handle on your Report Definition
*/
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
&oReportDefn.Get();
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* Since there is a prompt to the query used in this report, you need to */
/* provide the value for the prompt
*/
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* &rcdQryPrompts = &oReportDefn.GetPSQueryPromptRecord();
If Not &rcdQryPrompts = Null Then
&oReportDefn.SetPSQueryPromptRecord(&rcdQryPrompts);
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* Provide a value to the State Prompt
*/
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
REM &rcdQryPrompts.DEPARTMENT_ID.Value = 1;
REM End-If;
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* Kick of the report process
*/
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
rem MessageBox(0, "", 0, 1, "abc");
&oReportDefn.ProcessReport(&MyTemplate, &LanguageCd, &AsOfDate, &OutFormat);
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* CommitWork must be called prior to displaying the output since the */
/* application package performed work and SQL statements. If you do
*/
/* not commit the work performed to this point you will receive an
*/
/* error like Think-time PeopleCode event (ViewAttachment), but a SQL */
/* update has occurred in the commit interval. (2, 148)
*/
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
CommitWork();
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* Display Report to the user
*/
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
&oReportDefn.DisplayOutput();
end-try;
Note:
Make 1 report for all data and 1 for selection. Means make 2 reports.