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!

Best way to get a value from my database using a parameter

Status
Not open for further replies.

hapax

Programmer
Nov 10, 2006
105
US
My report accepts a customer ID parameter.

I need to use that parameter to get an invoice number value from my SQL Server database, to display the invoice number in my report.

An obvious choice would be a SQL Expression, but I don't think you can use parameters in those.

So how can I do this?
 
This isn't really clear. Do you mean you need to identify a specific customer using the parameter and then find a corresponding invoice amount or invoice number? What if there are more than one?

You could try something like:

if {?custID} = 123 then {table.invoice}

Where do you want to display the value? If in the report header, for example, you might also need to insert a summary on the above conditional formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top