![]() |
|
||||||||||||
vippsupport.xerox.com
Forums
- Xerox FF VI Suite Forum-
FF VI Suite (VIPP)
Multiple records and repeat|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
I am working in database mode using FreFlowVI
There has to be a smarter way to do this, and I am sure I am in the right spot to find it. Each record has 2 fields that could contain multiple records. My initial Field sep is | the seperator for the recoreds within the fields is ^ and a ~ to divide the individual records. Example below NAME|ADDRESS|CITY|STATE|RECORDS1|RECORDS1_COUNT|RECORDS2|RECORDS2_COUNT Bob|At home|Toledo|OH|1234567890^sales name^date of transaction~1234567890^sales name2^date of transaction2~1234567890^sales name3^date of transaction3|3|1234567890^sales name^date of transaction^owner name~1234567890^sales name2^date of transaction2^owner name2~1234567890^sales name3^date of transaction3^owner name3~1234567890^sales name3^date of transaction3^owner name3~1234567890^sales name4^date of transaction4^owner name4|4 So right now I am dealing with printing these records like this; CASE RECORDS1_COUNT {print action for no records found} (3){/VAR_SEG1 RECORDS1 0 (~) GETINTV SETVAR /VAR_SEG2 RECORDS1 1 (~) GETINTV SETVAR /VAR_SEG3 RECORDS1 2 (~) GETINTV SETVAR /VAR_VIN1 VAR_SEG1 0 (^) GETINTV SETVAR /VAR_OWN1 VAR_SEG1 1 (^) GETINTV SETVAR /VAR_DEL1 VAR_SEG1 2 (^) GETINTV SETVAR /VAR_VIN2 VAR_SEG2 0 (^) GETINTV SETVAR /VAR_OWN2 VAR_SEG2 1 (^) GETINTV SETVAR /VAR_DEL2 VAR_SEG2 2 (^) GETINTV SETVAR /VAR_VIN3 VAR_SEG3 0 (^) GETINTV SETVAR /VAR_OWN3 VAR_SEG3 1 (^) GETINTV SETVAR /VAR_DEL3 VAR_SEG3 2 (^) GETINTV SETVAR /TAH 10 SETFONT BLACK SETTXC 224 1118 MOVETO VAR_VIN1 SH 713 1118 MOVETO VAR_OWN1 SH 1478 1118 MOVETO VAR_DEL1 SH 1905 1118 MOVETO VAR_SLS1 SH 224 1068 MOVETO VAR_VIN2 SH 713 1068 MOVETO VAR_OWN2 SH 1478 1068 MOVETO VAR_DEL2 SH 1905 1068 MOVETO VAR_SLS2 SH 224 1018 MOVETO VAR_VIN3 SH 713 1018 MOVETO VAR_OWN3 SH 1478 1018 MOVETO VAR_DEL3 SH 1905 1018 MOVETO VAR_SLS3 SH } ENDCASE OK this is just a small sample of what I have built... the problem is that the number of records changes. Is there a way to loop what I am doing above? Just Some Guy |
|||
|
Have a look at the F2S transform.
You could store all the transactions in a table and then use FOREACH to process them:
/VARtransactions [[/VAR_VIN /VAR_OWN /VAR_DEL]] SETVAR
{ /VARtr RECORD1 RPCOUNT'-'1 (~) GETINTV SETVAR
IF VARtr () eq {EXIT} ENDIF
/VARtransactions [[VARtr (^) F2S]] ADD
} 9999 REPEAT
/NCR 10 SETFONT
50 SETLSP
BLACK SETTXC
0 1118 MOVETO
{ 224 MOVEH VAR_VIN SH
713 MOVEH VAR_OWN SH
1478 MOVEH VAR_DEL SH
NL
} VARtransactions FOREACH
That being said, starting with VIPP 7.0b (patch available on the web) there is a new mode called "TransPromo" (STARTTPM, documented in the readme) intended to address data with Multiple Line Records (MLR) structure. The required data structure is a bit different from what you have but not so far. With this mode an MLR is read all at once and the transaction table is populated automatically. You only need to code the FOREACH loop to process it. |
||||
|
this is fantastic... is there a way to manage the number of stored records printed at one time? The concern is the space available on the page and I would have to then flip to a second page.
Lets say I have room for 17 records to print but have 30 records to print from the F2S is there a way to dump 17 then page break and print the rest of the records? As always, thanks so much for the help! I knew there had to be an easier way to deal with this Just Some Guy |
||||
|
Yes, this is SETLKF to be coupled with in-line SETFORM:
{ place data that must be printed on each page } SETFORM [[ ... ]] SETLKF % define a frame to hold 17 records .. { ... } VARtransactions FOREACH .... PAGEBRK % final page break to push the léast page |
||||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|
vippsupport.xerox.com
Forums
- Xerox FF VI Suite Forum-
FF VI Suite (VIPP)
Multiple records and repeat
