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

Create a parameter from a parameter

Status
Not open for further replies.

Appollo14

Technical User
Joined
Sep 4, 2003
Messages
182
Location
GB
Hi, i've created a report based on a table. The table stores 3 main components.

PeriodId
YearId
MiscInfo

what I'm doing is passing in the PeriodId from a parameter. I would then like to be able to select all data from table which has a periodid <= parameter AND the yearid the same as the yearid of the periodid derived from the parameter.

I thought this would be simple but i could do with some help!

Thanks,
Noel
 
Please show how the parameter entry displays and tell us what datatype it is. Also show samples of {table.periodID} and {table.yearID} and tell us what their datatypes are.

-LB
 
Hi LB,

The parameter is passed in, as a numeric value, using the standard crystal parameter interface.
Here is an eg of my table, hopefully you'll get the idea

PeriodId YearID MiscInfo
1 1 10.00
2 1 15.75
3 1 12.00
1 2 15.00
2 2 6.75
3 2 5.00
4 2 150.00


Thanks,
Noel.
 
You didn't show what the {?periodID} options look like. If it exactly reflects the field {table.periodID}, then the yearID cannot be derived from {?periodID}, and you will have to use two parameters in your record selection formula:

{table.periodID} <= {?PeriodID} and
{table.yearID} = {?YearID}

-LB
 
Thanks LB,

just came to the same conclusion myself. I was trying to get away with only making the user pass in one param but i'm sure it wont kill them to put in 2 (i hope!!)

Regards,
Noel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top