Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Two parameters for same thing
jkpatton
<p>I have a report I'm trying to design that has two parameters that will give the same value, they're just sorted differently. The client wants to be able to look up a permit by its permit number, or look up a permit by the permit owner's name.</p><p> </p><p>I have a lookup query that selects the permit number, and the name.</p><p> </p><p>So I have one parameter that is sorted by permit number, and the value is the permit number. And I have one parameter that is sorted by name, and the value is the permit number. At this time I have both of the report parameters as "required" and in the lookup query there is a union which adds the '%' option to the list box.</p><p> </p><p>In the main report query I have a where clause that says</p><p> </p><p>Where permit_number = ?</p><p>and permit_number = ?</p><p> </p><p>and I have two parameters in the data set that are linked to the report parameters mentioned above.</p><p> </p><p>If I use these parameters individually and take out the "AND permit_number=?" I get results. If I try to use them together, I do not get results.</p><p> </p><p> Ideas? If anything is unclear I'll try to make it clearer.</p><p> </p><p> </p>
Find more posts tagged with
Comments
kclark
<p>Why use both parameters as required? Can't you just have one parameter and then have some SQL like the following</p><pre class="_prettyXprint">select *from tablewhere permit like %param1% or like %param2%</pre>