Jump to content
The site is updated on a beta version. Maintenance tasks are running so search and index may not function at this time. ×

Need an option to print /no-print selected fields

This topic is 5903 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi everyone...

Simple Setup:

Customer Name, Address etc..

Each Customer page has 5 tabs on it (Policy 1, Policy 2, Policy 3 etc..)

Each Policy # has several fields on it (Policy #, Amount, Purchased etc..)

I have a report that recaps all of the Policies (Policy 1, Policy 2, Policy 3 etc..) But some times there is a need (want) not to show a Policy (and all of its fields..) is there a script that I can do to make certain policies not show up...Maybe a check box on the coresponding tab (Policy 1, Policy 2, Policy 3 etc.) that I can check so it prints on the report (If not checked does not print)...

Expanded Detail on Fields:

Tab: Policy 1


Policy #1

Amount 1

Purchased 1


Tab: Policy 2

Policy #2

Amount 2

Purchased 2


Link to post
Share on other sites

Hi Joseph. If you haven't done so already, put your policies in a separate file and show them in your main file through a relationship from CustomerID to CustomerID. This will help immensely. You can put the related fields into a portal to display more than one.

Now make a number field in the main file that auto-enters the value "1" and call this field Always1. (Make sure to go back thru existing records and set the value of this field to 1 as well.) Now make a calc field equal to CustomerID & "|" & Always1 and call it "CustomerIDPrintYes".

Go to your Policies file and create a number field called "PrintYes". Also create a calc field called "CustomerIDPrintYes" which is equal to CustomerID & "|" & PrintYes. Back in the main file, add PrintYes to the Policies portal so that it can be set to 1 or unset when desired. (Using checkboxes to do this is a bit more elegant, but not necessary.) Any policy you want to print should have a value of 1 in this field.

Now create a relationship from main file CustomerIDPrintYes to Policies file CustomerIDPrintYes. Duplicate the layout we've been working with, and switch the portal and all the fields it contains so that they use the newest relationship. Fiddle with formatting a little bit, and i think you'll have what you're looking for.


Link to post
Share on other sites

Wow...it sounds hard to do...Ok I will give it a try... But I have one question...Each Policy Number (Policy #1, Policy #2, Policy #3, Policy #4 and Policy #5) have a huge amount of information (fields) on them (each Tab). Some just to ref and other fields to fill out...Is a portal with a relationship the best way still do show them...and if I do not change right away (just learning FM) can what you described still work...?

Also can you describe it to me if I leave the layout the same for now? smile.gif

Link to post
Share on other sites

Joseph, i just re-read you original post and realized you're using tabs for policies and not a straight list. Tabs can be done with portals, but they're quite a bit more difficult. Either way, you're going to be doing quite a bit of programming. (But it's great experience!)

Try this: Keep one file (ignoring my recommendation above). In this file, create fields called "PrintPolicy1" thru "PrintPolicy5" and add them to your layout in the appropriate places. If you want to print a given policy, set this field to the number 1. Now make 6 new calc fields; the first one will be equal to (ClientID & "|" & PrintPolicy1), the second = (ClientID & "|" & PrintPolicy2), ... The last one will be equal to (ClientID & "|1").

Now make 5 new relationships, each one with your main file as both the parent and the child. The first one, REL1, relates your sixth calc field from above to the first; the second, REL2, relates the sixth calc field to the second; the third, REL3, relates the sixth calc field to the third; ...

Now go to your print layout. Add portals for all five of these relationships, and put the desired fields into each portal. You should now see that policies for which PrintPolicyX is set to 1 show up, and those for which PrintPolicyX is not set to 1 do not show up. You can fool with Sliding to make this printout a little neater.

While using one file for Clients and one file for Policies does not necessarily result in less programming for this project, i think you will find many advantages to this type of design as you become more familiar with portals and relationships. I'd encourage you to give that model a try even though it will take a lot of time to convert.

If this is all clear as mud, you can post clones of your files here and i'll modify them so that you can get your desired result, although i can't promise i'll do it soon--maybe a week or so.


Link to post
Share on other sites

ok...great...I have a question...When on the report with the portals..is there any way to have column headings not show up too...I think I know the answer...(If I put the heading in the portal will it show up with the portal...)?

One last question: ClientID & " what is that symbol? describe that to me

and is that the sixth one?

Link to post
Share on other sites

Exactly right on the headers.

As for the symbol--it's called the pipe character, Shift-, and it's frequently used as a delimiter in relationships and other things, mostly because it has no reserved use. The "sixth one," if i understand your reference correctly, is what i would call a universal key.

CalcField1 = (ClientID & "|" & PrintPolicy1)

CalcField2 = (ClientID & "|" & PrintPolicy2)

CalcField3 = (ClientID & "|" & PrintPolicy3)

CalcField4 = (ClientID & "|" & PrintPolicy4)

CalcField5 = (ClientID & "|" & PrintPolicy5)

CalcField6 = (ClientID & "|1)

So whenever PrintPolicy1 is equal to 1, the relationship CalcField1::CalcField6 is valid, for example, and thus your Policy 1 is displayed.


Link to post
Share on other sites

great it works..I am trying to figure out the shifting...When I do not print number 2 but number 3...number 3 does not slide up...do I need to turn on sliding on the portal itself and the field...B)?

Thanks for all of you help

Link to post
Share on other sites

Got another question...Everything work with the print policy field being 1 or 0...But I really Want a Check Box... How do I make the checkbox relate to 1 or 0...all I can do is make a check box but it does nothing? smile.gif

Link to post
Share on other sites

This topic is 5903 days old. Please don't post here. Open a new topic instead.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Who Viewed the Topic

    1 member has viewed this topic:
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.