outra9e
3rd December 2001, 10:52
Hi guys

I am trying to customise a packing slip and want to move a text field on the slip below another field line.

The two lines initially sit as detail 30 which is the line with the text and detail 60 which is the line I want the text to be below.

I have tried to copy the layout detail 30 to layout detail 70 as this I understand should put the line with the text below layout detail 70. However after doing this, all I find is that layout detail 70 now does not print at all.

does anyone have any ideas as to why this might happen?

Cheers

Smiffy
3rd December 2001, 12:04
Sounds like you only have the text field in your new layout and for some reason the text field is not populated with a value.

outra9e
3rd December 2001, 12:26
if I leave the original layout detail on the report as well ,then it shows text when it is added to the sales order.

I dont think that there is any problem with the field, I have a feeling that there is something in either the script or the print expression, but I don't really know...

MariaC
3rd December 2001, 12:33
Have you checked to see if there is any code in the report script refering to this text field. Look especially for related code in the detail.30 or detail.60 session (whichever you copied the layout from)

outra9e
3rd December 2001, 13:07
I can have a look at the script, however I have never actual done any work on scripts. Any suggestions as to what I should be specifically looking for?

MariaC
3rd December 2001, 13:40
text fields usually have some kind of code associated with them in the section field.<fieldname>, detail layouts will be detail.<layoutname>

When you copied the layout did you remove the text field out of the previous layout, are the output expressions stillt he same as the previous layout?

outra9e
3rd December 2001, 13:43
I left the detail field exactly the same when I copied it, and I left the original detail layout alone. If I copy the detail layout and rename it so that it comes before detail 60, eg is still above the line that I ultimatlely want it to be below, then it will print - and I have 2 of the text fields. If I copy the layout detail so that it comes after detail 60 then it will not print it. This is what makes me think that it is something about detail 60 which is causing this problem.

outra9e
7th December 2001, 17:30
Hi guys

I am still having problems with the movement of a text field on a packing slip.

The field is situated in detail 30 of the report.

The line I want it to be below is detail 60.

I have come to the point where by copying detail 30 twice to become detail 70 and detail 80 and then setting detail 30's print expression to 0 I can see to instances of the text field on above detail 60 and one below.

I now need to discard of the text printed above detail 60.

If I set the print expression of detail 70 to 0 then I have one instance of the text printed, however it is once again above detail 60!!!!

If I set the print expression of detail 70 to be line = 2 then I once again get 2 instances of the text one above detail 60 and one below detail 60!!!!

I can't win!!!

Any ideas anyone?

mark_h
7th December 2001, 21:30
With your last post it leads me to believe that something is happening in the report script which is executing the layout. Without knowing which session or report not sure if I can help you. You might want to search the script for line=2 and see what is happening.


Mark

tootsie
9th December 2001, 00:53
As far as i know these lines are database fields that are used directly en printed for in detail.30. These values are lost the moment a new detail line is processed, so you have to save the values. Try this;

make a copy of the original report with <ctrl><x> and keep the name (if already excisting report copy with <cntrl><c> and rename and go back to the first)
add the following lines to the reportscript, if not already there.
This is just a example, replace with your fields, variables and domain
|+++++++++++top of report++++++++++++++++++++
| = comment

declaration: |add under this label, append label if not there

domain tcdsca detail30.txt1 | new field, assuming text
domain tcdsca detail30.txt2 | new field, assuming text

detail.30:
before.layout:
| initialise new variables
detail30.txt1 = "" |empy the field, initial value
detail30.txt2 = "" |empty the field, initial value

| new fields get the value of the original table fields
detail30.txt1 = ttipcs020.dsca | example, choose your own
detail30.txt2 = ttipcs020.dscb | example, choose your own
lattr.print = false | this prohibits printing of line detail30 but
| it wil be processed
|+++++++++++++end of report+++++++++++++++++

then in the layout copy the fields from detail.30 to detail.70
(add if not already there with option 2, ttadv3131s000 ) and change the fields with "<cntrl><f> ttipcs020.dsca with detail30.txt1 and ttipcs020.dscb with detail30.txt2. Leave the rest as is.

Then compile the report and i think it is ready to use.

pgrootenhuis
13th August 2003, 18:22
When printing my Proforma Invoice (Building Interest) (tppin4474m000), on my report tppin447410000 (I use this in BGI5) there are two layouts involved: detail 20 and after.field inco 5.
On detail 20 there's a text field 'invo.txtn' with domain tppdm.txtn
On a.f. inco 5 there's a text (manually written) with two variable fields.

Now I want to put the invo.txtn below my text which is printed in the after field. Like outra9e I've tried to copy the complete text (with variable fields from the after.field to my detail field. Well, obiously the manually typed text is printed, but the variable fields are not populated (seems?).
The other way around would be to copy the invo.txtn from the detail field to the after field. The the after field is printed as supposed (With the variable fields populated) but now the invo.txtn appears to be empty.

How come?

I know this is a late reply on this thread, but I just came across this problem and found this thread. Did somebody already found a solution for this ??

Greetz,

Peter.

Ankita
26th April 2008, 20:04
Hi,

I have to display the value of a field in report in two lines based on the no. of characters present. i.e, according to the no. of characters the value should be divided in two lines. For instance, a field is of length 100 so, if the length of string is greater than the 50 characters, the value should be divided in two different lines. The solution i thought is taking two new fields, both of length 50 and display in the detail layout of report. In first field i would assign 50 characters and in other field the other 50 characters if present.

Can anybody tell me alternative and better solution, if possible?

Regards.

mark_h
28th April 2008, 15:28
Nothing wrong with that solution Ankita. The only problem you might run into is a word crossing the boundary.

Ankita
28th April 2008, 20:22
Mark,

Thank you for the reply. So, what can be other better solution? Or what i have to do take care of this crossing the word through the boundary? ASAP.

Thanks.

mark_h
28th April 2008, 22:28
Well the only thing I can add is a possible solution - have not really thought about this, but it would go something like this.

string1 = somestr(1;60)
x = rpos(string1, " ")
string1 = somestr(1;x)
string2 = somestr(x+1;60)

Notice that the two new strings need to be bigger than 50, so I just chose 60. The rpos command will find the first space starting from the right had side of string1 and returns the position relative to the beginning of the string. So all you can really do is make a swag at it.