PODetailSearch - How to use

Disregard my question I'm stupid sometimes, I got it to work. Instead of using the PODetailSearchAdapter I used the PODetailSearch BO.

         bool morePages;
         PODetailSearchDataSet ds = _poSearch.GetRows((string)"PONum=" + e.Row.Cells["PONum"].Value, (string)"PONum=" + e.Row.Cells["PONum"].Value + " And POLine=" + e.Row.Cells["POLine"].Value, 0, 0, out morePages);
         e.Row.Cells["_orderQty"].Value = ds.Tables[0].Rows[0]["CalcOurQty"];




________________________________
From: tkoch77 <tkoch77@...>
To: vantage@yahoogroups.com
Sent: Tuesday, March 12, 2013 10:49 AM
Subject: [Vantage] PODetailSearch - How to use

Hi all,

I want to return the XOrderQty from PODetail and getting frustrated because it shouldn't be this difficult. Does anyone have an example on how to use the PODetailSearchAdapter. This is what I have but it is not working. I'm not entirely sure I am adding the where clauses correctly.

      bool morePages;
      SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
      opts.NamedSearch.WhereClauses.Add("whereClausePoHeaderSearch", "PONum=" + e.Row.Cells["PONum"].Value);
      opts.NamedSearch.WhereClauses.Add("whereClausePoDetailSearch", "PONum=" + e.Row.Cells["PONum"].Value + " And POLine=" + e.Row.Cells["POLine"].Value);
      DataSet ds = _poSearch.GetRows(opts, out morePages);

I have also tried using the BOReader but no success. I get an error in my appserver logs saying Mismatched parameter types passed to procedure GetRows bo/PODetailSearch/PODetailSearch.p. (3230). It looks like the GetRows method wants a where clause for the POHeader and PODetail tables, which might not be possible using the BOReader.

DataSet ds = _boReader.GetRows("PODetailSearch", "PONum=" + e.Row.Cells["PONum"].Value + " And POLine=" + e.Row.Cells["POLine"].Value, "XOrderQty");

Thanks in advance,
-Ted



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.%c2%a0
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



[Non-text portions of this message have been removed]
Hi all,

I want to return the XOrderQty from PODetail and getting frustrated because it shouldn't be this difficult. Does anyone have an example on how to use the PODetailSearchAdapter. This is what I have but it is not working. I'm not entirely sure I am adding the where clauses correctly.

bool morePages;
SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
opts.NamedSearch.WhereClauses.Add("whereClausePoHeaderSearch", "PONum=" + e.Row.Cells["PONum"].Value);
opts.NamedSearch.WhereClauses.Add("whereClausePoDetailSearch", "PONum=" + e.Row.Cells["PONum"].Value + " And POLine=" + e.Row.Cells["POLine"].Value);
DataSet ds = _poSearch.GetRows(opts, out morePages);

I have also tried using the BOReader but no success. I get an error in my appserver logs saying Mismatched parameter types passed to procedure GetRows bo/PODetailSearch/PODetailSearch.p. (3230). It looks like the GetRows method wants a where clause for the POHeader and PODetail tables, which might not be possible using the BOReader.

DataSet ds = _boReader.GetRows("PODetailSearch", "PONum=" + e.Row.Cells["PONum"].Value + " And POLine=" + e.Row.Cells["POLine"].Value, "XOrderQty");

Thanks in advance,
-Ted