Linha 107: |
Linha 107: |
| | | |
| === GetFileChunk - Base64 do relatório gerado === | | === GetFileChunk - Base64 do relatório gerado === |
− | * A; | + | * A primeira coisa que precisamos fazer, é descobrir os parâmetros e/ou filtros que o relatório possui, e que teremos que preencher para realizar a geração do mesmo; |
| + | * Para isso, devemos utilizar o método '''GetReportInfo''', abrindo o mesmo na lista de métodos, e dando um duplo clique no item '''Request 1'''; |
| + | * Ao fazer isso, será exibida a tela com o exemplo de conteúdo que essa requisição espera receber; |
| + | * Devemos preencher: |
| + | :* '''codColigada''': Código da coligada a que o relatório pertence; |
| + | :* '''idReport''': Identificador do relatório que desejamos gerar; |
| + | * Agora basta clicar no botão '''Executar''' (3 - ícone do play), e sua requisição será enviada para o TBC; |
| + | * Após alguns segundos, será exibido o retorno de sua requisição (4); |
| + | * O que nos interessa desse retorno, são os itens '''<ArrayOfRptFilterReportPar>''' e '''<ArrayOfRptParameterReportPar>''', localizados dentro dos elementos '''<a:string>''', e que deverão set utilizados na geração do relatório; |
| :[[File:ClipCapIt-210104-153307.PNG]] | | :[[File:ClipCapIt-210104-153307.PNG]] |
− |
| |
− |
| |
− |
| |
− |
| |
− |
| |
− | <syntaxhighlight lang="javascript">
| |
− | http://sosl2p-prd-ws.totvscloud.com.br:16080/wsReport/mex?wsdl
| |
− |
| |
− | ###############################################################
| |
− |
| |
− | --GetReportInfo
| |
− |
| |
− | <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tot="http://www.totvs.com/">
| |
− | <soapenv:Header/>
| |
− | <soapenv:Body>
| |
− | <tot:GetReportInfo>
| |
− | <!--Optional:-->
| |
− | <tot:codColigada>7</tot:codColigada>
| |
− | <!--Optional:-->
| |
− | <tot:idReport>13894</tot:idReport>
| |
− | </tot:GetReportInfo>
| |
− | </soapenv:Body>
| |
− | </soapenv:Envelope>
| |
− |
| |
− | ###############################################################
| |
− |
| |
− | --GenerateReport
| |
− |
| |
− | <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tot="http://www.totvs.com/">
| |
− | <soapenv:Header/>
| |
− | <soapenv:Body>
| |
− | <tot:GenerateReport>
| |
− | <!--Optional:-->
| |
− | <tot:codColigada>7</tot:codColigada>
| |
− | <!--Optional:-->
| |
− | <tot:id>13894</tot:id>
| |
− | <!--Optional:-->
| |
− | <tot:filters><![CDATA[<?xml version="1.0" encoding="utf-16"?>
| |
− | <ArrayOfRptFilterReportPar xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.totvs.com.br/RM/">
| |
− | <RptFilterReportPar>
| |
− | <BandName>RptReport</BandName>
| |
− | <FiltersByTable>
| |
− | <RptFilterByTablePar>
| |
− | <Filter>PFUNC.CODCOLIGADA = 7 AND PFUNC.CHAPA = '00181'</Filter>
| |
− | <TableName>PFUNC</TableName>
| |
− | </RptFilterByTablePar>
| |
− | </FiltersByTable>
| |
− | <MainFilter>true</MainFilter>
| |
− | <Value>(PFUNC.CODCOLIGADA = 7 AND PFUNC.CHAPA = '00181')</Value>
| |
− | </RptFilterReportPar>
| |
− | </ArrayOfRptFilterReportPar>]]></tot:filters>
| |
− | <!--Optional:-->
| |
− | <tot:parameters><![CDATA[<?xml version="1.0" encoding="utf-16"?><ArrayOfRptParameterReportPar xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.totvs.com.br/RM/"></ArrayOfRptParameterReportPar>]]></tot:parameters>
| |
− | <!--Optional:-->
| |
− | <tot:fileName>123.pfd</tot:fileName>
| |
− | </tot:GenerateReport>
| |
− | </soapenv:Body>
| |
− | </soapenv:Envelope>
| |
− |
| |
− | ###############################################################
| |
− |
| |
− | --GetGeneratedReportSize
| |
− |
| |
− | <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tot="http://www.totvs.com/">
| |
− | <soapenv:Header/>
| |
− | <soapenv:Body>
| |
− | <tot:GetGeneratedReportSize>
| |
− | <!--Optional:-->
| |
− | <tot:guid>a6849258-8711-4ad4-a5a4-69ae54c8a6b4</tot:guid>
| |
− | </tot:GetGeneratedReportSize>
| |
− | </soapenv:Body>
| |
− | </soapenv:Envelope>
| |
− |
| |
− | ###############################################################
| |
− |
| |
− | --GetFileChunk
| |
− |
| |
− | <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tot="http://www.totvs.com/">
| |
− | <soapenv:Header/>
| |
− | <soapenv:Body>
| |
− | <tot:GetFileChunk>
| |
− | <!--Optional:-->
| |
− | <tot:guid>a6849258-8711-4ad4-a5a4-69ae54c8a6b4</tot:guid>
| |
− | <!--Optional:-->
| |
− | <tot:length>90576</tot:length>
| |
− | </tot:GetFileChunk>
| |
− | </soapenv:Body>
| |
− | </soapenv:Envelope>
| |
− |
| |
− | ###############################################################
| |
− |
| |
− | --GenerateReportAsynchronous
| |
− |
| |
− | ###############################################################
| |
− | </syntaxhighlight>
| |
| | | |
| | | |
| [[Categoria:CI]] | | [[Categoria:CI]] |