Histórico da Página
...
Bloco de código | ||||
---|---|---|---|---|
| ||||
#include "protheus.ch"
user Function callSV()
local lSuccess As logical
local jParams as json
local oSmartView as object
jParams := JsonObject():new()
jParams["parameters"] := Array(2)
jParams["force"] := .T. //Indica se força o valor
jParams["parameters"][1] := JsonObject():New()
jParams["parameters"][1]["name"] := "MV_PAR01"
jParams["parameters"][1]["value"] := ""
jParams["parameters"][1]["visibility"] := "Disabled"
jParams["parameters"][2] := JsonObject():New()
jParams["parameters"][2]["name"] := "MV_PAR02"
jParams["parameters"][2]["value"] := "ZZZZ"
jParams["parameters"][2]["visibility"] := "Disabled"
oSmartView := totvs.framework.smartview.callSmartView():new("framework.sv.framework.product.synt.rep.bra", "report")
oSmartView:setParameters(jParams)
lSuccess := oSmartView:executeSmartView(.T.)
If !lSuccess
Conout(oSmartView:getError())
EndIf
oSmartView:destroy()
return .T. |
Bloco de código | ||||
---|---|---|---|---|
| ||||
#include "protheus.ch"
user Function callMultiSV()
local lSuccess As logical
local oSmartView as object
oSmartView := totvs.framework.smartview.callSmartView():new("framework.sv.framework.product")
oSmartView:setParam("MV_PAR01", "")
oSmartView:setParam("MV_PAR02", "ZZZZZ")
oSmartView:setParam("MV_PAR03", 2)
oSmartView:setParam("MV_PAR04", totvs.framework.treports.date.dateToTimeStamp(date()))
lSuccess := oSmartView:executeSmartView(.T.)
If !lSuccess
Conout(oSmartView:getError())
EndIf
oSmartView:destroy()
return .T. |
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas