Linking objects

I have returned after some time to a project which uses LL v 11, so sorry for not being up to date, but I hope someone may be able to help as “free support” has expired!

I am looping through a dataset of customers, printing a table of data and some text for each customer (actually letters which will be posted in the mail). Sometimes the data in the table will span more than one page, which means that the final text box must be linked to the end of the table. This only works correctly if the table is on the final page of the entire printed report - ie if I choose to print a batch of 3 customers, or 10, or 50, then only the last patient’s letter prints correctly, all the others simply do not print the linked textbox. Single customers always print correctly.

Does anyonene have any ideas on this?

Thanks

Adrian Lewis.

“lewisar” <alewis@pencerd…> schrieb im Newsbeitrag
news:294872232009103511@combit.net…

I am looping through a dataset of customers, printing a table of data and
some text for each customer (actually letters which will be posted in the
mail). Sometimes the data in the table will span more than one page, which
means that the final text box must be linked to the end of the table. This
only works correctly if the table is on the final page of the entire
printed report - ie if I choose to print a batch of 3 customers, or 10, or
50, then only the last patient’s letter prints correctly, all the others
simply do not print the linked textbox. Single customers always print
correctly.

Have a look for LlPrintResetProjectState() in the documentation which you’ll
want to call after each customer letter. In short:

LlPrintStart()
for (each Customer)
NormalPrintHandling();
LlPrintResetProjectState();
endfor

LlPrintEnd();

Seem to remember having posted something similar not too long ago, so a
search in this NG might also help.

G.

Thank you very much for your reply. I have been trying to respond for the last few days but unfortunately each time I click “submit” the webpage produces an error, and my replies are evidently not getting through - support say they may now have fixed this, so I will try again!

I tried your suggestion and unfortunately it made the situation worse, in that the linked textbox now NEVER prints at all! In a way I almost expected this, as ResetProjectState presumably makes each letter print as if it is the first letter in the batch, and in my case the first letter never prints correctly (unless it is the only letter in the batch), only the last!

It seems that linking the textbox to the “end” of the parent table in some way confuses List & Label if the table itself repeats in each letter, so that it believes that only the last time the table is printed is the true “end” for that table?

Many thanks again for your help, but I am still looking for a solution!

Adrian Lewis

“lewisar” <alewis@pencerd…> schrieb im Newsbeitrag
news:294872232009103511@combit.net…

I am looping through a dataset of customers, printing a table of data and
some text for each customer (actually letters which will be posted in the
mail). Sometimes the data in the table will span more than one page, which
means that the final text box must be linked to the end of the table. This
only works correctly if the table is on the final page of the entire
printed report - ie if I choose to print a batch of 3 customers, or 10, or
50, then only the last patient’s letter prints correctly, all the others
simply do not print the linked textbox. Single customers always print
correctly.

Have a look for LlPrintResetProjectState() in the documentation which you’ll
want to call after each customer letter. In short:

LlPrintStart()
for (each Customer)
NormalPrintHandling();
LlPrintResetProjectState();
endfor

LlPrintEnd();

Seem to remember having posted something similar not too long ago, so a
search in this NG might also help.

G.

“Adrian Lewis” <alewis@pencerd…> schrieb im Newsbeitrag
news:496062262009113714@combit.net…

Thank you very much for your reply. I have been trying to respond for the
last few days but unfortunately each time I click “submit” the webpage
produces an error, and my replies are evidently not getting through -
support say they may now have fixed this, so I will try again!

Yup - fixed obviously :-). I do have the very same scenario and it works
fine for me. So - to make sure:

  • Instead of using a text, you might consider a footer line with condition
    “LastPage()”
  • If using a text, I’d place it to fully overlap the table (i.e. same size,
    same width, same position) and use “At End” as link type
  • Also, you should assign the condition “LastPage()” to the text

Make sure to loop LlPrintFieldsEnd() until the return value is zero, this
might also cause the trouble.

Otherwise you could try to post an excerpt from a debug log which might help
and describe your linkage in more detail - I’m sure we can fiddle this out.

G.

I have a confession to make - I didn’t read your original post carefully enough, as I didn’t notice that you use LLPrintStart where I have used LLPrint/LLPrintFields … now I’m unsure as to the difference and when I should use one or the other (or both??).

Apologies - it’s been 3 years since I used this product and I’m basically, as in a lot of software “development”, copying and pasting from pre-existing examples in an attempt to get quick results - and it’s obviously not a great strategy!

I’ve had a very quick scan back through the manual, and notice that most examples do seem to do what I have done - which is not surprising as I copied them in the first place! The explanation under LLPrintStart doesn’t really help me deciding when I should use it?

Could you possibly shed some light on this for me? Is this perhaps the root of my problem?

Your advice is greatly appreciated.

Adrian

“Adrian Lewis” <alewis@pencerd…> schrieb im Newsbeitrag
news:496062262009113714@combit.net…

Thank you very much for your reply. I have been trying to respond for the
last few days but unfortunately each time I click “submit” the webpage
produces an error, and my replies are evidently not getting through -
support say they may now have fixed this, so I will try again!

Yup - fixed obviously :-). I do have the very same scenario and it works
fine for me. So - to make sure:

  • Instead of using a text, you might consider a footer line with condition
    “LastPage()”
  • If using a text, I’d place it to fully overlap the table (i.e. same size,
    same width, same position) and use “At End” as link type
  • Also, you should assign the condition “LastPage()” to the text

Make sure to loop LlPrintFieldsEnd() until the return value is zero, this
might also cause the trouble.

Otherwise you could try to post an excerpt from a debug log which might help
and describe your linkage in more detail - I’m sure we can fiddle this out.

G.

Guenther,

Please ignore my previous message - I of course use PrintWithBoxStart instead of PrintStart!

It is slowly coming back to me!

Adrian

“Adrian Lewis” <alewis@pencerd…> schrieb im Newsbeitrag
news:496062262009113714@combit.net…

Thank you very much for your reply. I have been trying to respond for the
last few days but unfortunately each time I click “submit” the webpage
produces an error, and my replies are evidently not getting through -
support say they may now have fixed this, so I will try again!

Yup - fixed obviously :-). I do have the very same scenario and it works
fine for me. So - to make sure:

  • Instead of using a text, you might consider a footer line with condition
    “LastPage()”
  • If using a text, I’d place it to fully overlap the table (i.e. same size,
    same width, same position) and use “At End” as link type
  • Also, you should assign the condition “LastPage()” to the text

Make sure to loop LlPrintFieldsEnd() until the return value is zero, this
might also cause the trouble.

Otherwise you could try to post an excerpt from a debug log which might help
and describe your linkage in more detail - I’m sure we can fiddle this out.

G.

“Adrian Lewis” <alewis@pencerd…> schrieb im Newsbeitrag
news:92482262009153759@combit.net…

Please ignore my previous message - I of course use PrintWithBoxStart
instead of PrintStart!

Adrian,

That’s fine then. Just make sure not to close the print job until your
totally done, but treat each record like it just was started. So you’ve got
an additional loop right after LlPrintWithBoxStart that goes through the
records. Right before LlPrintEnd, this loop ends with calling
LlPrintResetProjectState()…

G.

Thank you Guenther - it’s now working.

I spent too long trying to fix it from the LL designer when there were problems with the underlying VB code; your suggestions set me on the right path!

The present application prints two letters per customer, one of which is always 1 page, the second could be more. Now I just have to modify it to make it print a third letter per customer which is also potentially multi-page!

Mit freundlichem Gruss

Adrian

“Adrian Lewis” <alewis@pencerd…> schrieb im Newsbeitrag
news:92482262009153759@combit.net…

Please ignore my previous message - I of course use PrintWithBoxStart
instead of PrintStart!

Adrian,

That’s fine then. Just make sure not to close the print job until your
totally done, but treat each record like it just was started. So you’ve got
an additional loop right after LlPrintWithBoxStart that goes through the
records. Right before LlPrintEnd, this loop ends with calling
LlPrintResetProjectState()…

G.