concatenation and scanning
concatenation and scanning
I need to have 2 scans with detail record lines printed.__The first scan needs to print 3 across.__The second scan one across.__I couldn^t figure out a way to do this. So for the second scan I tried to concatenate the contents of each record and then print that big variable with wordwrap in a footer. It did not work.____What did i do wrong?____calc field: allnotes=^^__calc field: iif(scanning(notes),allnotes+notes->line,allnotes)____The contents of allnotes ends up Y or N, like a boolean.____Any ideas of how to do this, if it can be done at all.____-Jeannie__
=> RE: concatenation and scanning
I will see if I can come up with a report design that will give you this layout.____Kathleen__R&R Support
=> RE: concatenation and scanning
I got this to work by doing the following:____I took the sales by salesperson sample multiscan that ships with V10+ and added a few extra calculations and band lines. The example is pretty simple in that it takes only a single field ORDNO and places it as 3 across so if you had more fields to do, you would need more calculations.____The report had a total field that counted the orders by salesperson and a group field (SCANGRP) that breaks between each scan. There are two record band lines, one with order info and one with course info and each band line is controlled by a scan condition.____First I created a calculated field P1 with the expression:__prev(ORDNO)__This guy returns the previous order number.__Then I did a P2 with the expression:__PREV(P1)__So this takes you back 2 orders.__Then on the current record band I placed the fields:__P2 P1 ORDNO____I then created a calculated field called PRINT3 with the expresion:__mod(TotOrders,3)=0 and scan(rrorders)__I used this calculation as the logical line to control the the record band with the 3 fields. So we print the record band when we are on an order that is a multiple of 3 and we take the two previous and current orders.____This works fine if the total number of orders is an even mutiple of 3.__But you could have 1 or 2 leftovers that would not print.____So I create two more SCANGROUP footer lines.__The first one has the fields P1 and ORDNO__The second one has just ORDNO__The first line is controlled by a logical field called PRINT2 whose expression is:__mod(TotOrders,3)=2 .and. scan(rrorders)__And the line with the single field ORDNO is controlled by a logical field called PRINT1.__mod(TotOrders,3)=1 .and. scan(rrorders)____So the end product is list of 3 across orders followed by a one per line list of courses taken for each salesperson in the report.____Kathleen__R&R Support
==> RE: concatenation and scanning
Many thanks. This i have to digest, but it sure looks great.____-Jeannie