title: Shiny: ProgressBar for loading the data from database to datatable (DT)
body: <p>i have not found the solution for my question about ProgressBar in Shiny for loading the data from database. My Shiny App is connected to database and the user directly gets the data from there (as my SQL Query is reactive, the amount of the data varies). Sometimes the data is quite big and loading it takes some time. The user does not know if something is going on or the app got "stuck". I implemented in my app (in <code>output$tabelle &lt;- DT::renderDataTable({</code>...) the easiest possible process indicator but it seems to not be enough:</p>
  
  <pre><code>progress &lt;- shiny::Progress$new()
  
          on.exit(progress$close())
  
          progress$set(message = "Processing", value = 0)
  </code></pre>
  
  <p>The user still gets bit confused.</p>
  
  <p>I would like to have smthg like this (<a href="https://stackoverflow.com/questions/4754996/showing-a-status-message-in-r?noredirect=1&amp;lq=1">showing a status message in R</a>) using <code>?tcltk::tkProgressBar</code>: </p>
  
  <p><a href="https://i.stack.imgur.com/NuCQ6.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NuCQ6.jpg" alt="enter image description here"></a></p>
  
  <pre><code>pb &lt;- tkProgressBar("test progress bar", "Some information in %",
          0, 100, 50)
  Sys.sleep(0.5)
  u &lt;- c(0, sort(runif(20, 0 ,100)), 100)
  for(i in u) {
      Sys.sleep(0.1)
      info &lt;- sprintf("%d%% done", round(i))
      setTkProgressBar(pb, i, sprintf("test (%s)", info), info)
  }
  Sys.sleep(5)
  close(pb)
  </code></pre>
  
  <p>with some percentage valuating the progress of data loading from database.</p>
  
  <p>I do not know how i can use it inside my shiny app. Any ideas will be helpful.</p>
  
  <p>Thanks in advance!</p>
  
  <p>*some simple app:</p>
  
  <pre><code>library("shiny")
  library("DT")
  shinyApp(
    ui = fluidPage(DT::dataTableOutput('tbl')),
    server = function(input, output) {
      output$tbl = DT::renderDataTable(
        iris)
    }
  )
  </code></pre>