NetTalk Central

Author Topic: Limiting a PDF report print to one parent record  (Read 3415 times)

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Limiting a PDF report print to one parent record
« on: December 07, 2008, 04:07:29 AM »
I am trying to range (or filter) limit a report which is called by a button press on a browse row.
If I leave off all range and filter limiting the report prints all the records no problem.

To limit the printed report to one primary record I have placed this code in the:
 User pressed button server side code Quote(my Button's equate name) embed
   p_web.SetSessionValue('QuoteID',QHEAD:QuoteID)
Where the QHEAD:QuoteID is the unique identifier for the highlighted row.

In the reports' embed
Prime Reports Option when run in web mode I have this code
  QuoteID=p_web.GetSessionValue('QuoteID')
QuoteID is a local variable I have created in the Report

In the report procedure filter I have this line
QHEAD:QuoteID =  QuoteID

If I then run this I get my DisplayNoRecordsMessage ('Bummer no records!')

I also noted in the Browse that this code is generated
SetSelection  Routine
  loc:selectionexists = loc:rowCount
  do PushDefaultSelection
  p_web.SetSessionValue('QHEAD:QuoteID',QHEAD:QuoteID)

So in the Prime Reports Option when run in web mode I tried this code
QuoteID=p_web.GetSessionValue('QHEAD:QuoteID')

Still the same result.
Any suggestions?
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Limiting a PDF report print to one parent record
« Reply #1 on: December 07, 2008, 08:06:09 PM »
Hi Terry,

To use a local variable in a Clarion report filter, you need to BIND it.
But usually the result of not binding it is that you get ALL the records, not just none of them. Still, it's the first thing I'd look at.

Second thing to look at, is what value (specifically) is in QuoteID in the report.  Your whole layout looks right, but perhaps it's not setting the Session Value of QuoteID right?

How do you trigger your report? I presume it's _not_ the same button as is setting the QuoteID session value?

cheers
Bruce