Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

RptStatus

RptStatus( <bAcao>, [cTitulo], [cMsg] )

Displays a tracking dialog with a progress bar.

ReportsInterfaceProcessingProgress bar
01 · OVERVIEW

Overview

RptStatus() executes a code block inside a status window, allowing reports or long routines to be visually tracked. The bar is prepared with SetRegua() and incremented with IncRegua().

02 · SYNTAX

Syntax

RptStatus( <bAcao>, [cTitulo], [cMsg] )

Parameters

bAction
Code blockRequired

Block executed by the routine. It may receive a logical parameter indicating cancellation.

cTitle
CharacterOptional

Title shown in the window.

cMessage
CharacterOptional

Message shown below the progress bar.

03 · PRACTICAL EXAMPLE

Processing status

#Include "TOTVS.ch"

User Function ExRptStatus()
    Local bAcao := {|lFim| U_ProcessaRel(@lFim) }

    RptStatus(bAcao, "Relatório", "Preparando dados...")
Return
Expected result

The function opens a status window and executes the indicated block.

BEST PRACTICES
  • Use para rotinas cujo progresso precisa ser comunicado ao usuário.
  • Dentro do bloco, inicialize a régua com SetRegua().
  • Atualize a régua com IncRegua() a cada etapa concluída.
COMMON PITFALLS
  • Avoid overly generic messages; tell the user what is being processed.
  • If cancellation is available, handle the logical parameter before continuing.
  • As a historical API, validate visual compatibility in the SmartClient in use.

Related content

REFERENCES
  1. Help ADVPL.chm. Help AdvPL/APMSLib, documentação oficial histórica, 15 mar. 2004. Conteúdo resumido, reorganizado e marcado para revisão contra documentação atual da TOTVS quando disponível.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha