Page Index Toggle Pages: [1] 2  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) error in retrieve specs for reports (Read 2368 times)
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
error in retrieve specs for reports
Mar 24th, 2004 at 4:32pm
Print Post Print Post  
When attaching a Retrieve Spec for a report, the values in the Spec Viewer contain more field specifications than in the retrieve spec.  For instance, I had a spec for only City="Calgary", but when I attach the spec I get City-"Calgary", ID="19", Name="John", etc..

Any clues?

Thanx
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: error in retrieve specs for reports
Reply #1 - Mar 24th, 2004 at 5:21pm
Print Post Print Post  
If you simply load that spec while in retrieve mode, what do you get?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: error in retrieve specs for reports
Reply #2 - Mar 24th, 2004 at 5:31pm
Print Post Print Post  
if i just load the retrieve spec, only the field City=Calgary is filled out and i get the correct results. However, if i attach the spec to the report and try to preview it in Search Mode, Designer freezes (i even tried waiting for >1 min)
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: error in retrieve specs for reports
Reply #3 - Mar 24th, 2004 at 6:58pm
Print Post Print Post  
Does the report work if you don't attach the spec?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: error in retrieve specs for reports
Reply #4 - Mar 24th, 2004 at 8:02pm
Print Post Print Post  
yes it works if i don't attach the spec. i also have a sort spec attached to the same report. removing the sort spec still causes Sesame to freeze.

as an aside: is there a way to run a report w/out having to do a search? i mean, if we attach a retrieve spec to a report, it seems redundant to have to perform a search before previewing the report w/ a spec/
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: error in retrieve specs for reports
Reply #5 - Mar 24th, 2004 at 8:31pm
Print Post Print Post  
So the retrieve spec works when not attached to the report and the report works when not attached to the retrieve spec?

Quote:
as an aside: is there a way to run a report w/out having to do a search? i mean, if we attach a retrieve spec to a report, it seems redundant to have to perform a search before previewing the report w/ a spec


Sesame has no way of knowing whether you have attached a retrieve spec to a report until you select a report. So what happens if you select a report with no retrieve? We could select all records, but what if that is not what you want? I suppose its possible that we could divide your reports and put some on the on the search menu and some of them on the results menu depending on whether they have retrieve specs attached. But then you would have to leave your result set to get to some, but not all, of your reports.

Sesame, in general is batch based. The result set is the primary record selection. We allow attached retrieves because the content of the report may require it. Unlike the attached sort spec, the attached retrieve is usually not critical to the structure of the report itself. In many cases attaching a retrieve actually lowers the utility of the report.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: error in retrieve specs for reports
Reply #6 - Mar 24th, 2004 at 9:02pm
Print Post Print Post  
attaching the retrieve spec to the report causes Sesame to freeze.

not attaching the retrieve allows execution of the report minus the retrieval i would like it to do.

i guess the way around this is to perform a retrieve on its own and then generate the report?`
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: error in retrieve specs for reports
Reply #7 - Mar 24th, 2004 at 9:22pm
Print Post Print Post  
That may be the way "around" this one. But could you try re-saving a retrieve spec (under a different name but with the same contents) and attaching it to your report?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: error in retrieve specs for reports
Reply #8 - Mar 24th, 2004 at 9:29pm
Print Post Print Post  
i tried that, and same problem
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: error in retrieve specs for reports
Reply #9 - Mar 24th, 2004 at 10:05pm
Print Post Print Post  
Please send the application to support@lantica.com - mark it my attention. Please make sure to detail any steps which are necessary to cause the problem - specify which report and form, etc...
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: error in retrieve specs for reports
Reply #10 - Mar 25th, 2004 at 5:50pm
Print Post Print Post  
I'm not seeing any problem here. I went into Sesame Runtime and put "Calgary" in the "City" LE - I then went to the spec manager and saved that spec under a new name. I exited Runtime, went into SDesigner, opened the report "Calgary Area Report". The original attached spec had 10 LEs specified scattered across 5 subforms. I attached my new spec to the report. I exited SDesigner and ran the report in Runtime. It retrieved the "Calgary" records and generated the report immediately.

I then investigated whether the original spec (the one with 10 LE specified, "Calgary Clients") was locking up Sesame when generating a report. It isn't. It is, however taking a very long time to generate the report. This is because all of the subforms (9 of them) in this application are set to be "relational" rather than naturally linked. To do a search across 5 relationally linked subforms, these five:

Children (763)
Life Insurance (1778)
GIC (644)
Daily Interest (311)
Investments (0)

Forces Sesame to have to run through all the records in the application (10466) to find those that match the definition type (totals in parenthesis above), and run through those to find those with matching key fields, for each and every parent record. Assuming that it cannot find any matching records (the worst case, but true in the case), that amounts to:

operations = (1624 * (10466 - 1624))

or 14,359,408 operations just to determine that none of the records qualify.

If natural linking were used instead of relational for these forms, Sesame would only have to search the subrecords that actually are children of this parent record, without having to run through all the possible children to simply determine if they are *this* record's child.

Relational linking should only be used in cases where the information in the child record is likely to appear under more than one parent. In looking at your application, I would highly recommend that you change:

Children
Life Insurance
GIC
Daily Interest
LTCare
Critical Illness
Investments
and Disabilities

to be naturally rather than relationally linked. The information in these records must be unique to the individual parent record they are linked to - as indicated by unique information such as policy numbers. The Group Insurance form maybe better served as relational in that many individuals might fall under a single policy number. But for simplicity's sake, and given that the information held by Group Insurance is unlikely to be changed "standalone" - it may well also be better off as naturally linked.

Additionally, if naturally linked, you would be able to reduce the SBasic code scattered through this application very significantly, in that much of it is there to generate and maintain unique key fields. In each case I could find, these are being used to generate a condition identical to natural linking but with significantly more overhead.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: error in retrieve specs for reports
Reply #11 - Mar 25th, 2004 at 6:08pm
Print Post Print Post  
Good info, Mark. Thanks for the detailed explanation to FSGroups problem.

Steve in Texas
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: error in retrieve specs for reports
Reply #12 - Mar 25th, 2004 at 6:23pm
Print Post Print Post  
There is a good summary of when to use natural and when to use relational linking on page 452 of the User's Guide.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: error in retrieve specs for reports
Reply #13 - Mar 27th, 2004 at 9:06pm
Print Post Print Post  
how would parent form data be retrieved w/in a subform report if natural links were used?

for example, if i want to create a life insurance report for all the policies for Client "Bob Smith".  How do I retrieve the client's name if it is not contained in the subform?

TIA
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: error in retrieve specs for reports
Reply #14 - Mar 27th, 2004 at 10:09pm
Print Post Print Post  
Quote:
how would parent form data be retrieved w/in a subform report if natural links were used?

for example, if i want to create a life insurance report for all the policies for Client "Bob Smith".  How do I retrieve the client's name if it is not contained in the subform?


You would base your Report on the Client database, and include a Subreport based on the LifeInsurance database. This would get you all the Client info, plus all the child records for each Client.

BTW, you can also still store the client name in the subrecord, if you want to run reports directly against the LifeInsurance database. You just don't use any particular piece of data as the parent/child link. The link is maintained automatically.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send Topic Send Topic Print Print