Setting optional parameter stepToStoreResultsIn of Thread.WaitForEnd() method
This question is related to an earlier posting of mine regarding launching a thread from a c++ code module (http://forums.ni.com/ni/board/message?board.id=330&message.id=15383&query.id=775150#M15383). I am launching a new thread from a code module (c++ DLL), and I need wait for it to finish.
There are 2 ways I envision doing this:
1. wait for the new thread to finish before returning from my code module by calling Thread.WaitforEnd()
2. return a reference to the new thread to the calling sequence and make the calling sequence wait for the thread to complete before terminating using a wait step at the end of the sequence.
My questions are regarding method 1, where I would call Thread.WaitforEnd(). I want to set the parameter stepToStoreResultsIn to set the result of the step in the calling sequence to the result of the sequence executed in the new thread:
a. Do I understand the purpose of the stepToStoreResultsIn parameter correctly?
b. The stepToStoreResultsIn parameter must be a variant, so how do I pass in the step context as a variant? is it the same as a IDispatch pointer?
a. Yes
b. Yes
Similar Messages
-
Crystal reports 2008 Set optional parameter value
Hi,
I'm working with .net Visual Studio 2008 C# and Crystal reports 2008 (Crystal.Decisions) and when I try to set a parameter to optional and set its value to no value, it returns the error: "Invalid parameter name", here is my code:
foreach (CrystalDecisions.Shared.ParameterField param in Report.ParameterFields)
if (!param.HasCurrentValue &&
!Report.DataDefinition.ParameterFields[param.Name].IsLinked())
switch (param.ParameterValueType)
case ParameterValueKind.NumberParameter:
param.IsOptionalPrompt = true;
param.CurrentValues.IsNoValue = true;
break;
I'm doing this because some of the parameters can be left null, and in this case I don't want to show the parameter prompt.
In past versions of Crystal (such as Crystal Reports 11.5) we had the chance to left the parameter value null and did not showed the parameter prompt dialog, and this behavior repeats in a lot of reports.
thanks in advancedPlease don't post the same question more than once. This is a public forum so be patient.
Install SP4 and test again.
Try these samples:
http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsSDKSampleApplications
Don -
How to set bind parameter in vo in execute method
Hi,
I m using this Query in VO.There are 7 bind variables i want to set the bind parameter before calling the execute Query of VO
but i m unable to set values in bind parameter.
I am getting the values in sysout but when trying to print the query by using get Query the bind parameter does not get the values.
can any one help me?
plz give me solution.I m waiting for ur response.
Thanks&Regards
Mansoor Syed
select '' MNDT_ORD_ID,
'' MNDT_CUST_ID,
'' MNDT_FOLIO_ID,
SUM(NVL(DECODE(MNDT_PLCMNT_QTY,0,MNDT_AMT_FC,MNDT_PLCMNT_QTY),0)) Mandate_Qty_Amt,
SUM(NVL(DECODE(MNDT_PNDG_QTY,0,MNDT_PNDG_AMT_FC,MNDT_PNDG_QTY),0)) Pending_Qty_Amt,
SUM(NVL(DECODE(MNDT_PLCMNT_QTY,0,MNDT_AMT_FC,MNDT_PLCMNT_QTY),0)) Placement_Qty_Amt,
MNDT_POOL_YN , max(substr(sys_connect_by_path(t.MNDT_SYS_ID, ','), 2)) List
from
(select MNDT_INSTR_ID, MNDT_TRANS_TYP,MNDT_SYS_ID,MNDT_PLCMNT_QTY,MNDT_AMT_FC,MNDT_PNDG_AMT_FC,MNDT_PNDG_QTY,
MNDT_POOL_YN ,row_number() over (partition by MNDT_INSTR_ID order by MNDT_SYS_ID ) rn
from XBT_TRD_ORD_MNDT
WHERE MNDT_ACLS_ID = nvl(:Bind_Acls_Id,MNDT_ACLS_ID)
AND MNDT_ATYP_ID = nvl(:Bind_Atyp_Id,MNDT_ATYP_ID)
AND MNDT_POOL_YN = nvl(:Bind_Pool_Yn,MNDT_POOL_YN)
AND MNDT_TRANS_TYP = nvl(:Bind_Trans_Type,MNDT_TRANS_TYP)
AND MNDT_INSTR_ID = nvl(:Bind_Instr_Id,MNDT_INSTR_ID)
AND :Bind_Price Between MNDT_FROM_PRC_FC and MNDT_TO_PRC_FC
AND 'P' = :Bind_Union
) t
start with rn = 1
connect by rn = prior rn + 1
and MNDT_INSTR_ID = prior MNDT_INSTR_ID
group by t.MNDT_INSTR_ID,t.MNDT_POOL_YN,t.MNDT_TRANS_TYP
UNION
SELECT MNDT_ORD_ID,
MNDT_CUST_ID,
MNDT_FOLIO_ID,
NVL(DECODE(MNDT_PLCMNT_QTY,0,MNDT_AMT_FC,MNDT_PLCMNT_QTY),0) Mandate_Qty_Amt,
NVL(DECODE(MNDT_PNDG_QTY,0,MNDT_PNDG_AMT_FC,MNDT_PNDG_QTY),0) Pending_Qty_Amt,
NVL(DECODE(MNDT_PLCMNT_QTY,0,MNDT_AMT_FC,MNDT_PLCMNT_QTY),0) Placement_Qty_Amt,
MNDT_POOL_YN ,concat(MNDT_SYS_ID,'') List
from XBT_TRD_ORD_MNDT
WHERE MNDT_ACLS_ID = nvl(:Bind_Acls_Id,MNDT_ACLS_ID)
AND MNDT_ATYP_ID = nvl(:Bind_Atyp_Id,MNDT_ATYP_ID)
AND MNDT_POOL_YN = nvl(:Bind_Pool_Yn,MNDT_POOL_YN)
AND MNDT_TRANS_TYP = nvl(:Bind_Trans_Type,MNDT_TRANS_TYP)
AND MNDT_INSTR_ID = nvl(:Bind_Instr_Id,MNDT_INSTR_ID)
AND :Bind_Price Between MNDT_FROM_PRC_FC and MNDT_TO_PRC_FC
AND 'N' = :Bind_UnionDo you mean to say that you are overriding "execute" in the impl class? If you do this, you should call setNamedWhereClauseParam for each of your named bind variables before you call "super". But if you are doing this, I have to wonder why you are using bind variables at all instead of constants because you wind up setting the bind variables to the same thing every time you execute the query. I'd write a brand new method that CALLS "execute" after setting the bind variables. I've even written a method that sets bind variables with setNamedWhereClauseParam and DOESN'T call "execute" - it leaves the execute for another page.
I'm also trying to understand what you mean by "all the values i m trying to set are transient variables". Maybe instead of telling us what doesn't work, you should tell us more about your use case. Tell us what it should look like to the user - what it should do, and let us give you some suggestions about how to do it. -
How to set the parameter selection *optional* for each subreport?
Hi,
I am using Crystal Reprots 11.
I create 10 subreports, and each subreport contains a Parameters Field.
The 10 subreports are put in 10 footer sections in increasing order, i.e. subreport1, subreport2, subreport3, ..., subreport10.
When I use "Print Preview" to take a look at the whole report, CR prompts a "Edit Values" window for selecting parameter values for all 10 subreports.
For example, if I only select parameter values for subreport1 and click "OK", 9 error messages on the "Edit Values" window come out above the selection list box of every other subreports (i.e. subreport2 ~ subreport10) showing that: 'The value is not valid'.
Sometimes, I just want to review some specific subreports but not all.
How should I do to set the parameter selection optional (not mandatory) for each subreport?
Thank you in adavance.
Edited by: Holdup on Feb 17, 2012 3:44 PMHi,
Here's how you can make the prompts optional (Assuming you're using CR 2008 or higher):
1) Go into each subreport
2) You should see the parameter in the Field Explorer. Right-click the name and select Edit > Look for an option called 'Optional Prompt'. Set it to true
3) If you have a record selection in the subreport, then you need to modify the selection formula to something like this:
if not(hasvalue({?Parameter_Name})) then True else = {?Parameter_Name}
Hope this helps!
-Abhilash -
How to set no_value to Optional parameter in XI 3.0 by OpenDoc URL linking
I found in "BusinessObjects XI 3.0 Viewing reports and documents using URLs Howto.doc"
"You can remove an optional parameter from the prompt by setting it to no_value in the OpenDocument query string."
I tested: response.sendRedirect("/OpenDocument/opendoc/openDocument.jsp?sIDType=CUID&iDocID=AaVxpKuKNBxKnHUJCqwuRi0&lsSCountry=""no_value""&token=" + logonToken);
But it will filter no data, because no country call "no_value". I still need to delete the value, and click Apply, to get all data.
I wonder how to achieve optional parameter via opendocument linking, to get a report with "full data set".
Any one can help?
Thanks in advance!
JennieHi Jennie,
I'm wondering if "1203675 - Cannot specify an empty string for an optional string parameter through the refresh prompts page which displays "no value" unlike the parameter panel" is related to this.
Instead of using no value or empty string, how about if you use ALL value for the parameter to bring full data? Check "1218621 - Option "All" in list of values for a dynamic prompt in XI"
Hitomi -
Need to set a parameter to a method from DataTable
Hi. I'm trying to work this problem out. I have to make a call to a method which is in a bean from a JSF DataTable. My method is something like String method(String). What I would like to do, is to call this method from a JSF DataTable in order to fill a column or two. I'd like to know how I can set this parameter from my JSF, something like "#{mybean.method[i need my string to be here]}". I would also like to know if it is possible that the parameter is another bean, I mean, if it is possible, something like "#{mybean.method[#{anotherbean.property}]}". I'll really appreciate some help, I hope you'll help me.
wow, thats about impossible to follow.
Let me take a stab.
If you want to save a value for later use when an exception is thrown, throw your own exception type that stores this info in the exception.
Or perhaps you are asking something completely different. -
Ignoring Optional parameter during OLE method calling
Hi guys,
I got a problem:
Application.Workbooks.OpenXML(Filename, Stylesheets, LoadOption) here's a defination from Microsoft help.
Stylesheets and LoadOption are optional parameters.
ABAP calling:
CALL METHOD OF workbooks 'OpenXML'
EXPORTING #1 = filename
#2 = '3'
#3 = 2 .
How can ignore parameter #2(Stylesheets) in the calling statement? I found no documentation about calling functions ignoring some optional parameters. Normaly there's posibility to explicitely define passing parameter, for example:
Application.Workbooks.OpenXML _
Filename:="customers.xml", _
LoadOption:=xlXmlLoadImportToList
With kind regards
Long.UP
-
Error while setting date parameter to an RFC
Hi,
I am getting the following error when i am setting a parameter od Date type to an RFC
java.lang.ArrayIndexOutOfBoundsException: -1
at com.sap.mw.jco.JCO$MetaData.getType(JCO.java:9201)
at com.sap.aii.proxy.framework.core.JcoBaseTypeData.setElementValue(JcoBaseTypeData.java:731)
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClass.setAttributeValueAsDate(DynamicRFCModelClass.java:568)
at com.telstra.ctawa.models.mainmodel.Zct_Wd_Demcat_Details_Input.setI_Tsk_Compldte(Zct_Wd_Demcat_Details_Input.java:387)
at com.telstra.ctawa.apps.wdp.IPublicAddWorkCustomController$IZct_Wd_Demcat_Details_InputElement.setI_Tsk_Compldte(IPublicAddWorkCustomController.java:1759)
at com.telstra.ctawa.apps.AddWorkCustomController.executeZct_Wd_Demcat_Details_Input(AddWorkCustomController.java:208)
at com.telstra.ctawa.apps.wdp.InternalAddWorkCustomController.executeZct_Wd_Demcat_Details_Input(InternalAddWorkCustomController.java:367)
at com.telstra.ctawa.apps.AddWorkAppView.executeGetDetails(AddWorkAppView.java:172)
at com.telstra.ctawa.apps.AddWorkAppView.wdDoInit(AddWorkAppView.java:101)
at com.telstra.ctawa.apps.wdp.InternalAddWorkAppView.wdDoInit(InternalAddWorkAppView.java:172)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:274)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:540)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:422)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:130)
at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:43)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:540)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:422)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:130)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doOpen(WebDynproWindow.java:198)
at com.sap.tc.webdynpro.clientserver.window.InternalWindow.open(InternalWindow.java:45)
at com.telstra.ctawa.apps.TaskListView.onActionAddWork(TaskListView.java:402)
at com.telstra.ctawa.apps.wdp.InternalTaskListView.wdInvokeEventHandler(InternalTaskListView.java:369)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleAction(WebDynproMainTask.java:100)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:299)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:635)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:249)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:55)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
Regards
PrakashHi Rohit,
public void executeZct_Wd_Demcat_Details_Input( java.lang.String indicator )
//@@begin executeZct_Wd_Demcat_Details_Input()
//$$begin Service Controller(145786950)
if(indicator.equals("CNTR"))
wdContext.nodeTemp_DemCat().invalidate();
if(indicator.equals("CNTR") || indicator.equals("DEMCAT"))
wdContext.nodeTemp_WorkType().invalidate();
if(indicator.equals("CNTR") || indicator.equals("DEMCAT") || indicator.equals("WRKTYP"))
wdContext.nodeTemp_ProdSkill().invalidate();
if(indicator.equals("CNTR") || indicator.equals("DEMCAT") || indicator.equals("WRKTYP") || indicator.equals("PRDSK"))
wdContext.nodeTemp_CsgLoc().invalidate();
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try{
String contractType = wdContext.currentContextElement().getContractType();
String demCat = wdContext.currentContextElement().getDemcat();
String wrkType = wdContext.currentContextElement().getWorktype();
String prodSkill = wdContext.currentContextElement().getProdskill();
String csgLoc = wdContext.currentContextElement().getCsgcat();
//setting all to null first
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Contract_Type("");
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Demand_Cat("");
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Work_Type("");
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Product_Skill("");
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Csg_Loc("");
//wdContext.currentContextElement().get
if(indicator.equals("CNTR")){
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Contract_Type(contractType);
if(indicator.equals("DEMCAT")){
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Contract_Type(contractType);
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Demand_Cat(demCat);
wdContext.currentContextElement().setProdskill("");
wdContext.currentContextElement().setWorktype("");
wdContext.currentContextElement().setCsgcat("");
wdContext.currentContextElement().setPoints(new BigDecimal("0.00"));
if(indicator.equals("PRDSK")){
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Contract_Type(contractType);
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Demand_Cat(demCat);
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Product_Skill(prodSkill);
wdContext.currentContextElement().setWorktype("");
wdContext.currentContextElement().setCsgcat("");
wdContext.currentContextElement().setPoints(new BigDecimal("0.00"));
if(indicator.equals("WRKTYP")){
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Contract_Type(contractType);
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Demand_Cat(demCat);
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Product_Skill(prodSkill);
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Work_Type(wrkType);
wdContext.currentContextElement().setCsgcat("");
wdContext.currentContextElement().setPoints(new BigDecimal("0.00"));
if(indicator.equals("CSGCT")){
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Contract_Type(contractType);
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Demand_Cat(demCat);
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Work_Type(wrkType);
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Product_Skill(prodSkill);
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Csg_Loc(csgLoc);
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Task_Complte(new Date(System.currentTimeMillis()));
wdContext.currentZct_Wd_Demcat_Details_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
if(indicator.equals("CNTR")){
//copy data from CSG_DEM_CAT to nodeTempDemCat
for(int i=0;i<wdContext.nodeDem_Cat_Output().size();i++){
IPublicAddWorkCustomController.ITemp_DemCatElement demCatElem = wdContext.createTemp_DemCatElement();
WDCopyService.copyCorresponding(wdContext.nodeDem_Cat_Output().getDem_Cat_OutputElementAt(i) ,demCatElem);
wdContext.nodeTemp_DemCat().addElement(demCatElem);
IPublicAddWorkCustomController.ITemp_DemCatElement demCatElem = wdContext.createTemp_DemCatElement();
demCatElem.setDemand_Cat("Select");
wdContext.nodeTemp_DemCat().addElement(demCatElem);
wdContext.currentContextElement().setDemcat("Select");
if(indicator.equals("DEMCAT")){
for(int i=0;i<wdContext.nodeProduct_Skill_Output().size();i++){
IPublicAddWorkCustomController.ITemp_ProdSkillElement prdSkillElem = wdContext.createTemp_ProdSkillElement();
WDCopyService.copyCorresponding(wdContext.nodeProduct_Skill_Output().getProduct_Skill_OutputElementAt(i) ,prdSkillElem);
wdContext.nodeTemp_ProdSkill().addElement(prdSkillElem);
IPublicAddWorkCustomController.ITemp_ProdSkillElement prdSkillElem = wdContext.createTemp_ProdSkillElement();
prdSkillElem.setProduct_Skill("Select");
wdContext.nodeTemp_ProdSkill().addElement(prdSkillElem);
wdContext.currentContextElement().setProdskill("Select");
if(indicator.equals("WRKTYP")){
//copy data from CSG_LOC to nodeCsgloc
for(int i=0;i<wdContext.nodeCsg_Cat_Output().size();i++){
IPublicAddWorkCustomController.ITemp_CsgLocElement csgLocElem = wdContext.createTemp_CsgLocElement();
WDCopyService.copyCorresponding(wdContext.nodeCsg_Cat_Output().getCsg_Cat_OutputElementAt(i) ,csgLocElem);
wdContext.nodeTemp_CsgLoc().addElement(csgLocElem);
IPublicAddWorkCustomController.ITemp_CsgLocElement csgLocElem = wdContext.createTemp_CsgLocElement();
csgLocElem.setCsg_Loc("Select");
wdContext.nodeTemp_CsgLoc().addElement(csgLocElem);
wdContext.currentContextElement().setCsgcat("Select");
if(indicator.equals("PRDSK")){
//copy data from WRK_TYPE to nodeTempWrkTyp
for(int i=0;i<wdContext.nodeWork_Type_Output().size();i++){
IPublicAddWorkCustomController.ITemp_WorkTypeElement wrkTypElem = wdContext.createTemp_WorkTypeElement();
WDCopyService.copyCorresponding(wdContext.nodeWork_Type_Output().getWork_Type_OutputElementAt(i) ,wrkTypElem);
wdContext.nodeTemp_WorkType().addElement(wrkTypElem);
IPublicAddWorkCustomController.ITemp_WorkTypeElement wrkTypElem = wdContext.createTemp_WorkTypeElement();
wrkTypElem.setWork_Type("Select");
wdContext.nodeTemp_WorkType().addElement(wrkTypElem);
wdContext.currentContextElement().setWorktype("Select");
if(indicator.equals("CSGCT")){
BigDecimal points = wdContext.currentOutputElement().getPay_Points();
if(points.equals(new BigDecimal("0")))
wdContext.currentContextElement().setChkPointsInp(false);
else{
wdContext.currentContextElement().setChkPointsInp(true);
wdContext.currentContextElement().setPoints(wdContext.currentOutputElement().getPay_Points());
ISimpleTypeModifiable demCatSimpleType = wdThis.wdGetAPI().getContext().getModifiableTypeOf("demcat");
IModifiableSimpleValueSet demCatList = demCatSimpleType.getSVServices().getModifiableSimpleValueSet();
//wdContext.nodeDem_Cat_Output()
for(int i = 0 ;i < wdContext.nodeTemp_DemCat().size();i++){
String demCatListElem = wdContext.nodeTemp_DemCat().getTemp_DemCatElementAt(i).getDemand_Cat();
demCatList.put(demCatListElem, demCatListElem);
ISimpleTypeModifiable wrkTypSimpleType = wdThis.wdGetAPI().getContext().getModifiableTypeOf("worktype");
IModifiableSimpleValueSet wrkTypList = wrkTypSimpleType.getSVServices().getModifiableSimpleValueSet();
//wdContext.nodeDem_Cat_Output()
wrkTypList.clear();
for(int i = 0 ;i < wdContext.nodeTemp_WorkType().size();i++){
String wrkTypListElem = wdContext.nodeTemp_WorkType().getTemp_WorkTypeElementAt(i).getWork_Type();
wrkTypList.put(wrkTypListElem, wrkTypListElem);
}//for
ISimpleTypeModifiable prodSkillSimpleType = wdThis.wdGetAPI().getContext().getModifiableTypeOf("prodskill");
IModifiableSimpleValueSet prodSkillList = prodSkillSimpleType.getSVServices().getModifiableSimpleValueSet();
prodSkillList.clear();
//wdContext.nodeDem_Cat_Output()
for(int i = 0 ;i < wdContext.nodeTemp_ProdSkill().size();i++){
String prodSkillListElem = wdContext.nodeTemp_ProdSkill().getTemp_ProdSkillElementAt(i).getProduct_Skill();
prodSkillList.put(prodSkillListElem, prodSkillListElem);
ISimpleTypeModifiable csgCatSimpleType = wdThis.wdGetAPI().getContext().getModifiableTypeOf("csgcat");
IModifiableSimpleValueSet csgCatList = csgCatSimpleType.getSVServices().getModifiableSimpleValueSet();
csgCatList.clear();
//wdContext.nodeDem_Cat_Output()
for(int i = 0 ;i < wdContext.nodeTemp_CsgLoc().size();i++){
String csgCatListElem = wdContext.nodeTemp_CsgLoc().getTemp_CsgLocElementAt(i).getCsg_Loc();
csgCatList.put(csgCatListElem, csgCatListElem);
} catch(WDDynamicRFCExecuteException ce) {
manager.reportException(ce.getMessage(), false);
//$$end
//@@end
this line
wdContext.currentZct_Wd_Demcat_Details_InputElement().setI_Task_Complte(new Date(System.currentTimeMillis()));
before the modelobject is executed is giving error.
Regards
Prakash -
Optional Parameter in Java.
Hi all,
I am new to java programming... I just wanted to know if we can have Optional parameter in java?. I searched few threads but not found any good result. Few suggested a overloaded method ,i think if it is not provided then there must be a big reason for that. Please let me know if anybody knows exact reason why it is not provied. I am using ver 1.4
~Amod .class A{
String a;
String b;
String c;
public A(String a, String b, String c){
this.a=a;
this.b=b;
this.c=c;
public A(String a, String b){
this.a=a;
this.b=b;
//String c will get a default value when this constructors get called
public static void main(String args[]){
A test = new A("a","b","c");
System.out.println(test.a);
System.out.println(test.b);
System.out.println(test.c);
System.out.println("-------");
A test_ = new A("a","b");
System.out.println(test_.a);
System.out.println(test_.b);
System.out.println(test_.c);
}Is that what you want? -
How to get the selection parameter values to Posting logic method
How can i read the selection parameter values at " posting logic" method, which are given in " Select Option function module"?
max bianchi wrote:
Hi
>
> The selection-screen data are stored in ABAP memory, so it need to clear it .
>
> Now how set ID parameter can depend on SAP release, anyway in ECC 6 this should work:
>
>
INITIALIZATION.
> DATA: BEGIN OF MEMKEY,
> REPORT TYPE SY-REPID VALUE SY-REPID,
> VARIANT TYPE RSVAR-VARIANT,
> INT_MODE(2) TYPE N,
> KIND(1) TYPE C,
> END OF MEMKEY.
>
> SYSTEM-CALL INTERNAL MODE INTO MEMKEY-INT_MODE.
> FREE MEMORY ID MEMKEY.
>
> But in this way it'll clea whole selection-screen...do you wnat do it?
>
> Max
@Max : The above hack seem to work fine unless you assign a 'DEFAULT' value to the selection fields.
@OP : Here is an other work around, however, this approach needs an additional effort to create
new PF-STATUS('MYLIST') and assign a function code of your choice to the function keys in the standard toolbar and handle them in the 'AT USER-COMMAND' event as shown below. Let us know if you have/find any issues with this.
PARAMETERS:
p_test TYPE char5 DEFAULT '123'.
AT USER-COMMAND.
CASE syst-ucomm.
WHEN 'MBACK'.
SUBMIT zytest WITH p_test = '' VIA SELECTION-SCREEN.
ENDCASE.
START-OF-SELECTION.
SET PF-STATUS 'MYLIST'.
-Rajesh. -
Attempt to set a parameter name that does not occur in the SQL: vc_temp_1
I have query view object build on the following sql
select
nvl(u.full_name,e.arabic_first_name||' '||e.arabic_family_name) as empName,
(select sc.general_specialty from ta_scientific_certificate sc where sc.user_id=u.user_id
group by sc.general_specialty
Having Max(sc.qualification_kind)>= All (select max(sc1.qualification_kind) from ta_scientific_certificate sc1 where sc1.user_id=u.user_id group by sc1.qualification_kind ) )as general_specialty
, u.*,ur.default_role,ur.role_1,ur.role_2,ur.role_3,ur.role_4,ur.role_5,ur.role_6,ur.role_7
from ta_user u,employee e,TA_USER_ROLES ur
where u.account_enabled='1' and u.emp_id = e.empl_code(+) and ur.user_id=u.user_id(+)
with this query
( (EMP_ID IS NULL ) ) AND (( ( (DEFAULT_ROLE = 4 ) ) OR ( (DEFAULT_ROLE = 6 ) ) )OR( ( (ROLE_1 = 4 ) ) OR ( (ROLE_1 = 6 ) ) )OR( ( (ROLE_2 = 4 ) ) OR ( (ROLE_2 = 6 ) ) )OR( ( (ROLE_3 = 4 ) ) OR ( (ROLE_3 = 6 ) ) )OR( ( (ROLE_4 = 4 ) ) OR ( (ROLE_4 = 6 ) ) )OR( ( (ROLE_5 = 4 ) ) OR ( (ROLE_5 = 6 ) ) )OR( ( (ROLE_6 = 4 ) ) OR ( (ROLE_6 = 6 ) ) )OR( ( (ROLE_7 = 4 ) ) OR ( (ROLE_7 = 6 ) ) ))
I created search page by dragging this view object from MyApplicationModule->NamedCriteria
but i don't want to show all the fields that their names start with ROLE in my search option so I unChecked the attribute queryalbe
no when I press button search the error Attempt to set a parameter name that does not occur in the SQL: vc_temp_1 is shown
if i press OK on error message and click search again it works
how can I make this error disappearno I don't think that i have
this is my source ( I will divide it into two parts)
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
<!---->
<ViewObject
xmlns="http://xmlns.oracle.com/bc4j"
Name="SciQualMgtVO"
Version="11.1.2.60.17"
OrderBy='"EMPNAME"'
BindingStyle="OracleName"
CustomQuery="true"
PageIterMode="Full"
UseGlueCode="false">
<DesignTime>
<Attr Name="_isExpertMode" Value="true"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO_LABEL"/>
</SchemaBasedProperties>
</Properties>
<ViewAccessor
Name="LookupAM_IpaCodesVO_GeneralSpecialityVA"
ViewObjectName="ta.common.lookup.IpaCodesVO"
AMUsageName="LookupAM"
ViewInstanceName="IpaCodesVO_GeneralSpecialityDC"
RowLevelBinds="true"/>
<ViewAccessor
Name="CountryVA"
ViewObjectName="ta.common.lookup.CountryVO"
RowLevelBinds="true"/>
<ViewAccessor
Name="DegreeVA"
ViewObjectName="ta.common.lookup.DegreeVO"
RowLevelBinds="true"/>
<ViewAccessor
Name="LookupAM_IpaCodesVO_ScientificQualificationVA"
ViewObjectName="ta.common.lookup.IpaCodesVO"
AMUsageName="LookupAM"
ViewInstanceName="IpaCodesVO_ScientificQualificationDC"
RowLevelBinds="true"/>
<ViewAccessor
Name="YesNoVA"
ViewObjectName="ta.common.constants.YesNoVO"
RowLevelBinds="true"/>
<ViewAccessor
Name="IpaCodesVO_GeneralSpecialityVA"
ViewObjectName="ta.common.lookup.IpaCodesVO"
RowLevelBinds="true">
<ViewCriteriaUsage
Name="IpaCodesVO_GeneralSpecialityCriteria"
FullName="ta.common.lookup.IpaCodesVO.IpaCodesVO_GeneralSpecialityCriteria"/>
</ViewAccessor>
<ViewAccessor
Name="IpaCodesVO_ScientificQualificationVA"
ViewObjectName="ta.common.lookup.IpaCodesVO"
AMUsageName="LookupAM"
ViewInstanceName="IpaCodesVO_ScientificQualificationDC"
RowLevelBinds="true">
<ViewCriteriaUsage
Name="IpaCodesVO_ScientificQualificationCriteria"
FullName="ta.common.lookup.IpaCodesVO.IpaCodesVO_ScientificQualificationCriteria"/>
</ViewAccessor>
<ListBinding
Name="ar_LOV_GeneralSpecialty"
ListVOName="IpaCodesVO_GeneralSpecialityVA"
ListRangeSize="-1"
NullValueFlag="start"
NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="GeneralSpecialty"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="Code"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="ArabicDescription"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<ListBinding
Name="en_LOV_GeneralSpecialty"
ListVOName="IpaCodesVO_GeneralSpecialityVA"
ListRangeSize="-1"
NullValueFlag="start"
NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="GeneralSpecialty"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="Code"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="EnglishDescription"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<ListBinding
Name="ar_male_LOV_Nationality"
ListVOName="CountryVA"
ListRangeSize="-1"
NullValueFlag="start"
NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="Nationality"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="CountryCode"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="MaleNational"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<ListBinding
Name="ar_female_LOV_Nationality"
ListVOName="CountryVA"
ListRangeSize="-1"
NullValueFlag="start"
NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="Nationality"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="CountryCode"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="FemaleNational"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<ListBinding
Name="en_LOV_Nationality"
ListVOName="CountryVA"
ListRangeSize="-1"
NullValueFlag="start"
NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="Nationality"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="CountryCode"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="EnglishNational"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<ListBinding
Name="ar_LOV_ScientificDegree"
ListVOName="IpaCodesVO_ScientificQualificationVA"
ListRangeSize="-1"
NullValueFlag="start"
NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="ScientificDegree"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="Code"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="ArabicDescription"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<ListBinding
Name="en_LOV_ScientificDegree"
ListVOName="IpaCodesVO_ScientificQualificationVA"
ListRangeSize="-1"
NullValueFlag="start"
NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="ScientificDegree"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="Code"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="EnglishDescription"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<ListBinding
Name="en_LOV_ScientificQualification"
ListVOName="DegreeVA"
ListRangeSize="-1"
NullValueFlag="start"
NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="ScientificQualification"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="DegreeCode"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="EnglishName"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<ListBinding
Name="ar_LOV_Country"
ListVOName="CountryVA"
ListRangeSize="-1"
NullValueFlag="start"
NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="Country"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="CountryCode"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="ArabicName"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<ListBinding
Name="en_LOV_Country"
ListVOName="CountryVA"
ListRangeSize="-1"
NullValueFlag="start"
NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="Country"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="CountryCode"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="EnglishName"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<ListBinding
Name="LOV_PastArbitration"
ListVOName="YesNoVA"
ListRangeSize="-1"
NullValueFlag="none"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="PastArbitration"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="Code"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="Name"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<ListBinding
Name="LOV_PastCooperation"
ListVOName="YesNoVA"
ListRangeSize="-1"
NullValueFlag="none"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="PastCooperation"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="Code"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="Name"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<ListBinding
Name="LOV_FutureCooperation"
ListVOName="YesNoVA"
ListRangeSize="-1"
NullValueFlag="none"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="FutureCooperation"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="Code"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="Name"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<ListBinding
Name="ar_LOV_ScientificQualification"
ListVOName="DegreeVA"
ListRangeSize="-1"
NullValueFlag="start"
NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="ScientificQualification"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="DegreeCode"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="ArabicName"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<SQLQuery><![CDATA[select
nvl(u.full_name,e.arabic_first_name||' '||e.arabic_family_name) as empName,
(select sc.general_specialty from ta_scientific_certificate sc where sc.user_id=u.user_id
group by sc.general_specialty
Having Max(sc.qualification_kind)>= All (select max(sc1.qualification_kind) from ta_scientific_certificate sc1 where sc1.user_id=u.user_id group by sc1.qualification_kind ) )as general_specialty
, u.*,ur.default_role,ur.role_1,ur.role_2,ur.role_3,ur.role_4,ur.role_5,ur.role_6,ur.role_7
from ta_user u,employee e,TA_USER_ROLES ur
where u.account_enabled='1' and u.emp_id = e.empl_code(+) and ur.user_id=u.user_id(+)]]></SQLQuery>
<ViewAttribute
Name="Empname"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="255"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="EMPNAME"
Expression="EMPNAME"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.Empname_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="GeneralSpecialty"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="20"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="GENERAL_SPECIALTY"
Expression="GENERAL_SPECIALTY"
SQLType="VARCHAR"
LOVName="ar_LOV_GeneralSpecialty"
LOVFinder="GeneralSpecialtySwitcher">
<DesignTime>
<Attr Name="_DisplaySize" Value="20"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<CONTROLTYPE
Value="choice"/>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.GeneralSpecialty_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="UserId"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Type="java.lang.Integer"
ColumnType="NUMBER"
AliasName="USER_ID"
Expression="USER_ID"
SQLType="INTEGER"/>
<ViewAttribute
Name="FullName"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="50"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="FULL_NAME"
Expression="FULL_NAME"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.FullName_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="FullNameEn"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="50"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="FULL_NAME_EN"
Expression="FULL_NAME_EN"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.FullNameEn_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="TitleSalutation"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="20"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="TITLE_SALUTATION"
Expression="TITLE_SALUTATION"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="20"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.TitleSalutation_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="Nationality"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="3"
Scale="0"
Type="java.lang.Integer"
ColumnType="NUMBER"
AliasName="NATIONALITY"
Expression="NATIONALITY"
SQLType="INTEGER"
LOVName="ar_male_LOV_Nationality"
LOVFinder="NationalitySwitcher">
<Properties>
<SchemaBasedProperties>
<CONTROLTYPE
Value="choice"/>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.Nationality_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="Gender"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="1"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="GENDER"
Expression="GENDER"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="1"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.Gender_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="Employer"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="100"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="EMPLOYER"
Expression="EMPLOYER"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="100"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.Employer_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="CurrentJob"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="50"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="CURRENT_JOB"
Expression="CURRENT_JOB"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.CurrentJob_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="Degree"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="50"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="DEGREE"
Expression="DEGREE"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.Degree_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="Department"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="50"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="DEPARTMENT"
Expression="DEPARTMENT"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.Department_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="ScientificDegree"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="4"
Scale="0"
Type="java.lang.Integer"
ColumnType="NUMBER"
AliasName="SCIENTIFIC_DEGREE"
Expression="SCIENTIFIC_DEGREE"
SQLType="INTEGER"
LOVName="ar_LOV_ScientificDegree"
LOVFinder="ScientificDegreeSwitcher">
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.ScientificDegree_LABEL"/>
<CONTROLTYPE
Value="choice"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="ScientificQualification"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="20"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="SCIENTIFIC_QUALIFICATION"
Expression="SCIENTIFIC_QUALIFICATION"
SQLType="VARCHAR"
LOVName="ar_LOV_ScientificQualification"
LOVFinder="ScientificQualificationSwitcher">
<DesignTime>
<Attr Name="_DisplaySize" Value="20"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.ScientificQualification_LABEL"/>
<CONTROLTYPE
Value="choice"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="Country"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="3"
Scale="0"
Type="java.lang.Integer"
ColumnType="NUMBER"
AliasName="COUNTRY"
Expression="COUNTRY"
SQLType="INTEGER"
LOVName="ar_LOV_Country"
LOVFinder="CountrySwitcher">
<Properties>
<SchemaBasedProperties>
<CONTROLTYPE
Value="choice"/>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.Country_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="City"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="50"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="CITY"
Expression="CITY"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.City_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="ZipCode"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="20"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="ZIP_CODE"
Expression="ZIP_CODE"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="20"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.ZipCode_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="POBox"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="20"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="P_O_BOX"
Expression="P_O_BOX"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="20"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.POBox_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="CurrentAddress"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="100"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="CURRENT_ADDRESS"
Expression="CURRENT_ADDRESS"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="100"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.CurrentAddress_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="WorkPhone"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="50"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="WORK_PHONE"
Expression="WORK_PHONE"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.WorkPhone_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="HomePhone"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="50"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="HOME_PHONE"
Expression="HOME_PHONE"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.HomePhone_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="CellPhone"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="50"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="CELL_PHONE"
Expression="CELL_PHONE"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.CellPhone_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="Fax"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="50"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="FAX"
Expression="FAX"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.Fax_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="PermanentAddress"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="100"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="PERMANENT_ADDRESS"
Expression="PERMANENT_ADDRESS"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="100"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.PermanentAddress_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="Email"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="50"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="EMAIL"
Expression="EMAIL"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.Email_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="Password"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="50"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="PASSWORD"
Expression="PASSWORD"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="PastArbitration"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="1"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="PAST_ARBITRATION"
Expression="PAST_ARBITRATION"
SQLType="VARCHAR"
LOVName="LOV_PastArbitration">
<DesignTime>
<Attr Name="_DisplaySize" Value="1"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<CONTROLTYPE
Value="radio"/>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.PastArbitration_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="PastCooperation"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="1"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="PAST_COOPERATION"
Expression="PAST_COOPERATION"
SQLType="VARCHAR"
LOVName="LOV_PastCooperation">
<DesignTime>
<Attr Name="_DisplaySize" Value="1"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<CONTROLTYPE
Value="radio"/>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.PastCooperation_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="FutureCooperation"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="1"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="FUTURE_COOPERATION"
Expression="FUTURE_COOPERATION"
SQLType="VARCHAR"
LOVName="LOV_FutureCooperation">
<DesignTime>
<Attr Name="_DisplaySize" Value="1"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<CONTROLTYPE
Value="radio"/>
<LABEL
ResId="ta.model.ro.SciQualMgtVO.FutureCooperation_LABEL"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="EmpId"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="20"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="EMP_ID"
Expression="EMP_ID"
SQLType="VARCHAR"
IsQueriable="false">
<DesignTime>
<Attr Name="_DisplaySize" Value="20"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="LoginName"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="50"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="LOGIN_NAME"
Expression="LOGIN_NAME"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
</ViewAttribute> -
Set get parameter but free memory id is not working
Hi All,
I am using set get parameter to transfer data from one module to another .
But when i am trying to clear the memory id using Free memory id .
it is not doing that.
Does it work with import export.
What method i should use to clear this memory id ..
Thanks in advance
ANit gautamClears the memory:
SET PARAMETER ID pid FIELD space. -
Error : The value is not set for parameter number"
Hello All,
I am getting an error message when I tried modifying a program by adding a new ID column to a database table.
All DML is working except the Delete. So to look at the delete method, I am setting the parameter correctly as can be seen in the code belwo.
Can someone please take a quick look and let me know where I need to tweak the code further.
Thanks
Fm
The piece of code is given below.
/* File Modified */
/* EmailSetupDao.java
* Generated by the MDK DAO Code Generator
package com.harris.mercury.setups.standard.emailsetup;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;
import org.apache.log4j.Logger;
import com.harris.mercury.dao.CreateException;
import com.harris.mercury.dao.DAO;
import com.harris.mercury.dao.DataField;
import com.harris.mercury.dao.Holder;
import com.harris.mercury.dao.LocalResultProxy;
import com.harris.mercury.dao.RemoveException;
import com.harris.mercury.dao.ResultProxy;
import com.harris.mercury.system.DatabaseHelper;
import com.harris.mercury.system.database.dialect.Dialect;
* The EmailSetupDao class
public class EmailSetupDao implements DAO
protected static Logger logger = Logger.getLogger(EmailSetupDao.class);
/* This method is called by ResultProxies when they need
* the data they have retrieved in a ResultSet mapped
* to a holder.
public Holder createHolder(ResultSet rs) throws SQLException
EmailSetupHolder holder = new EmailSetupHolder(); // THE CODE GENERATOR NEEDS THIS VARIABLE
try
/* Assign the data into the new holder */
// $$START_CREATEHOLDER_CONVERSIONS
holder.setEmail_address( rs.getString("email_address") );
holder.setLogin_id( rs.getString("login_id") );
holder.setUser_name( rs.getString("user_name") );
holder.setSmtp( rs.getString("smtp") );
holder.setId(rs.getString("id") );
// $$END_CREATEHOLDER_CONVERSIONS
catch(SQLException sqle)
logger.error(sqle, sqle);
throw sqle;
return holder;
/* The findAll method returns a ResultProxy containing all the
* records in the pucemailr table, unless an extended where clause
* has been defined.
public ResultProxy findAll(Connection con) throws SQLException
LocalResultProxy result = null; // THE CODE GENERATOR NEEDS THIS VARIABLE
// $$START_ALLFIND
result = new LocalResultProxy(this,con, "select email_address, login_id, user_name, smtp, id from pucemailr"+makeOrderBy());
// $$END_ALLFIND
return result;
/* Inserts a record into the pucemailr table using a EmailSetupHolder.
* An exception is thrown if it is not sucessful.
public void insert(Connection con, EmailSetupHolder holder) throws CreateException
CreateException ce = null;
PreparedStatement ps = null; // THE CODE GENERATOR NEEDS THIS VARIABLE
try
// Insert into the data base
// $$START_INSERT_PS
ps = con.prepareStatement("insert into pucemailr (email_address, login_id, user_name, smtp) values(?, ?, ?, ?) ");
// $$END_INSERT_PS
/* Assign the variables in the holder to their corresponding
* indexes in the prepared statement
ps = assignPreparedStatementValues(ps, holder, true) ;
// Try the insert
ps.executeUpdate();
catch (SQLException se)
ce = new CreateException(se.getMessage());
catch (Exception ex)
ce = new CreateException(ex.getMessage());
} finally {
DatabaseHelper.close(ps);
// Throw exception if error occurred
if (ce != null) {
throw ce;
/* This method will update a pucemailr record using the
* supplied EmailSetupHolder. If an error occurs, an exception
* is thrown.
public void update(Connection con, EmailSetupHolder holder) throws Exception
RuntimeException re = null;
PreparedStatement ps = null; // THE CODE GENERATOR NEEDS THIS VARIABLE
try
// $$START_UPDATE_PS
ps = con.prepareStatement("update pucemailr set email_address=?, login_id=?, user_name=?,smtp=? where id=?");
// $$END_UPDATE_PS
/* Assign the variables in the holder to their corresponding
* indexes in the prepared statement
ps = assignPreparedStatementValues(ps, holder, false) ;
// Try the insert
int ret = ps.executeUpdate();
if (ret != 1)
re = new RuntimeException("Update failed on table pucemailr in EmailSetupDao");
catch (SQLException se)
re = new CreateException(se.getMessage());
catch (Exception ex)
re = new RuntimeException(ex.getMessage());
} finally {
DatabaseHelper.close(ps);
// Throw exception if error occurred
if (re != null) {
throw re;
/* Using the EmailSetupHolder, this method locates records in the pucemailr table.
* Null values found in the holder are not used in the search.
* An exception is thrown if an error occurs.
public ResultProxy find(Connection con, EmailSetupHolder holder) throws SQLException
// THE CODE GENERATOR NEEDS THESE VARIABLES
ResultProxy result = null;
int needAnd = 0;
StringBuffer selectStatement = new StringBuffer();
// $$START_FIND
selectStatement.append("select email_address, login_id, user_name, smtp, id from pucemailr ");
if(holder.getId() != null)
if ( needAnd > 0)
selectStatement.append(" and ");
else
selectStatement.append(" where ");
needAnd++;
selectStatement.append("id like ");
selectStatement.append("'"+ Dialect.getSafeDialect(con).escape(holder.getId())+"%'");
if(holder.getEmail_address() != null)
if ( needAnd > 0)
selectStatement.append(" and ");
else
selectStatement.append(" where ");
needAnd++;
selectStatement.append("email_address like ");
selectStatement.append("'"+ Dialect.getSafeDialect(con).escape(holder.getEmail_address())+"%'");
if(holder.getLogin_id() != null)
if ( needAnd > 0)
selectStatement.append(" and ");
else
selectStatement.append(" where ");
needAnd++;
selectStatement.append("login_id like ");
selectStatement.append("'"+ Dialect.getSafeDialect(con).escape(holder.getLogin_id())+"%'");
if(holder.getUser_name() != null)
if ( needAnd > 0)
selectStatement.append(" and ");
else
selectStatement.append(" where ");
needAnd++;
selectStatement.append("user_name like ");
selectStatement.append("'"+ Dialect.getSafeDialect(con).escape(holder.getUser_name())+"%'");
if(holder.getSmtp() != null)
if ( needAnd > 0)
selectStatement.append(" and ");
else
selectStatement.append(" where ");
needAnd++;
selectStatement.append("smtp like ");
selectStatement.append("'"+ Dialect.getSafeDialect(con).escape(holder.getSmtp())+"%'");
// $$END_FIND
result = new LocalResultProxy(this, con, selectStatement.toString()+makeOrderBy());
return result;
/* Creates an Order by clause */
public String makeOrderBy()
String result = "";
// $$START_ORDERBY
result = " order by smtp";
// $$END_ORDERBY
return result ;
/* This method deltes a single record that matches all the
* variables found in the EmailSetupHolder.
* An exception is thrown if an error occurs.
public void delete(Connection con, EmailSetupHolder holder) throws RemoveException
RemoveException re = null;
PreparedStatement ps = null; // THE CODE GENERATOR NEEDS THIS VARIABLE
boolean hasVars = false;
StringBuffer deleteSQL = new StringBuffer();
deleteSQL.append( "delete from pucemailr where " );
// $$START_DELETE_SQL
if (hasVars)
deleteSQL.append(" and ");
if (holder.getEmail_address() != null) {
deleteSQL.append("email_address=?") ;
} else {
deleteSQL.append("email_address is null");
hasVars = true;
if (hasVars)
deleteSQL.append(" and ");
if (holder.getLogin_id() != null) {
deleteSQL.append("login_id=?") ;
} else {
deleteSQL.append("login_id is null");
hasVars = true;
if (hasVars)
deleteSQL.append(" and ");
if (holder.getUser_name() != null) {
deleteSQL.append("user_name=?") ;
} else {
deleteSQL.append("user_name is null");
hasVars = true;
if (hasVars)
deleteSQL.append(" and ");
if (holder.getSmtp() != null) {
deleteSQL.append("smtp=?") ;
} else {
deleteSQL.append("smtp is null");
hasVars = true;
if (hasVars)
deleteSQL.append(" and ");
if (holder.getSmtp() != null) {
deleteSQL.append("id=?") ;
} else {
deleteSQL.append("id is null");
hasVars = true;
// $$END_DELETE_SQL
try
ps = con.prepareStatement(deleteSQL.toString());
/* Assign the variables in the holder to their corresponding
* indexes in the prepared statement
int index = 1 ;
// $$START_DELETE_VARS
/* if( holder.getEmail_address() != null) {
ps.setString(index, holder.getEmail_address() );
index ++;
if( holder.getLogin_id() != null) {
ps.setString(index, holder.getLogin_id() );
index ++;
if( holder.getUser_name() != null) {
ps.setString(index, holder.getUser_name() );
index ++;
if( holder.getSmtp() != null) {
ps.setString(index, holder.getSmtp() );
index ++;
if( holder.getId() != null) {
ps.setString(index, holder.getId() );
index ++;
// $$END_DELETE_VARS
// Try the insert
int ret = ps.executeUpdate();
if (ret != 1)
re = new RemoveException("Delete failed on table pucemailr in EmailSetupDao");
catch (SQLException se)
re = new RemoveException(se.getMessage());
catch (Exception ex) {
re = new RemoveException(ex.getMessage());
} finally {
DatabaseHelper.close(ps);
// Throw exception if error occurred
if (re != null)
throw re;
/* This method finds records in pucemailr table that match the
* supplied where clause.
* An exception is thrown if an error occurs.
public ResultProxy advancedFind(Connection con, String whereclause) throws SQLException
// THE CODE GENERATOR NEEDS THIS VARIABLE AND THE PARAMETER VARIABLE 'whereclause'
StringBuffer selectStatement = new StringBuffer();
// $$START_ADVANCEDFIND
selectStatement.append("select email_address, login_id, user_name, smtp, id from pucemailr ");
// $$END_ADVANCEDFIND
selectStatement.append(" where ");
selectStatement.append(whereclause);
return new LocalResultProxy(this,con, selectStatement.toString()+makeOrderBy());
/* This methods returns a Vector of DataField objects that
* map the columns in the pucemailr table for the
* advanced find Where Clause Generator in the client. The extended
* where clause will be applied if one exists for this DAO.
public Vector<DataField> getQueryFields() {
Vector<DataField> v = new Vector<DataField>() ; // THE CODE GENERATOR NEEDS THIS VARIABLE
// $$START_QUERYFIELDS
v.addElement( new DataField( "email_address", "Email address", DataField.STRING ) ) ;
v.addElement( new DataField( "login_id", "Login id", DataField.STRING ) ) ;
v.addElement( new DataField( "user_name", "User name", DataField.STRING ) ) ;
v.addElement( new DataField( "smtp", "Smtp", DataField.STRING ) ) ;
v.addElement( new DataField( "id", "Id", DataField.STRING ) ) ;
// $$END_QUERYFIELDS
return v;
* Jira Issue NS 30679 - Faiz Qureshi March 7, 2013
* @param ps
* @param holder
* @param isInsert - Added Boolean parameter so the id parameter does not get passed for Insert DML statements
* @return
* @throws Exception
public PreparedStatement assignPreparedStatementValues(PreparedStatement ps, EmailSetupHolder holder, boolean isInsert)
throws Exception
// $$START_PS_SETS
if( holder.getEmail_address() != null)
ps.setString(1, holder.getEmail_address() );
else
ps.setNull(1, java.sql.Types.VARCHAR);
if( holder.getLogin_id() != null)
ps.setString(2, holder.getLogin_id() );
else
ps.setNull(2, java.sql.Types.VARCHAR);
if( holder.getUser_name() != null)
ps.setString(3, holder.getUser_name() );
else
ps.setNull(3, java.sql.Types.VARCHAR);
if( holder.getSmtp() != null)
ps.setString(4, holder.getSmtp() );
else
ps.setNull(4, java.sql.Types.VARCHAR);
if (!isInsert){
if( holder.getId() != null)
ps.setString(5, holder.getId() );
else
ps.setNull(5, java.sql.Types.VARCHAR);
// $$END_PS_SETS
return ps;
/* Do not delete this tag, it is reserved for adding new methods to the DAO */
// $$ START_MDK_RESERVED
// $$START_EDITABLE_SUB_TABLE_NAME
* Returns the table names used in this DAO
* @return the table names used in this DAO
public String[] getTableNames() {
// $$START_UNEDITABLE_SUB_TABLE_NAME
String[] tableNames = new String[] {"pucemailr"};
// $$END_UNEDITABLE_SUB_TABLE_NAME
return tableNames;
// $$END_EDITABLE_SUB_TABLE_NAME
// $$START_EDITABLE_SUB_FIND
* Using the EmailSetupHolder, this method locates records in the pucemailr table.
* Null values found in the holder are not used in the search.
* An exception is thrown if an error occurs.
* @param con The database connection
* @param holder holder containing the values to generate a query upon
* @param orderBy The order by clause. Note, you must specify the "ORDER BY". If you forget to add a
* space in front of the order by, it will be automatically handled. Specify null to use the default
* or empty string for no ordering.
* @return The result of the search
* @throws SQLException if an error occurs in the search.
public ResultProxy find(Connection con, EmailSetupHolder holder, String orderBy) throws SQLException
// THE CODE GENERATOR NEEDS THESE VARIABLES
ResultProxy result = null;
int needAnd = 0;
StringBuffer selectStatement = new StringBuffer();
// $$START_FIND
selectStatement.append("select email_address, login_id, user_name, smtp, id from pucemailr ");
if(holder.getEmail_address() != null)
if ( needAnd > 0)
selectStatement.append(" and ");
else
selectStatement.append(" where ");
needAnd++;
selectStatement.append("email_address like ");
selectStatement.append("'"+ Dialect.getSafeDialect(con).escape(holder.getEmail_address())+"%'");
if(holder.getLogin_id() != null)
if ( needAnd > 0)
selectStatement.append(" and ");
else
selectStatement.append(" where ");
needAnd++;
selectStatement.append("login_id like ");
selectStatement.append("'"+ Dialect.getSafeDialect(con).escape(holder.getLogin_id())+"%'");
if(holder.getUser_name() != null)
if ( needAnd > 0)
selectStatement.append(" and ");
else
selectStatement.append(" where ");
needAnd++;
selectStatement.append("user_name like ");
selectStatement.append("'"+ Dialect.getSafeDialect(con).escape(holder.getUser_name())+"%'");
if(holder.getSmtp() != null)
if ( needAnd > 0)
selectStatement.append(" and ");
else
selectStatement.append(" where ");
needAnd++;
selectStatement.append("smtp like ");
selectStatement.append("'"+ Dialect.getSafeDialect(con).escape(holder.getSmtp())+"%'");
if(holder.getId() != null)
if ( needAnd > 0)
selectStatement.append(" and ");
else
selectStatement.append(" where ");
needAnd++;
selectStatement.append("Id like ");
selectStatement.append("'"+ Dialect.getSafeDialect(con).escape(holder.getId())+"%'"); }
// $$END_FIND
result = new LocalResultProxy(this, con, selectStatement.toString() + (orderBy == null ? makeOrderBy() : com.harris.mercury.system.utils.StringUtils.padLeft(orderBy)));
return result;
// $$END_EDITABLE_SUB_FIND
// $$START_EDITABLE_SUB_FINDALL
* The findAll method returns a ResultProxy containing all the records in the pucemailr table,
* unless an extended where clause has been defined.
* @param con The database connection
* @param orderBy The order by clause. Note, you must specify the "ORDER BY". If you forget to add a
* space in front of the order by, it will be automatically handled. Specify null to use the default
* or empty string for no ordering.
* @return The result of the search
* @throws SQLException if an error occurs in the search.
public ResultProxy findAll(Connection con, String orderBy) throws SQLException
LocalResultProxy result = null; // THE CODE GENERATOR NEEDS THIS VARIABLE
// $$START_UNEDITABLE_SUB_FINDALL
result = new LocalResultProxy(this,con, "select email_address, login_id, user_name, smtp, id from pucemailr" + (orderBy == null ? makeOrderBy() : com.harris.mercury.system.utils.StringUtils.padLeft(orderBy)));
// $$END_UNEDITABLE_SUB_FINDALL
return result;
// $$END_EDITABLE_SUB_FINDALL
// $$START_EDITABLE_SUB_ADVANCEDFIND
* This method finds records in pucemailr table that match the supplied where clause.
* @param con The database connection
* @param whereclause The where clause for the select statement - do not include the "where" - it
* will be automatically prepended
* @param orderBy The order by clause. Note, you must specify the "ORDER BY". If you forget to add a
* space in front of the order by, it will be automatically handled. Specify null to use the default
* or empty string for no ordering.
* @return The result of the search
* @throws SQLException if an error occurs in the search.
public ResultProxy advancedFind(Connection con, String whereclause, String orderBy) throws SQLException
// THE CODE GENERATOR NEEDS THIS VARIABLE AND THE PARAMETER VARIABLE 'whereclause'
StringBuffer selectStatement = new StringBuffer();
// $$START_ADVANCEDFIND
selectStatement.append("select email_address, login_id, user_name, smtp, id from pucemailr ");
// $$END_ADVANCEDFIND
selectStatement.append(" where ");
selectStatement.append(whereclause);
selectStatement.append((orderBy == null ? makeOrderBy() : com.harris.mercury.system.utils.StringUtils.padLeft(orderBy)));
return new LocalResultProxy(this,con, selectStatement.toString());
// $$END_EDITABLE_SUB_ADVANCEDFIND
// $$ END_MDK_RESERVED
}First thing to do is to edit the post and use some tags to format the code as it is unreadable and too much!
Read the FAQ (https://forums.oracle.com/forums/help.jspa) to find out how to do this.
Next we need to know the jdev version you are using!
As the code is generated I would first try to generate it again after the db change.
Timo -
CR 2008 - Optional parameter prompts
Hi!
I sometimes use Optional parameter prompts in Crystal Reports 2008.
The main reason is to minimise user input in Selection Criteria Screen.
I have many subreports, and not all prompts are needed for all subreports.
If the user leaves the prompt blank, then a formula will set a default value for the user.
I usually put the optional prompt at the top, so that user needs only fill prompts at the bottom.
Here is an example:
I have a parameter field called "PreferredSortOrder"
The Edit screen reads as follows:
Type: String
List of Values: Static
Value:
Original Order
Description
Value Options:
Show on (Viewer) Panel : Read Only
Prompt Text : Preferred Sort Order [Optional]
Prompt With Description Only : True
Optional Prompt : True
Default Value :
Allow custom values : False
Allow multiple values : False
Allow discrete values : True
Allow range values : False
Min Length :
Max Length :
Edit Mask :
Show value or Description : Show Value
My report works perfectly, even if I leave the parameter field blank
I now add another parameter field called "WhichWarehouse"
with exactly the same values as above.
When I run the Crystal Report, I get this message;
Error running Crystal Reports
The report runs only if I type a value in the "WhichWarehouse" prompt
(The "PreferredSortOrder" prompt remains blank)
I did exactly the same as before. Why does the 2nd optional parameter not work like the first?
What has gone wrong?
Thank you
Leon Lai
JUST ADDED
I just noticed that in the Field Explorer,
(a) There is a green TICK near the parameter PreferredSortOrder
(b) But no green Tick neat the parameter "WhichWarehouse"
What does the green tick mean?
Could this be the key to the mystery?Hi Leon,
No green tick means that the prompt has Not been used in the report.
If the report has Subreports, and if the subreport also has a 'warehouse' prompt then it could be this prompt that is causing the issue. You should link both the warehouse prompts to make sure you're only prompted once.
-Abhilash -
Missing Parameter Values CR2008 Optional Parameter
Hi,
I am getting "Missing Parameter Values" error
"CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException: Fehlende Parameterwerte. ---> System.Runtime.InteropServices.COMException (0x8004100E)"
if I try to export a Report with an optional Parameter without setting the parametervalue.
The Report works fine with ReportViewer.
If I uncomment the "Parameterpart" and set a parametervalue it works fine, but it should works without a parametervalue too, its optional.
I have tried many for a long time and read many Websites but it does not work !
I use WinXP SP2 CR2008 with C# .NET 2.0 VS2005
CrystalDecisions.CrystalReports.Engine.dll version 12.0.2000.683 Date: 2008-03-01
CrystalDecisions.Shared.dll version 12.0.2000.683 Date: 2008-03-01
Sorry my English is very Bad !
Thanks a lot!
ExportFormatType ExportType = ExportFormatType.PortableDocFormat;
ReportDocument RD = new ReportDocument();
RD.Load("C:\\ParaTest01.rpt");
string strServer = "<ServerName>";
string strDB = "<DBName>";
string strUser = "<UserID>";
string strPW = "<PW>";
RD.SetDatabaseLogon(strUser, strPW, strServer, strDB);
//ParameterFieldDefinitions crParameterFieldDefinitions = RD.DataDefinition.ParameterFields;
//ParameterFieldDefinition crParameter1 = crParameterFieldDefinitions[0];
//ParameterValues crParameter1Values = crParameter1.CurrentValues;
//ParameterDiscreteValue crDiscrete1Value = new ParameterDiscreteValue();
//crDiscrete1Value.Value = "GER";
//crParameter1Values.Add(crDiscrete1Value);
//crParameter1.ApplyCurrentValues(crParameter1Values);
RD.ExportToDisk(ExportType, "C:\\Test2.pdf");
RecordSelectionFormula in Report:
(not HasValue({?Land}) OR {tab.location_code} = {?Land}) and
{tab.sup} = "XXX" and
{tab.Accounting_Period} = "200801"You need to be careful when using optional parameters. If you are using the optional parameter in a record selection formula you'll need to check and make sure it has a value before you use it. There is a function call HasValue() that you can use to do this.
If you have an optional parameter in the record selection formula and you don't pass a value you'll need to make sure your selection formula can be completed with out it.
This is an excerpt from our help file.
Crystal Reports supports optional parameters. An optional parameter is a prompted value that does not have to be supplied by the user.
Report designers should provide some guidance to the end user that a parameter is optional by adding this information to the prompt text.
Optional parameters are treated by Crystal Reports as optional anywhere within the report that they are used. You cannot set one instance of the parameter to optional and another to mandatory.
Note: After you set a parameter to optional, if you use the Select Expert, the system will automatically add the selection formula for you using the HasValue() function.
The Formula Workshop Editor does not automatically add the formula. Only the Select Expert automatically adds the formula for you.
If you change the parameter from optional to mandatory, the HasValue() function is not automatically removed from your formula.
Handling a parameter with no value
When the report engine evaluates any formula which references an optional parameter that does not have a value, it generates a runtime error. All formulas that reference an optional parameter should first use the HasValue() function to check if that parameter has a value before evaluating it. This includes record selection formulas and saved data formulas.
Note: The system will not automatically drop a statement from the SQL WHERE clause. It is the report designeru2019s responsibility to decide which statement to leave out based on HasValue() testing.
Maybe you are looking for
-
Hi, I have 2 BTF in my Security-Enabled ADF application. First BTF has a Task Flow Call to another BTF. I then created 2 web pages for each BTF. Page A for first BTF and B for second BTF. If I open any page, it ask for Authentication and display the
-
Query not able to Retrieve Summary Level Member
Dear all, I have created a Planning application on BPC Netweaver 10.0. I am trying to retrieve the Planning Data via BEx Query in Dashboard. My Account dimension is hierarchical and I want the dashboard users to be able to select summary account when
-
Hi everyone, Anyone know if is it possible to load transaction data from ECC (FI, CO, HR, MM...) to BPC 10 directly? There is a documment titled "How to Implement Delta Loading of Transaction Data from ECC and BW 7.3 into BPC using Delta Initializati
-
I think I received a Firefox up date today. Now when I try to print from any page on the browser I get a blank page. Thinking I was having a computer problem I reluctantly booted Internet Explorer. No problem printing. I went to Thunderbird and have
-
Update Material Availability Date for Sales Order having a Delivery
Dear Gurus, We have a bit out of the way scenario. There is a o/b delivery already added to a shipment. And then we receive a IDOC from external MES System (i.e. Production) with new material availability date. This new material availability date is