Normal Topic "Meet any restriction" not working with reports? (Read 887 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
"Meet any restriction" not working with reports?
Sep 22nd, 2007 at 6:01pm
Print Post Print Post  
I have a saved spec which looks for |@date| in any of 5 fields.  The spec is saved with "Meet any restrictions" and, when loaded, works exactly as it should.

I've attached the spec to a report.  Although the info line at the bottom of the screen tells me that it is setting the retrieve to meet any criteria, no records are displayed in the report.
  

**
Captain Infinity
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: "Meet any restriction" not working with report
Reply #1 - Sep 24th, 2007 at 6:47pm
Print Post Print Post  
Me again.  Has anyone else tried this with success, attaching a saved spec that uses "meet any restriction" criteria to a report?
  

**
Captain Infinity
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: "Meet any restriction" not working with report
Reply #2 - Sep 24th, 2007 at 8:55pm
Print Post Print Post  
Hello Scott,

I have Ben looking into this to see what is happening. If it is a bug, we'll pass it on to development so that it can be fixed.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: "Meet any restriction" not working with report
Reply #3 - Sep 26th, 2007 at 6:39pm
Print Post Print Post  
Thanks Ray.
  

**
Captain Infinity
Back to top
IP Logged
 
Alec
Lanticans
*****
Offline



Posts: 200
Location: Ascot, England, UK
Joined: Nov 22nd, 2002
Re: "Meet any restriction" not working with report
Reply #4 - Sep 26th, 2007 at 6:44pm
Print Post Print Post  
In the meantime you can sidestep this by using a programmed retrieve.
Create one like this:

{date_entered = @Date OR date2 =@Date OR date3 =@Date }
Attach this spec and it will work.

Note:
1. If you use F6 to expand the field, for convenience, when you close the field editor it will put ^J characters into the search string - you will have to remove them.
2. You can use @ServerDate() instead of @Date, but only when running client-server
3. Note that @ServerDate() has parentheses, @Date does not.
4. You must use FIELD NAMES, not layout element names (if they differ)

  

Alec
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: "Meet any restriction" not working with report
Reply #5 - Sep 26th, 2007 at 6:46pm
Print Post Print Post  
Thanks Alec.  I am, in fact, currently using programmed retrieves and the reports are working.  However, they are very slow.  I look forward to a "met any" report that can make use of the incredible speed of piping @Date.
  

**
Captain Infinity
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: "Meet any restriction" not working with report
Reply #6 - Sep 26th, 2007 at 9:50pm
Print Post Print Post  
Is this an instance to use pipes vs. braces? 

| formula |   vs. { formula }

Supposed to be faster ....?
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: "Meet any restriction" not working with report
Reply #7 - Sep 28th, 2007 at 11:59am
Print Post Print Post  
In my case, Bob, the programmed retrieve looks like this:
Code
Select All
{ (Payment_1_Date = @Date) or  (Payment_2_Date = @Date) or  (Payment_3_Date = @Date) or  (Payment_4_Date = @Date) or  (Payment_5_Date = @Date) or  (Payment_6_Date = @Date) } 


This works, run by "meet all restrictions", and is slow.  Contrariwise, if I put |@Date| into each of the Payment_?_Date elements and run it with "meet any" it runs in a flash.
  

**
Captain Infinity
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: "Meet any restriction" not working with report
Reply #8 - Oct 18th, 2007 at 2:10pm
Print Post Print Post  
On a few of my reports I have worked around the problem of "meet any restrictions" not being obeyed when attached to reports by detaching the retrieve spec and using @LoadRetrieveSpec before the report is run, which then runs on the retrieved records.  (Sample follows for anyone in a similar situation)
Code
Select All
// Prints the Posting report

Var vLoadSearch as Int
Var vClearSpec as Int
Var vLoadSpec as Int
Var vRunRetrieve as Int
Var vPrintTheReport as string

// Switch to Search Mode
vLoadSearch = @SelectTreeItem("Search Update Menu!Search (F7)")

// Clear the current Retrieve Spec
vClearSpec = @SelectTreeItem("Search Menu!Clear Form (F3)")

// Load the Retrieve Spec
vLoadSpec = @LoadRetrieveSpec("Posted today in any payment field - meet any")

// Run the Retrieve
vRunRetrieve = @SelectTreeItem("Search Menu!Search Commands!Retrieve New Results (F10)")

// Run the report
vPrintTheReport = @PrintAReport("Posting -  Today, ALL", REPORT_MODE_HTML_PREVIEW, PRINT_ORIENTATION_LANDSCAPE, 0, -1, -1, -1, -1, -1, -1) 



I have a good number of other reports which could make use of "Meet Any", so I'm looking forward to a fix.  Please post an update at that time, thanks!
  

**
Captain Infinity
Back to top
IP Logged