Forum

HomeHomeCoreCoreGeneralGeneralMultiple Queries HelpMultiple Queries Help
Previous
 
Next
New Post
9/2/2010 1:32 PM
 

Guidance Needed...

I want to run (and display) 2 queries, the 1st only has 1 record (FirstName, LastName, ect.) and the 2nd has a list of several records.

Query
Display
Query
Display

But it seems to only show whatever query is last. The 1st display only shows the holder [FirstName] unless I delete the 2nd query, then is shows the actual first name (ie Bob)

How do you do this right??
Thanks for any help.

New Post
9/3/2010 5:02 PM
Accepted Answer 

I need a little more information about what you are trying to do, but there are several ways to do what you ask. One is through the use of a subquery in a section (header, detail section, etc) of the form.

In the following example I have a line in a table that displays firstname and lastname from the main query and you might see that [that] in the where clause is a field returned from the main query of the form.

<td><td>[firstname]</td><td> [lastname]</td></tr>

{subquery, query="Select something from somewhere where this = [that] and whatchamacallit is null ",
format="<tr><td></td><td colspan=2 style='font-family: arial; font-size: 11px; font-weight: normal; background: AliceBlue; '>[something]</td>
<td colspan=2 style='font-family: arial; font-size: 11px; font-weight: normal; background: AliceBlue; '> [cdob]</td></tr>",,,,UseCache="false"
}

I hope you find this usefull. If you can share more details about what you are trying to do perhaps I can be more helpful.

New Post
9/4/2010 12:11 PM
 

I used named queries a lot and that would work for what you want to do.

Instead of a template query, add a named query, then indent under the query and assign the results to an action (select append). This will cycle through the results and append the markup for each row into the action.

Query: "Query1" select * from ....

  • Assign: Action results1 = [Column1,Query1] [Column2,Query1]

Query: "Query2" select * from ...

  • Assign: Action results2 = [Column1,Query2] [Column2,Query2]

Then use your NoQuery template (meaning, no template query)

[results1,A]
[results2,A]

New Post
9/7/2010 10:06 AM
 

Wow jwmott - I stumbled into "Subqueries" just as you made your post. I'll use your sample to clean up my 'messy, but working' attempt. Thanks a ton!

To lafonj - Those 'Named Queries' look really cool. I'm going to re-create a 2nd report using your ideas. I really want to try this; it looks nice and neat.

Thank you all so much for you help.

Previous
 
Next
HomeHomeCoreCoreGeneralGeneralMultiple Queries HelpMultiple Queries Help


 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seatle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share