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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with displaying many times a field.

Status
Not open for further replies.

camilo

MIS
May 16, 2000
10
MX
I have a database where I have 3 numbers let's say 3, 12, 10 now the third number is telling me how many times I have to display the other two here it will be<br><br>3 12<br>3 12<br>3 12<br>3 12<br>..<br>3 12<br><br>until it display 10 times programming it will be easy because it's only a for but I don't know if Crystal has such a thing and if not how can I do it?
 
In Crystal Reports Version 8 you can do loops but not in any of the earlier versions.<br><br>If you have an earlier version of Crystal you could create a UFL (User function library) in VB (or similar) to do the job. There are easy to create just check out the developer help guide which gives you instructions on how to do it.
 
If you used a stored procedure you could do it there, but you could also create a table called Repeat that consists of one column HowMany and let's say 100 rows, containing the numbers 1 to 100.<br>Then join your original table to Repeat like this&quot;<br>SELECT Table1.Number1, Table1.Number2, Table1.HowMany<br>FROM Table1, Repeat<br>WHERE Table1.HowMany &lt;= Repeat.HowMany<br>So you if your first row in Table1 is 3, 12, 10 you would get ten copies of that row in your result set. <p>Malcolm Wynden<br><a href=mailto:wynden@island.dot.net>wynden@island.dot.net</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top