Jump to content
Server Maintenance This Week. ×

Go to related record - printing coupon not working


DPaquin

This topic is 1626 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I've got very little experience in working with "go to related records".

I've managed to get to print Customer and Merchant invoice.

I'm having difficulties in printing QR-Code Coupon. When comes the time to print the coupon there are 3 records in the "Data Invoice" table. I am trying to print each of those three records as individual coupon.

The expectation for this request  is to produce 1 Customer invoice, 1 Merchant invoice and 3 QR-Code coupons. At the moment, I only getting 1 Customer invoice, 1 Merchant invoice and 1 QR-Code coupon. I've inserted a loop in order to print each of the 3 coupons and for some reason it does not work.

Would someone have an idea why I cannot print those three coupons?

Thanks in advance!

 

Merchant-1.png

Customer-1.png

Coupon-1.png

Data Relatred Record.png

TSP100_InvoicePrinting.pdf

Edited by DPaquin
Link to comment
Share on other sites

Is there a reason for not being able to loop on selected records of a go to relation?

Or is there a way to make those selected records being something like in the present case page 1 of 3 for record « solo 0101 », page 2 of 3 for record « solo 0305 » and page 3 of 3 for record « solo 0306 »?

I am thinking of something, is it as simple as changing print setup i.e not use related records in the print. I want to avoid printing 300 pages for no reason. 
 

thanks. 
 

Daniel

Edited by DPaquin
Link to comment
Share on other sites

44 minutes ago, DPaquin said:

Is there a reason for not being able to loop on selected records of a go to relation?

No. Unfortunately, this is the only part of your question I did understand, so this is the part I am answering. To loop over related records, you would do (pseudocode):

Go to Related Record [ Show only related records ; From table: "Child Table" ]
Go to Record [ First ]
Loop
  # DO SOMETHING
  Go to Record [ Next; Exit after last ]
End Loop
Go to Layout [ original layout ]

Note:

  • If you're not calling the script from an active portal row, then you don't need to go to first record explicitly;
  • If it's possible that the parent record has no related records in the child table, you should test for this first; otherwise you might get unexpected - and potentially disastrous - results.

 

Edited by comment
Link to comment
Share on other sites

This topic is 1626 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.