cancel
Showing results for 
Search instead for 
Did you mean: 

Duplex print problem in Smartforms

praveen_hannu
Contributor
0 Kudos

Hi all

I have a strange problem in my smartform printing. I am printing statement of account for multiple customers, while I am issuing to the print I have to print all customers accounts into 1 spool. Now the problem is when the user want to print them in double side(duplex mode) we have a separate printer device to suffice the requirement.

Now user able to print the statement of accounts in the duplex mode by passing the correct printer device. But now My problem is even if new customer starts in the page 4 it is printing the back side of the earlier customer.

For ex: if customer A has 3 pages and customer B has 4 pages and Customer C has 3 pages, I have to print customer A in pages (2 pages front and back and another page in the separate paper), for Customer B I have to print in 2 pages since he has 4 pages of statement and Customer C I have print in a new page front and back,remaining page has to go for the new paper.

This has to work only for the duplex, if they choose simplex printer or default printer each page has to issue to the new paper.

I have tried several conditions keeping new page in a command line and other.

Kindly help me is there any other solution to overcome this issue.

Thanks and Regards

Praveen

Accepted Solutions (1)

Accepted Solutions (1)

aidan_black
Active Contributor
0 Kudos

Hi,

In your smartform definition, defin e two pages e.g .FIRST and NEXT. In page FIRST, define the Print Mode = D. This ensures that duplex mode is set and it starts on the front of a new page. Page NEXT is just a copy of page FIRST except that Print Mode = ' '(Default: no change of print mode) is defined. This ensures that there is no change to print mode and it will continue in duplex mode.

Regards,

Aidan

praveen_hannu
Contributor
0 Kudos

Hi Aidan

Thanks for your reply, but the solution you proposed will not work for my condition. This solution will work for all the printers irrespective of duplex type or simplex.

Thanks

Praveen

Answers (1)

Answers (1)

Former Member
0 Kudos

HI friend,

The smartform is working correct as per the Duplex mode.

You need to handle it manually.

just try using this logic,

According to your logic your code must be with i a loop.

At the end of loop just move the system field SFSY-PAGE into a temp variable this will be having the current page no which is being processed.

So every time before the new record starts check whether this is has a odd value. If its is odd we can assume the last processed page is in the first page of a sheet.

So put a page break there. Then print it so that we are skipping the back side page of that sheet when there is a new record.

I think this will solve your issue please revert back to me if you have any issues.

Thanks,

Sri Hari

praveen_hannu
Contributor
0 Kudos

Hi Sri Hari

Thanks for your reply.

I have tried with this but no result, if I try with this it is creating a new page when the main window starting in the first page. So my main window is starting the new page onwards, which I dont want.

Please help me if there is any other logic.

Thanks

Praveen

Former Member
0 Kudos

HI friend.

Hopefully you will be having any one indication which says that specifies the end of record. For example if you are having and secondary window which executes at the last of the record.

So if you have such record just set a flag variable and also another variable which hold the current page no which is processed over that.

The flow should be like this

Main Window -> program lines -> command -> remaining windows (as per your logic).

Inside program lines first check whether the flag variable is set. If true then see whether the previous processed page is even. If all matches just break to next page. Before breaking just initialize the flag variable.

I guess you got a blank page at the beginning of main window. There must be some validation to check that please try using the above flow.

I am sure it will work.

If you still face issues please revert back to me i will help you.

Thanks,

Sri Hari.

praveen_hannu
Contributor
0 Kudos

Hi Srihar

I have not tried your solution yet, since my client is after me I have given another solution to work for temporary purpose. I was initially working on the same kind of solution, I believe this could work properly. If any thing is there I will definitely revert back to you. By the way is there anyway to initiate start page option in smart form. I mean to say like if I have 3 pages in my smartform, based on a condition I want to start my form printing either page 1 or page 2.

If there is any coding/logic to trigger to this.

Thanks in advance

Praveen

Former Member
0 Kudos

Hi friend,

I think there is no such option called START NEW PAGE like that.

We can use commands to break pages that what i have used also mentioned to you.

If i come across such thing in future i will surely revert back to you.

Thanks,

Sri Hari