New Posts New Posts RSS Feed - modifying reports system parameters
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

modifying reports system parameters

 Post Reply Post Reply
Author
Terry View Drop Down
Groupie
Groupie


Joined: 18-November-2008
Location: United States
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Terry Quote  Post ReplyReply Direct Link To This Post Topic: modifying reports system parameters
    Posted: 18-November-2008 at 4:52pm
I am trying to modify a large number of reports thru the API.
 
I want to add a validation trigger on a given system parameter.
 
I can create the PL/SQL for the trigger as a program unit, say for example:
 
function COPIESValidTrigger return boolean is
begin
  if 1 = 1 then
    return (TRUE);
  end if;
end;
 
But I cannot set the program unit owner to be 'COPIES' nor can I set the COPIES validation trigger to be 'COPIESValidTrigger', either way results in
 
[Error]   „¡„§Exception [ReportsAPIException] - REP-0012:Property is read only!
 
Thanks in advance for any help on this.
Back to Top
administrator View Drop Down
Admin Group
Admin Group

Stefan Mueller

Joined: 25-January-2003
Location: New Zealand
Points: 1027
Post Options Post Options   Thanks (0) Thanks(0)   Quote administrator Quote  Post ReplyReply Direct Link To This Post Posted: 20-November-2008 at 12:22pm

Terry,

are you setting the D2RP_PGU_OWNER_OBJ ? This property should be enabled for writing and work.

... and also, don't forget to set the D2RP_PGU_TYPE to D2RC_PGTY_PARVALIDATION !

creating a program unit and then setting those two properties should work to get your parameter validated.

Regards,
Stefan

Back to Top
Yesid Ares View Drop Down
Groupie
Groupie


Joined: 19-June-2014
Location: Panamá
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Yesid Ares Quote  Post ReplyReply Direct Link To This Post Posted: 20-June-2014 at 1:20pm
Hola Administrador

Ya Pude Crear el Program Units y luego lo modifico, pero no se como asignárselo a User Parameters como validation trigger, ej el nombre es Empresa:
--Creo program units 
VTP: = RepGeneric_Create (NumReporte, lv_NombreValidaTrigger, D2RRO_PROG_UNIT);
-- Reemplazo el Programa units
RepAPI_SetPLSQL (VTP, Lv_String_Valida_Trigger); 
-- Lo reemplazo como validation trigger pero no se como asignarlo a Empresa
RepGeneric_SetNumProp (VTP, D2RP_PGU_TYPE, D2RC_PGTY_PARVALIDATION);
 

Yesid Ares
Back to Top
Yesid Ares View Drop Down
Groupie
Groupie


Joined: 19-June-2014
Location: Panamá
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Yesid Ares Quote  Post ReplyReply Direct Link To This Post Posted: 20-June-2014 at 1:43pm
Hola Administrador

Se me olvido decirle Que aqui reemplace el before de pero ahora quiero a un user parameters llamado Empresa como validation trigger

Rep Generic_SetNumProp (VTP, D2RP_PGU_TYPE, Empresa );
Yesid Ares
Back to Top
administrator View Drop Down
Admin Group
Admin Group

Stefan Mueller

Joined: 25-January-2003
Location: New Zealand
Points: 1027
Post Options Post Options   Thanks (0) Thanks(0)   Quote administrator Quote  Post ReplyReply Direct Link To This Post Posted: 25-June-2014 at 3:57am
Dear Yesid,

Adding the following lines should work:

    --get the datamodel
    VDM := RepGeneric_GetObjProp( NumReporte , D2RP_DATA_MODEL);
    --find the parameter
    VPAR := RepAPI_FindObj(vdm, 'P_TO_TRX_NUMBER', D2RRO_USER_PARAM);
   --set the owner of the program unit to the user-parameter it is to validate
   RepGeneric_SetObjProp( VTP, D2RP_PGU_OWNER_OBJ, VPAR);



the steps to create a validation trigger:

   - create or get the user-parameter
   - create a program unit
   - set program unit type  to D2RC_PGTY_PARVALIDATION
   - set the D2RP_PGU_OWNER_OBJ of the program unit to the user-parameter-object


Regards,
Stefan

Back to Top
Yesid Ares View Drop Down
Groupie
Groupie


Joined: 19-June-2014
Location: Panamá
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Yesid Ares Quote  Post ReplyReply Direct Link To This Post Posted: 25-June-2014 at 6:09am
Muchas gracias, Administrador.
Yesid Ares
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.