Browse Dialog Search Field Combo-Enum


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Paul,

I have had trouble reproducing this through the examples that you have provided.  I made a number of changes to the BrowseDialog today and thought I would look as this as well.  I did not make a change on this side as I could not make it fail.  I will look at your sample again to see if I can make it fail from that point.  But I may need some more information in order to address this.  Thanks.

Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
What I posted above doesn't seem to work 100% it fixes the problem of non visible search fields but if you then make a search field visible it does not respect that you added made it visible, so it is like a 50 % fix
Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Ben,

I wanted to check and see if you ever had a chance to fix this? I overwrote the changes I made to the source a long time ago and had to scratch my head for awhile.

Thanks

Paul

Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Ben,

I just added another search fields collection to store the visible controls.

'--New Paul Code Add new private var search field Collection

Private _VisibleSearchFields As New SearchFieldCollection()

In the CreateAllSearchFieldControls() sub I add the search field item to the above collection.

'-- See if the control is visible

If Not loItem.Visible Then

Continue For

End If

'--Start New Paul Code Add to Visble Collection

_VisibleSearchFields.Add(loItem)

'--End New Paul Code Add to Visble Collection

Finally in the  BuildWhereSearchClause

'-- Cycle through all of the fields to determine which fields

' have contents

For lnCnt = 0 To _Controls.Count - 1

'-- Get a reference to the control

loControl = _Controls(lnCnt)

'-- If the control has data, then add the control to the list of where statements

If HasData(loControl) Then

'-- Add the where statement-- Paul Change to look at new collection

'loReturn.Add(BuildWhereElement(lnCnt))

loReturn.Add(BuildWhereElement(_VisibleSearchFields(lnCnt)))

End If

Next

 

There is still an issue with re-adding non visible search fields via the search fields list box. I would need to rebuild the visible controls collection there but just haven't looked at it yet

P


StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
What did you change to make it work?
Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Ben,

It looks like I have the code fixed on my end

Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Ben,

I was out of the office all morning at a branch location....

The problem is that when you are building the where clause you are looping through the controls and passing the control's counter position to the BuildWhereElement function whch then looks at the adjusted fields collection.

However the count does not nessasarily reflect the search fields proper position in the adjusted fields collection if there are non visible fields.

As you can see the on second Select Statement the where clause is built with the wrong field. Hope that makes sense.

Command #: 1
Timestamp: 2007-07-26 14:34:51.933
General Command Settings
Command Type: Text
Object Type: System.Data.SqlClient.SqlCommand
Connection String: Data Source=ares;Initial Catalog=StrataFrameSample;Integrated Security=True;Persist Security Info=False;Asynchronous Processing=True
Transaction: False
Command Settings
CommandText: SELECT TOP 1000 [cust_pk], [cust_Company], [cust_Prefix], [cust_FirstName], [cust_MiddleName], [cust_LastName], [cust_Suffix], [cust_Address1], [cust_Address2], [cust_City], [cust_State], [cust_Postal], [cust_Country], [cust_Email], [cust_PhoneDay], [cust_PhoneDayType], [cust_PhoneNight], [cust_PhoneNightType], [cust_Created], [cust_Version] FROM [dbo].[Customers] WHERE [cust_PhoneDayType] = @PARAM0;
Command Parameters
@PARAM0: '1' [DbType: Int32 | Size: 0 | Direction: Input | SourceColumn: | SourceVersion: Current]
Command #: 2
Timestamp: 2007-07-26 14:35:02.292
General Command Settings
Command Type: Text
Object Type: System.Data.SqlClient.SqlCommand
Connection String: Data Source=ares;Initial Catalog=StrataFrameSample;Integrated Security=True;Persist Security Info=False;Asynchronous Processing=True
Transaction: False
Command Settings
CommandText: SELECT TOP 1000 [cust_pk], [cust_Company], [cust_Prefix], [cust_FirstName], [cust_MiddleName], [cust_LastName], [cust_Suffix], [cust_Address1], [cust_Address2], [cust_City], [cust_State], [cust_Postal], [cust_Country], [cust_Email], [cust_PhoneDay], [cust_PhoneDayType], [cust_PhoneNight], [cust_PhoneNightType], [cust_Created], [cust_Version] FROM [dbo].[Customers] WHERE [cust_LastName] LIKE @PARAM0;
Command Parameters
@PARAM0: '2%' [DbType: String | Size: 60 | Direction: Input | SourceColumn: | SourceVersion: Current]


StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
While I'm looking at this sample, can you take a look at the debug file for the data source?  Does the command executed by the BrowseDialog look remotely correct?  Or is it adding/removing fields?
Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
It looks like the problem is with non visible search fields and the adjusted search fields collection. Here is a small sample app
Attachments
WindowsApplication2.zip (84 views, 75.00 KB)
Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
I got it to work on a simple example so I'm not sure what is causing my issue.
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