User login
|
|
Frontpage Sponsor
|
|
Poll
|
How big is your Baan-DB (just Data AND Indexes) 0 - 200 GB 16% 200 - 500 GB 27% 500 - 800 GB 2% 800 - 1200 GB 9% 1200 - 1500 GB 9% 1500 - 2000 GB 14% > 2000 GB 23% Total votes: 44 |
Baanboard at LinkedIn
|

|
|
|
 |

5th January 2012, 14:42
|
 |
Member
|
|
Join Date: Jun 2009
Posts: 34
|
|
Baan: Baan IV, ERP LN 6.1 FP7 -
DB: Oracle, SQL Server -
OS: Windows 2008
|
Zoom from filter
Baan: ERP LN 6.1 FP7 C/S: Client
Hi, I have a session which is been zoomed from another session from a field.
I need whenever the session is zoomed it should show only a particular record.
I am using following script on, it is not giving any error but not showing selected record, in debug I could found the variables are having correct value, please suggest...
----
zoom.from.all:
on.entry:
get.var(parent, "whinh220.orno", morno)
get.var(parent, "whinh220.pono", mlin)
query.extend.where.in.zoom("whalp212.ordn = " & quoted.string(morno) & " and whalp212.line = " & quoted.string(mlin))
|

5th January 2012, 15:16
|
 |
Guru
|
|
Join Date: Sep 2002
Location: Netherlands
Posts: 819
|
|
Baan: BaanIV, BaanERP, ERP LN 6.1 -
DB: Oracle, SQL Server -
OS: Unix, Windows
|
The query.extend.where.in.zoom function should be used in the calling session. If you want to code it in the called session, you should use query.extend.where.
|

5th January 2012, 17:40
|
 |
Member
|
|
Join Date: Jun 2009
Posts: 34
|
|
Baan: Baan IV, ERP LN 6.1 FP7 -
DB: Oracle, SQL Server -
OS: Windows 2008
|
Not working
Hi Jaap
Tried as suggested but it is still not opening the corrected record.
|

5th January 2012, 17:45
|
 |
Guru
|
|
Join Date: Sep 2002
Location: Netherlands
Posts: 819
|
|
Baan: BaanIV, BaanERP, ERP LN 6.1 -
DB: Oracle, SQL Server -
OS: Unix, Windows
|
If you changed the called session to use query.extend.where, you need also to call the rebuild.query() function. And maybe you need also the execute(find.data).
|

5th January 2012, 18:01
|
 |
Member
|
|
Join Date: Aug 2008
Posts: 38
|
|
Baan: BaaN V, LN -
DB: Oracle -
OS: Unix, Windows
|
Hi friend,
First thing you have to use query.extend.where.in.zoom() in the selection.filter sub-section of the field you are working. Another important thing is that the field whinh220.pono is numeric and you are using quoted.string(), that is not right.
Good luck.
|

5th January 2012, 21:12
|
 |
Member
|
|
Join Date: Jun 2009
Posts: 34
|
|
Baan: Baan IV, ERP LN 6.1 FP7 -
DB: Oracle, SQL Server -
OS: Windows 2008
|
Hi,
Thanks for the posts friends.
Jaap, Achually I am making a change in the form, I have changed a normal input field to a input zoom field which if zoomed opens the session where user has to enter some input in a field for a selected record as per parent session.
I do not have the script of main session.
The sub session is a customized session so I can write a script on it.
As suggested I will try for rebuild.query.
Ipineda, As I explained above I can not write anything on the main form field as do not have script of the same. I have also tried it without quoted string but still not working.
Thanks
Virendra
|

6th January 2012, 09:03
|
 |
Member
|
|
Join Date: Oct 2010
Location: New Delhi
Posts: 85
|
|
Baan: baan 4,erp ln6 FP2 -
DB: MS SQL -
OS: Windows XP,Windows 2000
|
Hi,
You can also try Query.extension = "Expression " in before .program section of the cutomized session.
When this customized session is opened, import order and position in variables in before.program section and then you can use query.extension.
For ex.
before.program:
import("whinh220.orno",var.orno)
import("whinh220.pono",var.pono)
query.extension = "customized table._index1 inrange {:var.orno,:var.pono}"
or
query.extension = "customized table.orno = :var.orno and customized table.pono = :var.pono"
Might Help.
Regards Dhruv
|

6th January 2012, 10:37
|
Member
|
|
Join Date: Dec 2008
Posts: 58
|
|
Baan: LN 6.1 -
DB: MS SQL -
OS: Windows 2003
|
I feels following code posted by you is wrong:
query.extend.where.in.zoom("whalp212.ordn = " & quoted.string(morno) & " and whalp212.line = " & quoted.string(mlin))
Instead of quaoted.string for a long value "mlin" use str$(mlin). i.e.,
query.extend.where.in.zoom("whalp212.ordn = " & quoted.string(morno) & " and whalp212.line = " & str$(mlin))
Also if require use rebuild.query() after writingthe above code.
Regards,
Gaurav
|

6th January 2012, 10:40
|
Member
|
|
Join Date: Dec 2008
Posts: 58
|
|
Baan: LN 6.1 -
DB: MS SQL -
OS: Windows 2003
|
And also if require try after this rebuild.query()
|

6th January 2012, 18:33
|
 |
Member
|
|
Join Date: Aug 2008
Posts: 38
|
|
Baan: BaaN V, LN -
DB: Oracle -
OS: Unix, Windows
|
In that case, try the rebuild.query() I'm sure that will help, and post your solution so other can get help too.
Bye.
|

21st January 2012, 14:01
|
 |
Member
|
|
Join Date: Jun 2009
Posts: 34
|
|
Baan: Baan IV, ERP LN 6.1 FP7 -
DB: Oracle, SQL Server -
OS: Windows 2008
|
Back again
Hi friends...
Sorry for not responding on the posts, was away on another task.
Started working again on it, unfortunately I am still stuck on it.
Here is the outcome.
I changed the query to as suggested:
before.program:
get.var(parent, "whinh220.orno", morno)
get.var(parent, "whinh220.pono", mlin)
get.var(parent, "whinh220.oorg", motyp)
query.extension = "whalp212.ordn = morno and whalp212.line = mlin"
rebuild.query()
------
it gives error.
Following is windows error log which shows SQL syntax not correct, we can see values are passed fine now but the syntax seems to be wrong.
BdbErrno : 302 (SQL syntax not correct)
ExtraInfo : session: "whalp2112m001";object: "whalp2112m001"; function: "sql.parse.stp" sql.parse; company number: 450
query: "SELECT whalp212.* FROM whalp212 WHERE {whalp212.otyp,whalp212.ordn,whalp212.line} = {:whalp212.otyp,:whalp212.ordn,:whalp212.line} AND (whalp212.ordn = 100000044 and whalp212.line = 10) ORDER BY whalp212._index1 "
Message : FATAL ERROR: Error 302 (SQL syntax not correct) on sql statement
Any suggestions...
Thanks
Virender
|

29th January 2012, 15:51
|
 |
Member
|
|
Join Date: Jun 2009
Posts: 34
|
|
Baan: Baan IV, ERP LN 6.1 FP7 -
DB: Oracle, SQL Server -
OS: Windows 2008
|
Its done...
Finally its done, here is the final code.
before.program:
get.var(parent, "whinh200.oorg", motyp)
get.var(parent, "whinh200.orno", morno)
form.all:
before.form:
query.extend.select("whalp212.* ")
query.extend.from("whalp212")
query.extend.where("whalp212.otyp = " & str$(etol(motyp)) & " and whalp212.ordn = " & quoted.string(morno))
rebuild.query()
execute(find.data)
Thanks all for all your valuable comments.
Virender
|

29th January 2012, 15:53
|
 |
Member
|
|
Join Date: Jun 2009
Posts: 34
|
|
Baan: Baan IV, ERP LN 6.1 FP7 -
DB: Oracle, SQL Server -
OS: Windows 2008
|
Closing the thread...
|

30th January 2012, 15:35
|
 |
Guru
|
|
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,194
|
|
Baan: Baan 4C4 A&D1 -
DB: Oracle -
OS: Sun Solaris
|
No reason to close it or lock. Someone else might have a question on this topic and continue this thread.
Thanks
__________________
Mark
GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.
Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
|

1st February 2012, 08:09
|
 |
Member
|
|
Join Date: Jun 2009
Posts: 34
|
|
Baan: Baan IV, ERP LN 6.1 FP7 -
DB: Oracle, SQL Server -
OS: Windows 2008
|
Quote:
Originally Posted by mark_h
No reason to close it or lock. Someone else might have a question on this topic and continue this thread.
Thanks
|
You are right Mark, sure.
Thanks
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|