Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to duplicate records (rows)

Status
Not open for further replies.

hoppeli

Technical User
Apr 10, 2005
16
FI
Hi all!

I am using CR 8.5 and SQL db (7.0). I have a dilemma as follows: I need to duplicate a detail section, if there is a certain string in a certain field:

detail section now: 008 4 5000 0,00 1234,00

If there is this "008", it means this row should be duplicated and then output should be:

detail section after: 008 5 5000 0,00 1234,00 (just change of that second field from 4 to 5).

How could I make that?

Thanks in advance!

Hoppeli
 
Try inserting a 2nd detail section by right mouse clicking on details in the grey section to the left of the report canvas -> insert section below.

place the relevant fields in this new section and then use a conditional suppression formula to hide the field if 008 is not present.

right mouse click on details in the grey section -> section expert -> (x-2) to the left of Suppress (No Drill Down) -> enter the formula

{MyTable.Field} <> '008' (replace {MyTable.Field} with your field name

To increment the number on the 2nd field use a formula e.g.

Previous(MyTable.Field2) + 1

HTH


Gary Parker
MIS Data Analyst
Manchester, England
 
GJParker, you made my day. I had tried it earlier, but somehow, as being beginner, did not succeed in doing that.

Now I have a solid foundation to continue.

THANKS!
 
Glad to help.

Gary Parker
MIS Data Analyst
Manchester, England
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top