Home » Developer & Programmer » Forms » Search form
Search form [message #255061] Mon, 30 July 2007 09:33 Go to next message
usmanelahi
Messages: 53
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 #255106 is a reply to message #255061] Mon, 30 July 2007 11:26 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
No, that's not the way this Forum works. You can not expect someone to do the job for you. Do the programming by yourself; when there's a question about specific problem, come here and ask. You'll get the answer (at least, most people do).

BTW, if you like that Visual Basic form that much, what will you do with Oracle form? Why don't you use VB one?
Re: Search Form [message #255191 is a reply to message #255061] Mon, 30 July 2007 23:56 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Forms uses block mode on multiple platforms, VB is a PC thing.

In standard Forms you have to push a button, sorry, but that's the way it is. If you want a VB look-a-like then either write it in VB or write a Java thingy that runs between the Form and the user.

David
Re: Search Form [message #255324 is a reply to message #255191] Tue, 31 July 2007 07:18 Go to previous messageGo to next message
usmanelahi
Messages: 53
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 Go to previous messageGo to next message
Littlefoot
Messages: 20896
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 Go to previous messageGo to next message
usmanelahi
Messages: 53
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 Go to previous messageGo to next message
usmanelahi
Messages: 53
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

Re: Search Form [message #256103 is a reply to message #255558] Fri, 03 August 2007 01:20 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
From what I can see you have a 'buyer' table and a 'shipmentdetail' table. Then there is the fairly normal relationship, 'buyer_code = buyer_code', which exists between them.

Please review the following Master-Detail entries
Simple
http://www.orafaq.com/forum/m/218834/67467/#msg_218834
Query
http://www.orafaq.com/forum/m/201562/67467/?srch=master+detail+david+query#msg_201562

Once you understand them you should have no trouble reworking them to your requirements.

David

Upd: Typo. Sorry.

[Updated on: Thu, 23 August 2007 19:59]

Report message to a moderator

Search form / temp topic by LF [message #260631 is a reply to message #255061] Mon, 20 August 2007 09:22 Go to previous messageGo to next message
usmanelahi
Messages: 53
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 #260707 is a reply to message #260631] Mon, 20 August 2007 14:39 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Search the board; we've discussed it several days ago.
Re: How to create a "Search Form" [message #261254 is a reply to message #260707] Wed, 22 August 2007 04:02 Go to previous messageGo to next message
usmanelahi
Messages: 53
Registered: July 2007
Location: Karachi
Member

plz send me a link
Re: How to create a "Search Form" [message #261309 is a reply to message #261254] Wed, 22 August 2007 05:26 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I did even better - merged your newly opened topic with the old one. Next time, please, do not open a new topic for existing problem; continue discussion in there.

By the way, did you follow David's instructions?

If you still need a link, here it is.
Re: How to create a "Search Form" [message #262773 is a reply to message #261309] Tue, 28 August 2007 04:51 Go to previous messageGo to next message
usmanelahi
Messages: 53
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
./fa/2956/0/

[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 Go to previous messageGo to next message
Littlefoot
Messages: 20896
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 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT 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
Previous Topic: Logon_Screen and Main Screen restrict access problem
Next Topic: reports behaving differently
Goto Forum:
  


Current Time: Tue Dec 06 02:16:53 CST 2016

Total time taken to generate the page: 0.09416 seconds