<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Building a Report Parameters Form</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Building a Report Parameters Form</description>
  <pubDate>Thu, 11 Jun 2026 07:53:47 -700</pubDate>
  <lastBuildDate>Tue, 08 Apr 2008 11:31:32 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=409</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Building a Report Parameters Form : Here is an even cleaner way to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=409&amp;PID=2786#2786</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 409<br /><strong>Posted:</strong> 08-Apr-2008 at 11:31am<br /><br />Here is an even cleaner way to do it.&nbsp; I created a class called EmployerQO which stands for Employer Query Object.<DIV>It looks like this.</DIV><DIV>&nbsp;</DIV><DIV>public class EmployerQO</DIV><DIV>{</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private string _employerName = string.Empty;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private string _employerNo = string.Empty;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private string _status = string.Empty;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private string _office = string.Empty;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .... create properties (get/set) for each.</DIV><DIV>&nbsp;</DIV><DIV>}</DIV><DIV>&nbsp;</DIV><DIV>in my view class after the user fills in the search parameters and then clicks the find button, I call a method called RetrieveFilterFields which creates an EmployerQO object and then looks at each query field and builds the query object.&nbsp; I then call the following myController.GetEmployers(qo) passing it the query object.</DIV><DIV>&nbsp;</DIV><DIV>In my controller call I build an RdbQuery object and then for each non empty field in the EmployerQO object I do a </DIV><DIV>query.AddClause().&nbsp; I call GetEntities passing it the query object.</DIV><DIV>&nbsp;</DIV><DIV>There may be better ways of doing this, but it seems to work for me.</DIV><DIV>&nbsp;</DIV><DIV>Bill</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 08 Apr 2008 11:31:32 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=409&amp;PID=2786#2786</guid>
  </item> 
  <item>
   <title>Building a Report Parameters Form : You should be able to turn the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=409&amp;PID=2389#2389</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 409<br /><strong>Posted:</strong> 09-Jan-2008 at 3:27pm<br /><br />You should be able to turn the user's selections into clauses of an RdbQuery. Here's one that <DIV>retrieves Customers based on a city and company name specified at runtime by the end user's ComboBox selections:</DIV><DIV><FONT size=2><P></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> DoQuery() {</P><P></FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2> selectedCity = </FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.mCityCriterionComboBox.SelectedValue;</P><P></FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2> selectedCompanyName = </FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.mCompanyNameCriterionComboBox.SelectedValue;</P><P></FONT><FONT color=#2b91af size=2>RdbQuery</FONT><FONT size=2> anRdbQuery = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>RdbQuery</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>typeof</FONT><FONT size=2>(</FONT><FONT color=#2b91af size=2>Customer</FONT><FONT size=2>));</P><P>anRdbQuery.AddClause(</FONT><FONT color=#2b91af size=2>Customer</FONT><FONT size=2>.CityEntityColumn, </FONT><FONT color=#2b91af size=2>RdbQueryOp</FONT><FONT size=2>.EQ, selectedCity);</P><P>anRdbQuery.AddClause(</FONT><FONT color=#2b91af size=2>Customer</FONT><FONT size=2>.CompanyNameEntityColumn, </FONT><FONT color=#2b91af size=2>RdbQueryOp</FONT><FONT size=2>.EQ, selectedCompanyName);</P><P></FONT><FONT color=#2b91af size=2>PersistenceManager</FONT><FONT size=2> pm = </FONT><FONT color=#2b91af size=2>PersistenceManager</FONT><FONT size=2>.DefaultManager;</P><P></FONT><FONT color=#2b91af size=2>EntityList</FONT><FONT size=2>&lt;</FONT><FONT color=#2b91af size=2>Customer</FONT><FONT size=2>&gt; customers = pm.GetEntities&lt;</FONT><FONT color=#2b91af size=2>Customer</FONT><FONT size=2>&gt;(anRdbQuery);</P><P>}</P><DIV></DIV></FONT></DIV>]]>
   </description>
   <pubDate>Wed, 09 Jan 2008 15:27:37 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=409&amp;PID=2389#2389</guid>
  </item> 
  <item>
   <title>Building a Report Parameters Form : Let&amp;#039; say I want to search...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=409&amp;PID=2386#2386</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=173" rel="nofollow">lars-erik</a><br /><strong>Subject:</strong> 409<br /><strong>Posted:</strong> 08-Jan-2008 at 11:40pm<br /><br /><DIV>Let' say I want to search for invoices. In the top of the form I have search criterias that aren't related to each other. Let's say we have the following search criteria:</DIV><DIV>a) a combobox displaying statuses of the invoice. This is retrieved from a InvoiceStatus table with code and name.</DIV><DIV>b) an input textbox with customer Number. An output textbox showing the respective customer name.</DIV><DIV>&nbsp;</DIV><DIV>Is it possible to create an FilterEnity to hold both of these two search criterias ? I don't want to use Stored Procedures.</DIV>]]>
   </description>
   <pubDate>Tue, 08 Jan 2008 23:40:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=409&amp;PID=2386#2386</guid>
  </item> 
  <item>
   <title>Building a Report Parameters Form : Lars-Erik: I think he meant create...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=409&amp;PID=2363#2363</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 409<br /><strong>Posted:</strong> 04-Jan-2008 at 11:54am<br /><br /><P>Lars-Erik:</P><P>I think he meant create a business class (named "FilterEntity", or whatever) based on a stored procedure that assembles whatever collection of data it is that you want from whatever sources you want, returning the result as a series of rows with a common structure.</P><P>However, I'm still not quite clear on what you're trying to.&nbsp; From DataMan's original post, it appeared that he was want to populate a ComboBox with *names* of properties from different entities. But then when he said "It will display the Customer.ContactName and the valuemember will be OrderSummary.ID", I got lost, since the DisplayMember and ValueMember for a ComboBox need to be set to properties of the same entity.</P><P>If you can explain further what you want, I'll try to help.</P><DIV>Greg Dunn</DIV><DIV>IdeaBlade</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 04 Jan 2008 11:54:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=409&amp;PID=2363#2363</guid>
  </item> 
  <item>
   <title>Building a Report Parameters Form : Can you explain me how? You mean...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=409&amp;PID=2195#2195</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=173" rel="nofollow">lars-erik</a><br /><strong>Subject:</strong> 409<br /><strong>Posted:</strong> 12-Dec-2007 at 11:34pm<br /><br /><P>Can you explain me how? You mean creating an 'FilterEntity' that holds my search criteria?</P>]]>
   </description>
   <pubDate>Wed, 12 Dec 2007 23:34:51 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=409&amp;PID=2195#2195</guid>
  </item> 
  <item>
   <title>Building a Report Parameters Form : a. you can still create a &amp;#039;ReportFilterEntity&amp;#039;...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=409&amp;PID=1977#1977</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=52" rel="nofollow">Yaron</a><br /><strong>Subject:</strong> 409<br /><strong>Posted:</strong> 19-Nov-2007 at 11:15am<br /><br />a. you can still create a 'ReportFilterEntity' (hope you find a better name) using a Proc/View based entity.&nbsp; the same will be for search criteria. ]]>
   </description>
   <pubDate>Mon, 19 Nov 2007 11:15:27 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=409&amp;PID=1977#1977</guid>
  </item> 
  <item>
   <title>Building a Report Parameters Form : I have trouble with this too....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=409&amp;PID=1714#1714</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=173" rel="nofollow">lars-erik</a><br /><strong>Subject:</strong> 409<br /><strong>Posted:</strong> 20-Oct-2007 at 2:51am<br /><br /><P>I have trouble with this too. I want comboxes on an unbound form to act as search criteria. Someone help</P>]]>
   </description>
   <pubDate>Sat, 20 Oct 2007 02:51:23 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=409&amp;PID=1714#1714</guid>
  </item> 
  <item>
   <title>Building a Report Parameters Form :  _popupControl();  I&amp;#039;m...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=409&amp;PID=1073#1073</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=90" rel="nofollow">DataMan</a><br /><strong>Subject:</strong> 409<br /><strong>Posted:</strong> 05-Sep-2007 at 9:02am<br /><br />_popupControl();<DIV>I'm building a report parameter form that a user will pick data from different combo boxes and when the report runs it will filter the report data.</DIV><DIV>&nbsp;</DIV><DIV>The question I have is...&nbsp; The user will be able to pick 5 or 6 different parameters to choose from which will all be in different comboboxes on the form and all of these choices are coming from different tables.&nbsp; How do I fill a combobox with data from more than one table using entites?</DIV><DIV>&nbsp;</DIV><DIV>So I want a combo box on an unbound form to show Customer.ContactName,&nbsp;&nbsp;OrderSummary.ID, OrderSummary.OrderDate, Product.ProductName.&nbsp; It will display the Customer.ContactName and the valuemember will be OrderSummary.ID</DIV><DIV>&nbsp;</DIV><DIV>Previously I would just create a stored proc and load the combobox with the data from the stored proc.&nbsp; What's the proper way to do this with DevForce and Entities?</DIV><DIV>&nbsp;</DIV><DIV>Thanks</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 05 Sep 2007 09:02:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=409&amp;PID=1073#1073</guid>
  </item> 
 </channel>
</rss>