NetTalk Central

Author Topic: Generate report from record of the browse  (Read 2738 times)

golmedo

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Generate report from record of the browse
« on: June 19, 2014, 01:18:38 PM »
hello,
I wanted to ask how does one call printing a report from a button in the record of a browse.
The report generate from the selected id from a button clicked (I have way to access the buffer of the selected record or get id parameter...)
thank you very much!

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Generate report from record of the browse
« Reply #1 on: June 20, 2014, 02:52:28 AM »
hi Gustavo,

Example 13 (PDFReportRequiresEE) is a good example of doing this. The process is as follows;

a) Add a button to the Browse. (MailBoxesBrowseControl in the example) On the "OnClick" tab set the Procedure to the Report procedure, set the Target Frame to '_blank' (this will cause the PDF to open in another tab) and tick on the option to "Include Row ID Field'.

b) Because (in the example) this is the MailboxesBrowseControl procedure, Which is set to use the unique key, MAI:PrimaryKey, the component(s) of that key (Mai:MailBoxNumber) are set in the SessionValue and Value Queue when the report is called.

c) In the report (AliasReport in the example) you'll see a bit of code in the INIT method to prime the Mai:MailboxNumber value - which the report is then designed to use and filter on.

  If Not p_Web &= NULL
    MAI:MailBoxNumber = p_web.GetValue('Mai:Mailboxnumber')
  End

 
Hope this helps

cheers
Bruce