Home » Developer & Programmer » Forms » Search form
Search form [message #255061] |
Mon, 30 July 2007 09:33 |
usmanelahi
Messages: 54 Registered: July 2007 Location: Karachi
|
Member |
|
|
Hello everyone could you plz some help me in creating search form on form 6i i want to need this type of form like
i have two block master/detail
when i type like 10 on deptno column in master table then find where deptno=10% or i type like a on column dname find in detail table empno,ename,sal where deptno=10 or dname=d%fetch all records in detail table in all tabular rows without any enter press or f8 can it is possible on oracle becoz today i see this type of form on vb its a very quick & easy to use for userfriendly environment
plz send me the query,trigger, or procedure
Best Regards,
Usman [MERGED by LF]
[Updated on: Sat, 27 October 2007 12:21] by Moderator Report message to a moderator
|
|
|
|
|
Re: Search Form [message #255324 is a reply to message #255191] |
Tue, 31 July 2007 07:18 |
usmanelahi
Messages: 54 Registered: July 2007 Location: Karachi
|
Member |
|
|
thanks for your reply David
plz give me one solution about this form
when i type a and press button plz give me query for when button pressed trigger like select empno,ename,sal from emp where ename=a% or other solution if u have plz give me i m very thankfull to you
please send me step by step procedure
i m new in oracle
Best Regards,
Usman
|
|
|
Re: Search Form [message #255387 is a reply to message #255324] |
Tue, 31 July 2007 11:30 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
If the form you are trying to create is for self-educational purposes, I believe it is you who should do the job. Otherwise, you won't learn anything if you get the solution from someone else.
Oracle Forms already provide functionality you are looking for. It will NOT be a master-detail form, though, but it will work like a charm.
As in your example: if you create a default form (using the Wizard), run it and execute query with "D%" in the DNAME item, you'll get all departments whose name starts with "D". There's nothing unusual in it - it works that way for ages.
You can even search through multiple items. You can even write queries using parameters in QUERY mode! Enter a parameter name (the simplest one is :a), press EXECUTE-QUERY and you'll get a window which enables you to write (almost) any query you want; for example
WHERE :a IN (SELECT deptno FROM emp
WHERE job = 'MANAGER'
AND sal > 2000
AND hiredate => TO_DATE('01.03.1990', 'dd.mm.yyyy')
)
Now, if you'd like to reinvent the wheel, do so, but not on someone else's expense.
|
|
|
Re: Search Form [message #255558 is a reply to message #255387] |
Wed, 01 August 2007 03:51 |
usmanelahi
Messages: 54 Registered: July 2007 Location: Karachi
|
Member |
|
|
Hello Mr.David
do u have some knowledge about vb6 queries
please read this query it is in vb6 qyery plz tell me how to convert in form 6i this project also i creating for company
Public Sub Fill_Popup_For_invoice(myFlex As MSFlexGrid, search_condition As String)
Dim tmp_Importer_rs As ADODB.Recordset
Dim a As String
With myFlex
.Cols = 13
.Row = 0
.RowHeight(0) = 400
a = 0
.col = a
'.CellAlignment = flexAlignLeftBottom
.CellFontSize = 8
.ColWidth(a) = 400
.Text = "Code"
a = a + 1
.col = a
.CellFontSize = 5
'.CellAlignment = flexAlignLeftBottom
.ColWidth(a) = 800
.CellFontBold = True
.Text = "Inv_No"
If Len(Trim(search_condition)) = 0 Then
'sql = " select a.invoice_Ref,a.Invoice_no,a.Invoice_Date, " & _
" b.buyer_name from shipmentdetail a,buyer b " & _
" where a.buyer_code =b.buyer_code " & _
" order by invoice_no"
sql = " select a.*, " & _
" b.buyer_name from shipmentdetail a,buyer b " & _
" where a.buyer_code =b.buyer_code " & _
" order by invoice_no"
Else
'sql = " select a.invoice_Ref,a.Invoice_no,a.Invoice_Date, " & _
" b.buyer_name from shipmentdetail a,buyer b " & _
" where a.buyer_code =b.buyer_code " & _
" and invoice_no like '" & search_condition & "%'" & _
" order by invoice_no "
sql = " select a.*, " & _
" b.buyer_name from shipmentdetail a,buyer b " & _
" where a.buyer_code =b.buyer_code " & _
" and invoice_no like '" & search_condition & "%'" & _
" order by invoice_no "
End If
Set tmp_Importer_rs = New ADODB.Recordset
tmp_Importer_rs.Open sql, ExportData, adOpenStatic, adLockReadOnly
If tmp_Importer_rs.EOF Then
DATA_EXSIST = False
MsgBox "There is no related Entery"
Exit Sub
End If
tmp_total_jobs = tmp_Importer_rs.RecordCount
.Rows = Val(tmp_total_jobs) + 1
n = 0
While Not tmp_Importer_rs.EOF
DoEvents
On Error GoTo ErrorHandler
n = n + 1
.Row = n
.RowHeight(n) = 300
.col = 0
' .CellAlignment = flexAlignLeftCenter
' .CellFontSize = 10
' .CellFontBold = True
.Text = IIf(Len(Trim(tmp_Importer_rs!Invoice_Ref)) > 0, tmp_Importer_rs!Invoice_Ref, " ")
.col = 1
' .CellAlignment = flexAlignLeftCenter
' .CellFontSize = 5
' .CellFontBold = True
.Text = IIf(Len(Trim(tmp_Importer_rs!Invoice_No)) > 0, tmp_Importer_rs!Invoice_No, " ")
tmp_Importer_rs.MoveNext
Wend
End With
tmp_Importer_rs.Close
Set tmp_Importer_rs = Nothing
ErrorHandler:
Exit Sub
End Sub
|
|
|
search record in detail [message #255702 is a reply to message #255061] |
Wed, 01 August 2007 09:17 |
usmanelahi
Messages: 54 Registered: July 2007 Location: Karachi
|
Member |
|
|
Hello sir how r u hope u r fine plz tell me how to create search form in form 6i i have two blocks dept,emp (master/detail) i want this form when user type on dept field 1 then search empno,deptno,ename,sal from emp where dept_no='1%'
find in detail table
i know if i type a% and press f8 but i need this type of form
becoz i have three fields in master like first i type on field 1 deptno 1 where deptno=1% second field sal 5000 search in detail where sal=5000
if type 100000 then give message no record found like this
plz give me solution short & easy
i m very thankful to you
Best Regards,
usman
|
|
|
|
Search form / temp topic by LF [message #260631 is a reply to message #255061] |
Mon, 20 August 2007 09:22 |
usmanelahi
Messages: 54 Registered: July 2007 Location: Karachi
|
Member |
|
|
Hello how r u hope u r fine i m very need to creating a search form plz if u have a form like search by ename by sal by job just like when i type a in non database text item then select empno,ename,sal where empno=a% and i type in non database item 5 then select empno,ename,sal where empno=a% and sal =5% plz send me fmb file by email m.usman86@inbox.com i m very thankful to u i know u had achieve a form like this .
|
|
|
|
|
|
Re: How to create a "Search Form" [message #262773 is a reply to message #261309] |
Tue, 28 August 2007 04:51 |
usmanelahi
Messages: 54 Registered: July 2007 Location: Karachi
|
Member |
|
|
yes i follow david instructions but i think u all are not understand what is my question i cant ask other question till first question solution is not give from forum
look attachment windows help template
i want this template like master/detail
table plz create this form .fmb file
like dept emp & send back to me
i m very very thankful to you
Best Regards,
Usman
[Updated on: Tue, 28 August 2007 20:36] by Moderator Report message to a moderator
|
|
|
Re: How to create a "Search Form" [message #262836 is a reply to message #262773] |
Tue, 28 August 2007 06:19 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Although I don't know much about it, your request reminded me of Oracle Text.
Oracle | Oracle Text uses standard SQL to index, search, and analyze text and documents stored in the Oracle database, in files, and on the web. Oracle Text can perform linguistic analysis on documents, as well as search text using a variety of strategies including keyword searching, context queries, Boolean operations, pattern matching, mixed thematic queries, HTML/XML section searching, and so on. It can render search results in various formats including unformatted text, HTML with term highlighting, and original document format. Oracle Text supports multiple languages and uses advanced relevance-ranking technology to improve search quality. Oracle Text also offers advanced features like classification, clustering, and support for information visualization metaphors.
|
What do you think? Would something like this be interesting for you?
|
|
|
Re: How to create a "Search Form" [message #263038 is a reply to message #262773] |
Tue, 28 August 2007 20:38 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Littlefoot's answer seems the way to go for me.
@usnpk, please use punctuation. It makes reading sentences in English much easier.
David
|
|
|
Goto Forum:
Current Time: Sun Feb 02 18:45:36 CST 2025
|