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

Loop records based on Parameter Field...

Status
Not open for further replies.

Slingky

IS-IT--Management
Mar 4, 2003
67
CA
I saw suggestion from IdoMillet to use a Repeater table...

Very good.
But is there a way to do something similar with just a parameter field which hold the Number of Labels.

Want to loop base on what the user asks.
e.g. 20 labels of the same product.

Don't want to create the repeater table.
+ Crystal Decisions Knowledge base say that version <7 don't support looping.

So is version 8+ supporting looping ?

Please help !
Maxime
 
Can you explain why you don't want to create a Repeater table? It doesn't have to even be in the source database - it can be in a simple spreadsheet or Access database...

In any case, what is the maximum number or repeats you may need? If it's small, you can create as many detail sections and suppress those you don't need based on the parameter value.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
just because i wanted to know if there was any other possible solution...

maybe i will do a repeater table.
Is there some tools out there to generate the data ?

Thanks again.
 
If you need to generate many records, consider using Excel:
Edit, Fill, Series...

You can then copy (or Edit, Paste Append) into an MS Access table.

Alternatively, name the range in the Excel table and use it as a table.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
how to replace the qty field by a parameter field ?

Please give detail instructions.

Thanks
 
You would simply use a record selection criterion such as:
------------------------------------------------
{?my_how_manyParameter} <= {repeater.which_one}
------------------------------------------------

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
ok, i understand now with the operator you use...

but how to links tables.

I have one table named : pub.part
and the other table is the one a created with access.
ony one field, named NbLabels which contains the data that i created with excel fill series tool.

They are not linked...
 
I obtain the following error message :

Error in file links.

Warning: Fields in the report from the file &quot;Repeater&quot; cannot be linked.
 
OK, first I created the repeater table but with two fields.

field 1 = NbLabels = numbered 1 to maximum nb. of labels.
field 2 = Unique field which you can link to the table you drill down.

In my case, in the part table, i had a field called company which contains always the same value.

So, my starting point was the Repeater table, and it was linked by the field no 2 (company) to the part table.

I added a parameter field called &quot;?NbLabels&quot; so the user may enter the amount of labels he/she desires.

After that, i added the following selection formula :
{Repeater.NbLabels} <= {?NbLabels}

And all is working correctly now !

Thanks Ido for your help.
I also referred to Crystal knowledge base document :
 
Your particular environment seems to insist on a join between tables, so you basically created a &quot;dummy&quot; join.

In other environments, joins are optional
and if you don't join you get what is called a &quot;Cross&quot; join
or a &quot;Cartesian Product&quot; join (whereby every record gets joined to every record).

Thanks for the update.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top