Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Smartform Problem

Former Member
0 Likes
300

Hi folks,

I have this problem, how can i do to have one page with several divisions in smartform, it's like ms word print 8 pages in one page.

Or how can I do to have divisions, this is for credentials for employees, but they print 8 by page... so each division have a different data.

Something like this:

____________________________________________

I.................................I...........................................I

I Name: pedro ............|....Name:Jose .....................|

I age: 24.....................|....Age:32............................|

I..................................I..........................................I

I_____________ ______I___ ___ _________________I

I..................................I..........................................I

I Name: jorge. ............|....Name:Juan .....................|

I age: 25.....................|....Age:33............................|

I..................................I..........................................I

I_____________ ______I___ ___ _________________I

I..................................I..........................................I

I Name: Fabri. ............|....Name:Ivan.......................|

I age: 29.....................|....Age:38............................|

I..................................I..........................................I

I_____________ ______I___ ___ _________________I

I..................................I..........................................I

I Name: Claus ............|....Name:Flor.......................|

I age: 22.....................|....Age:35............................|

I..................................I..........................................I

I_____________ ______I___ ___ _________________I

Ok That's the idea.

That's an example of what I need in smartform, if somebody have an idea or solution please let me know step by step please

Thanks so much.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
285

Hmmm. Complicated...

I have thought of two possible ways.

The second solution is easiest.

Solution 1:

When looping over the table with all records, you would first have to build a new internal table that has the data for two columns. Only for two people (Pedro and Jose). This can be done in program lines just under the loop in the main window.

The internal table could look like:

Name

Pedro

Name

Jose

Age:

24

Age:

32

etc.

Then, pass it to a table in the main window. When the data for these two people has been processed, do it again for the next two.

etc. etc.

This way you can put boxes around each block.

Solution 2 (if that works, it's the easiest solution):

Create 8 windows, no main window.

In each window create a loop over the data table.

Loop at the records in the data table. Keep a counter running. When processing the first employee, the counter is 1. At each new employee, increase the counter.

A condition on the first window to only print if the counter is 1.

A condition on the second window to only print if the counter is 2.

etc.

Remove each printed record from the data table (having a copy of the table would be nice).

When the counter = 8, reset the counter and start a new page.

I can't think of a better way... I do not know if what you want is possible.

1 REPLY 1
Read only

Former Member
0 Likes
286

Hmmm. Complicated...

I have thought of two possible ways.

The second solution is easiest.

Solution 1:

When looping over the table with all records, you would first have to build a new internal table that has the data for two columns. Only for two people (Pedro and Jose). This can be done in program lines just under the loop in the main window.

The internal table could look like:

Name

Pedro

Name

Jose

Age:

24

Age:

32

etc.

Then, pass it to a table in the main window. When the data for these two people has been processed, do it again for the next two.

etc. etc.

This way you can put boxes around each block.

Solution 2 (if that works, it's the easiest solution):

Create 8 windows, no main window.

In each window create a loop over the data table.

Loop at the records in the data table. Keep a counter running. When processing the first employee, the counter is 1. At each new employee, increase the counter.

A condition on the first window to only print if the counter is 1.

A condition on the second window to only print if the counter is 2.

etc.

Remove each printed record from the data table (having a copy of the table would be nice).

When the counter = 8, reset the counter and start a new page.

I can't think of a better way... I do not know if what you want is possible.