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

Creating a parameter field 1

Status
Not open for further replies.

damselx

Technical User
Apr 24, 2003
32
AU
Hi

I've got a transaction list of invoices by Customer going across the page,

Cust Name Cust Code State Invoice No $ value etc

the state column is being pulled directly from the database

I want to create a parameter field on the state so I can choose the report by a state or all states.

I've followed the online help but I just can't get it

I have a parameter field set up called 'state'
Value type is string
Allow multiple values ticked
Discrete & range values is selected
In set defaults:
Browse table - DRSM
Browse field - City (this is what the field is called)
I've put the states on the RH side & defined the description
Display - description
Order - no sort
Length Limit unticked
Edit Mask - blank

In Select expert I've got DRSM.CITY is equal to {?State}

When I refresh the data & choose from - to I get nothing

If I delete the field DRSM.CITY from my report & put the parameter field in it's place I get nothing

If I put the parameter field somewhere on the report & suppress it I get nothing

I realise this is a text-book scenario, but I've never done parameter fields before

Any help would be appreciated

Thanks
Helen
 
What do you mean by "I put the states on the RH side"? If you are populating the default values with a description, the description should be on the right hand side and the actual database values on the left hand side. Check this first.

Also, change your parameter field to discreet values, and add a value of "ALL" to your state list. Then use the record selection formula (not the select expert) and put in the following formula:

If {?State}="ALL" then true else {?State}={DSRM.CITY}

The record selection formula is accessed by report->edit selection formula->record. Both of these tools are accessing the same formula, but there are many limitations as to what you can do with the select expert.


Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
dgilsdorf@trianglepartners.com
 
Thankyou
Have done that ... but am still doing wrong
I replaced the original field of 'CITY' with my parameter field of state .... is that correct ?
Following the instructions you've given me when I refresh my data I get ALL in the report column state. I need it to show me what state it is

Thanks
Helen
 
Helen,

I am confused as to why the CITY fioeld has the state in it, but I will take your word on this.

Do not place the parameter field on the report column, just place the database field (City) there. Rerun your report.

If that still does not work, rerun your report with no record selection criteria and confirm that the city field does indeed include the state.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
dgilsdorf@trianglepartners.com
 
Hi
City has state in it because the database it's coming out of is worded
Customer Address
Street
Suburb
City
& in Australia we don't usually have city in our address as suburb is usually the equivalent of city. Eg Sydney is a city, but in an address sydney would be the suburb
So in this case it would be Suburb, Sydney City NSW
with city being used as the State

so in my report the state column = DRSM.CITY. There is no other formula in the report relating to this field.
The record selection formula has been removed & the parameter field is as per previous, but it isn't ticked anymore.
Report runs fine - brings up all transactions
If I put the record selection back in I get no transactions
But doesn't the parameter field need to be on my report somewhere (ie ticked) ?

Thanks
Helen
 
No, the parameter field does not have to be on the report.

Is there a chance you could email me your report, with saved data? I feel a need to take a look at this.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
dgilsdorf@trianglepartners.com
 
Yes, I'll send it through now .... thanks I really appreciate this

Helen
 
Helen,

Your just lucky I have insomnia tonight. [smile]

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
dgilsdorf@trianglepartners.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top