browseDialog


Author
Message
Ian Johnston
Ian Johnston
StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)
Group: StrataFrame Users
Posts: 77, Visits: 470
I have a view as a BO named cert_viewBO this I set as the BussinessObjectToPopulate and BusinessObjectType, I have selected the search fields and the resultlayout but when I run the browsezDialog no results are returned.

Any ideas?

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Ian.

For a View, you need to have a Pk into it, and the override the primary key once in the BO Mapper, have a look at this picture:


Ian Johnston
Ian Johnston
StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)
Group: StrataFrame Users
Posts: 77, Visits: 470
here is the code for the view:

SELECT     dbo.Certificate.Cert_number AS Certificate, dbo.Certificate.Cert_inbound_date AS date, dbo.Certificate.Cert_trans AS Tr, dbo.Certificate.Cert_net AS net,
                      dbo.Customer.cust_name AS Customer, dbo.Certificate.Cert_trk_license, dbo.Certificate.Cert_Front_trl, dbo.Certificate.Cert_Rear_trl,
                      dbo.Commodity.Commod_name AS commodity, Customer_1.cust_name AS Carrier, dbo.Certificate.PK_Certificate
FROM         dbo.Certificate INNER JOIN
                      dbo.Commodity ON dbo.Certificate.FK_Commodity = dbo.Commodity.PK_Commodity INNER JOIN
                      dbo.Customer ON dbo.Certificate.FK_Customer = dbo.Customer.cust_pk INNER JOIN
                      dbo.Customer AS Customer_1 ON dbo.Certificate.FK_Customer2 = Customer_1.cust_pk

In the sql management studio this will return the expected data. dbo.Certificate.PK_Certificate is the primary key in dbo,Certificate, this was the field I specified in the BO mapper, is that correct. Still no results in the browseDialog.

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
After you set the Primary Key Specification, have you rebuilt the partial for this BO?
Ian Johnston
Ian Johnston
StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)
Group: StrataFrame Users
Posts: 77, Visits: 470
Yes and rebuilt project.
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
From what you are showing, it looks correct. Maybe you could write a small sample using the StrataFrameSample database in the way you are doing there so we could have a look. A small detail that you probably did right, but you said you specified dbo.Certificate.PK_Certificate on the "Override Primary Key Specification" at the BO Mapper, but I guess you put only PK_Certificate there, which should be the proper way, right?
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Ian, follow this post, maybe there is something there that might help you:

http://forum.strataframe.net/FindPost20493.aspx

Ian Johnston
Ian Johnston
StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)
Group: StrataFrame Users
Posts: 77, Visits: 470
Correct, I used PK_certificate. Below is the code for the fill of the BO, should it be different when using a view?

public void Fill()

{

string s = "select * from Cert_listing";

FillDataTable(s);

}

Cert_listing is the name of the view on the server.


Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
I'm sorry Ian, I'm a bit lost now. I thought you were using a BrowseDialog to search a view which had been mapped to a BO. The BO Mapper should use SQL Server for the view source. On the post I made reference to you, there was an example on how to use the BD to fetch records from the View which will populate the ViewBO instance dropped on your form and then you can use its PKs for whatever when the BD is closed. If this isn't the case, please bare with me and put me in the right direction. Wink
Ian Johnston
Ian Johnston
StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)StrataFrame User (151 reputation)
Group: StrataFrame Users
Posts: 77, Visits: 470
So maybe I am on the wrong track, my thinking was that the BO would be filled with data from the view and then the dialogbrowser would filter that down to just the rows that met the search citeria, am I missing something? If you have multiple search fields but only put search information in one and leave the rest blank will that work?
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search