Focal Point
Resouce Layout

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9911072512

February 26, 2007, 12:36 PM
TryFocus
Resouce Layout
hi guys,

Trying to figure out..how to submit a report in defered. When interface was created in Resouce layout.

Detail:- Interface designed in Resouce layout. and want to implement report run in defered mode.

Any suggestions would appreciated.

Thanks


Prod: WF 7.6.10 windows. -- MRE/Dashboard/Self Service/ReportCaster - Windows XP
February 27, 2007, 08:33 AM
RichH
Depending on your version of WebFOCUS, try adding the following line to the HTMLform created by the Resource Layout Painter:

INPUT type='hidden' name='IBIMR_defer' value='defer'


WebFOCUS 8202 Win 2012
Test - WebFOCUS 8203 on Win 2012
March 02, 2007, 02:56 PM
TryFocus
Couldnt get to working..
Can you please try to explain in more detail about making report designed in Resouces layout.

Can you suggest steps in creating a
Case i: Input page has Text box and take Country name like "ENGLAND". Would like to submit the query in Defer mode.


Prod: WF 7.6.10 windows. -- MRE/Dashboard/Self Service/ReportCaster - Windows XP
March 02, 2007, 03:44 PM
BlueZone
Hello T-F :
I added the defer variable to this car-fex I have. You will need to customize it with your MRE Domain/folder/fex names. Also included is the called-fex, so you can see whats going on.
Hope this helps.

Please also update your signature to show your environment details.

Goooooooooood day !!
Sandeep Mamidenna.


-*-*-** First fex
-*-*
-*
TABLE FILE CAR
PRINT
DST.COUNTRY
ON TABLE HOLD AS H1
END
-*
DEFINE FILE H1
QT/A1='''';
END
TABLE FILE H1
PRINT
COMPUTE FLDX/A100 =
('document.write("' || '<option value=' | QT || COUNTRY ||
QT | '>' | COUNTRY | '</OPTION>");'
) ;
BY COUNTRY NOPRINT
ON TABLE HOLD AS HCNTRY
END
-RUN
-*
-HTMLFORM BEGIN
<HTML><HEAD>
<script language='javascript'>
function runit() {
var opt=document.FRM1.CTRY.options(document.FRM1.CTRY.selectedIndex).value;
if (opt != 'NADA'){
document.FRM1.IBIF_ex.value = 'app/xcar2.fex' ;
document.FRM1.IBIMR_fex.value = 'app/xcar2.fex' ;
document.FRM1.submit();
}
}
</script></head>
<body><form action="/ibi_apps/WFServlet" method="GET" name="FRM1">
<input type='hidden' name='IBIMR_domain' value='bjbt1/bjbt1.htm'>
<input type='hidden' name='IBIMR_folder' value='#99coding'>
<input type='hidden' name='IBIMR_action' value='MR_RUN_FEX'>
<input type='hidden' name='IBIMR_sub_action' value='MR_STD_REPORT'>
<input type='hidden' name='IBIMR_fex' value=''>
<input type='hidden' name='IBIF_ex' value=''>
<input type='hidden' name='IBIMR_defer' value='defer'
<TABLE><TR><TD WIDTH=30%>Country=
<select name="CTRY" size="1" onChange='runit()'>
<option value="NADA">Select From the Following.....</option>
!IBI.FIL.HCNTRY;
</SELECT></TD><TD WIDTH=30%> Car=</TD>
<TD WIDTH=30%> Seats=</TD></TR></TABLE>
</FORM></BODY></HTML>
-HTMLFORM END
-*
-*
-*-*-*-*
-*-*---*-*-**-*-*-*-*-*-* THE 2ND (CALLED) FEX -*-*-*
-*-*-*-*
-*
-*
-SET &ECHO=ALL;
-SET &CTRYX=&CTRY;
TABLE FILE CAR
PRINT
DST.COUNTRY
ON TABLE HOLD AS H1
END
-*
DEFINE FILE H1
QT/A1='''';
END
TABLE FILE H1
PRINT
COMPUTE FLDX/A100 =
('document.write("' || '<option value=' | QT || COUNTRY ||
QT | '>' | COUNTRY | '</OPTION>");'
) ;
BY COUNTRY NOPRINT
ON TABLE HOLD AS HCNTRY
END
-RUN
-*
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
TABLE FILE CAR
PRINT
DST.CAR
WHERE COUNTRY EQ '&CTRY'
ON TABLE HOLD AS H3
END
-*
DEFINE FILE H3
QT/A1='''';
END
TABLE FILE H3
PRINT
COMPUTE FLDX/A100 =
('document.write("' || '<option value=' | QT || CAR ||
QT | '>' | CAR | '</OPTION>");'
) ;
BY CAR NOPRINT
ON TABLE HOLD AS HCAR
END
-RUN
-*-EXIT
-*
-HTMLFORM BEGIN
<HTML><HEAD>
<script language='javascript'>
function runit() {
var opt=document.FRM1.CTRY.options(document.FRM1.CTRY.selectedIndex).value;
if (opt != 'NADA'){
document.FRM1.IBIF_ex.value = 'app/xcar2.fex' ;
document.FRM1.IBIMR_fex.value = 'app/xcar2.fex' ;
document.FRM1.submit();
}
}
function runit2() {
var opt=document.FRM1.CAR.options(document.FRM1.CAR.selectedIndex).value;
if (opt != 'NADA'){
document.FRM1.IBIF_ex.value = 'app/xcar3.fex' ;
document.FRM1.IBIMR_fex.value = 'app/xcar3.fex' ;
document.FRM1.submit();
}
}

</script></head>
<body><form action="/ibi_apps/WFServlet" method="GET" name="FRM1">
<input type='hidden' name='IBIMR_domain' value='bjbt1/bjbt1.htm'>
<input type='hidden' name='IBIMR_folder' value='#99coding'>
<input type='hidden' name='IBIMR_action' value='MR_RUN_FEX'>
<input type='hidden' name='IBIMR_sub_action' value='MR_STD_REPORT'>
<input type='hidden' name='IBIMR_fex' value=''>
<input type='hidden' name='IBIF_ex' value=''>
<TABLE><TR><TD WIDTH=30%>Country=
<select name="CTRY" size="1" onChange='runit()'>
<option value="!IBI.AMP.CTRYX;" SELECTED>!IBI.AMP.CTRYX;</option>
!IBI.FIL.HCNTRY;
</SELECT></TD><TD WIDTH=30%> Car=
<select name="CAR" size="1" onChange='runit2()'>
<option value="NADA">Select From the Following.....</option>
!IBI.FIL.HCAR;
</SELECT></TD>
<TD WIDTH=30%> Seats=</TD></TR></TABLE>
</FORM></BODY></HTML>
-HTMLFORM END


-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !! Music
March 02, 2007, 03:50 PM
BlueZone
T-F :
I apologize if the above sample was over-kill for the simple example you requested. But hey, it is TABLE FILE CAR, it was readily available, and it works !!

Have a goooooooooood weekend !!
Sandeep Mamidenna.


-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !! Music
March 02, 2007, 04:07 PM
TryFocus
B-Z : Thanks for your reply, I guess u mis understood the question.

Environment:- WF 7.1.4 client Window XP.

But looking for designing input page in "HTML Layout Painter" which contains single Text box & 2 buttons.

Textbox - User enters Country name (ENGLAND)
1st button -Submit
2nd button - Defer

"Know how to make submit button work"

If user clicks Defer button -Text box value (Country -ENGLAND) should be transmited to underling FEX (CAR file). or Underlying FEX (Query) should be submited in Defer mode.

Any suggestion is appreicated.

Thanks
WF 7.1.4 client windows XP.
March 08, 2007, 01:26 PM
Dennis_V
I have a solution that sounds like what you're asking for.

We have a JavaScipt function workaround that was provided by IBI in response to a case that was opened up requesting a way to submit an MRE-based report directly to the deferred report queue from a parameter launch page.

The JavaScript function workaround dynamically adds the IBIMR_defer = "Defer" to the form before it is submitted to the server, which causes the report to run deferred.

IBI's version of the JavaScript function required a submit button with the Unique Name property value of "Defer".

I modified the JavaScript function to use values returned from a dropdown box instead of a submit button. So now the user has the option to run a parameter report deferred just by selecting the deferred option from a dropdown box.

The updated JavaScript function is:

var x=document.getElementsByName("cmbforegroundbackground")
   if (x.length > 0)
   {
      var x=document.getElementById("cmbforegroundbackground")
      if (x.selectedIndex == 1)
         appendInput(form, "IBIMR_defer", "Defer");
   }


This code is inserted at the end of the GenerateRequest2 function in the ibirls2.js JavaScript file located in the:

\ibi\WebFOCUS71\ibi_html\javaassist\ibi\html\js folder


The Unique Name property value of the dropdown box in this example needs to be The Unique Name property value of the dropdown box in this example needs to be cmbforegroundbackground..

This workaround function is placed at the end of the function before the return form; statement.

This is one of those things that warrants the caveat "proceed at your own risk!", since the ibirls2.js file is an internal-use file. Also, you would need to make sure this additional JavaScript function was added to each new version when upgrading WF.

We are running 7.1.4 and this works fine, but I'm not sure if any updates have been made to the ibirls2.js file in later versions. If any updates were made to the ibirls2.js file in later versions, those updates may or may not have an effect on this workaround.

I was told when I opened up the case that this was submitted by the by CSS as a new feature request, so this workaround may not be required in future versions.

Dennis

This message has been edited. Last edited by: Dennis_V,


Local: AppStudio 8.2.03 - Win7 - Tomcat Server: WebFOCUS 8.2.03 - Windows 2008 R2 Enterprise on VMWare 2 CPU, 3.2GHz, 4GB of RAM Output Formats: HTML, Excel, PDF, PPT, Active Reports
March 08, 2007, 02:04 PM
Darin Lee
I don't think there is an easy way to do this with Resource Layout, but if you just publish a page (checking the show as report box) and select the "Deferred & Submit buttons" option, you can open it and see everything that needs to be added to your launch page to get the run deferred functionality you're looking for.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
February 07, 2008, 12:13 PM
bcowley
Dennis_V,

Just wanted to say thanks, this solution worked great for me and I haven't seen anything else like it posted.

Bruce


______________________
WF Version: Prod/Test : WebFOCUS 7.67; ETL 7.67

OP system: WIN2K