cancel
Showing results for 
Search instead for 
Did you mean: 

How to duplicate a row?

Former Member
0 Kudos

Hello to all and good morning, I'm working on report that I need to duplicate a row if a field is true:

Invoice#.........Salesname1.......Salesname2

.......1.................Smith, R........... Barnes,

...... 2.................Saywer,t........ Paynee, T

...... 3................. Wayne,R.........Smith, R

Smith,R should have 2 rows because he was involve in 2 transactions , I'll group by salesName this what I'm looking for:

Smith,R

Invoice#.........Salesname1.......Salesname2

.......1.................Smith, R........... Barnes,

...... 3................. Wayne,R.........Smith, R

Thank you for any help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

U may insert a detail section below the detail section using insert section below.

Then u may suppress that section using section expert when field=false.

I hope this will be helpful for u.

Regards,

Misra P.

Former Member
0 Kudos

Thank you very much Misra you nail it .....

Answers (2)

Answers (2)

Former Member
0 Kudos

Basically, you'll need to select the records twice. Using an SQL Command as the data source, it'd look something like (MS SQL):


select salesman1 as group_field, invoice_no, salesman1, salesman2 from invoices
union all
select salesman2 as group_field, invoice_no, salesman1, salesman2 from invoices

You can then group on group_field and get all of the records that you want to show. (Each invoice will show under both salesmen.)

HTH,

Carl

Former Member
0 Kudos

Sorry, I did not undersand the message