NetTalk Central

Author Topic: sending cached file only  (Read 2785 times)

walter.dasilva

  • Sr. Member
  • ****
  • Posts: 314
  • SOFTVALE
    • MSN Messenger - walter@softvale.com.br
    • View Profile
    • SOFTVALE
sending cached file only
« on: May 15, 2012, 04:59:20 AM »
Hi Bruce,

my war to create a pdf from frb and sending it to client is hard. i´ve changed some things:

. create a NetWebPage to send PDF after it be created by FRB that is called from precessed code embed;
. so, the first time it´s ok, but if i change parameters to print another report it still sending the first one;
. the BROWSE CAN CACHE FILE is unchecked

what´s happen?
thanks
Walter - SOFTVALE

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: sending cached file only
« Reply #1 on: May 15, 2012, 07:29:50 AM »
In the page, before the call to p_web._sendfile
set
p_web.ForceNoCache = 1

Cheers
Bruce

walter.dasilva

  • Sr. Member
  • ****
  • Posts: 314
  • SOFTVALE
    • MSN Messenger - walter@softvale.com.br
    • View Profile
    • SOFTVALE
Re: sending cached file only
« Reply #2 on: May 15, 2012, 10:05:17 AM »
Yes Bruce,

I´m using this code:

    if not p_web.replyCompleted
      If Loc:NoRecords
        Loc:html = '<p>Nenhum registro encontrado.</p>'
        p_web.ParseHTML(loc:html)
      ElsIf not exists(loc:PDFName)
        Loc:html = '<p>O procedimento de impressão falhou em criar o relatório ['&clip(loc:PdfName)&']</p>'
        p_web.ParseHTML(loc:html)
      Else
        p_web.ForceNoCache = 1
        p_web.ReplyContentType = p_web._GetContentType('.pdf')
        p_web._Sendfile(loc:PDFName)
      End
    End

thanks
Walter - SOFTVALE