Why not create a computed field that figures out if the condition exists and then sets its value (S X=...) to what you want to print? Here is a general form for the code.

S X="" S:<condition> X=<sub-field retrieval code>_" "_<sub-sub-field retrieval code>

In the code for <condition>, <sub-field> and <sub-sub-field> you can refer to the variables D1 for the sub-field record number and D2 for the sub-sub-field record number.

The above approach means you need to create this field in the sub-sub-file so that when it is accessed, the values of D1 and D2 exist. But, is that what you want? For instance, aren't you going to have to go through all the sub-sub-file records to compare their field to sub-field? I am not quite sure I understand a database situation where this makes sense. Can you give some more details?

Bob Beckley wrote:

I think I figured it out, all you late risers.  :)  Almost . . .

I drilled down to the lower sub-field and entered a boolean expression
(which used both sub-fields), which returns 0 or 1 in X.  Then, at the next
prompt, I can work with X.  Now I just need to figure out how to suppress
the printing of the 0's and print only the 1's.  If I mess with the boolean
at all, it doesn't like it (I get ?? back.).  Right now I have
SUB-FIELD=SUB-FIELD for the boolean, and when I try something like I
(SUB-FIELD=SUB-FIELD)=1 W "MORE INFO", it blows up.  Any ideas.  Thanks
again in advance.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Bob
Beckley
Sent: Saturday, January 29, 2005 6:22 AM
To: [email protected]
Subject: [Hardhats-members] Template Question


I'm building a print template and want to compare the values of two sub-fields in the same file. One sub-field is one level down in "multiple A", while the other is two levels down in "multiple A." If they are the same, I want to print both fields; if different, then print nothing. The problem lies in knowing what to write at the "AND THEN FIELD:" prompt. If this were pointer-related instead of sub-field-related, I would write something like (A:B=A:C:D) and then do something with the return value of 0 or 1. I guess what I'm asking is what syntax do I use to define and evaluate sub-fields within a print template. Thanks in advance for any light you can shed on this.




------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Hardhats-members mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/hardhats-members




------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Hardhats-members mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/hardhats-members




-- Greg Kreis http://www.PioneerDataSys.com

"You are today where your thoughts have brought you, you will
  be tomorrow where your thoughts take you." (James Lane Allen)



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Hardhats-members mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to