Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Taking range of parameters and dispaying them Post Reply Post New Topic
Author Message
zach18
Groupie
Groupie
Avatar

Joined: 08 Feb 2011
Online Status: Offline
Posts: 46
Quote zach18 Replybullet Topic: Taking range of parameters and dispaying them
     Posted: 15 Mar 2011 at 5:31am
I am prompting for a range of numbers, shipping numbers, and i need to figure out how to show each one individually. The problem i am having is i believe CR is seeing the range as the number and therefore wont display it. Here is an example of what is happening.

I prompt for a range, and the user enters say 1-10.

I need to take 1-10 and print that individually.

I'm thinking about putting that into an array and then looping through a for loop to display each number seperately.

any advice would help

Thanks
Using Crystal Report 2008
www.zachtech.us
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Mar 2011 at 6:27am
1. i assume by prompt you mean a parameter, what is the data type of the param?
2. What is the data type of the shipping number field in the DB?
 
If you use a number param set to allow for a range and the shippingnumber is also a number field then you can use a select statement like:
table.shippingnumber in MINIMUM(?param) to MAXIMUM(?param)


Edited by DBlank - 15 Mar 2011 at 6:28am
IP IP Logged
zach18
Groupie
Groupie
Avatar

Joined: 08 Feb 2011
Online Status: Offline
Posts: 46
Quote zach18 Replybullet Posted: 15 Mar 2011 at 6:32am
yes sorry, they enter in either a string parameter or number (which ever turns out to be easier to work with). This number is not in the DB. They have one customer number that receives multiple parts. That is why the shipping number can be a range of numbers.

im currently experimenting with array's and a for loop. not sure if it is the best way
Using Crystal Report 2008
www.zachtech.us
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Mar 2011 at 6:35am
can you show some sample data and how you want them to be able to include/exclude that data?


Edited by DBlank - 15 Mar 2011 at 6:39am
IP IP Logged
zach18
Groupie
Groupie
Avatar

Joined: 08 Feb 2011
Online Status: Offline
Posts: 46
Quote zach18 Replybullet Posted: 15 Mar 2011 at 6:47am
this is what they will be prompted to enter.

Shipper Number: 123123
Sale Line: 1
Shipping/Tracking Number: 1,2,3,4,5,6,7 (this is where they need to enter in the range 1-7.

 I then need to handle that and print out 7 reports. The shipper number will link to a part, part rev, PO number in the DB. Those three fields should be on each of the 7 labels, and the shipping/tracking number should increment 1 each time on each of the 7 reports
Using Crystal Report 2008
www.zachtech.us
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Mar 2011 at 6:50am
so your shipping/tracking number is really just the total number of times you want to print a repeating label
IP IP Logged
zach18
Groupie
Groupie
Avatar

Joined: 08 Feb 2011
Online Status: Offline
Posts: 46
Quote zach18 Replybullet Posted: 15 Mar 2011 at 6:53am
it will be a unique number up to 9 characters long, but it will go in sequencial order. so yes in a way the shipping/tracking number will be the total amount of labels
Using Crystal Report 2008
www.zachtech.us
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Mar 2011 at 6:59am

This comes up on the forum a bit as the real trick is how to make the report print multiple rows from a single row of data.

If you have a maximum number of times repeat (like your 9 above) you may just want create that many subreports on 9 different group (or report) header sections, pass the
shipping number from the main report to the subreports to get the part, part rev, PO data and then increment the Shipping/Tracking Number per sub report version. Then use the param to suppress the unneeded subreports.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum