eric.dizon
25th October 2012, 17:42
I created a custom print dialog box which contains a Production Order (tisfc001.pdno) From and To inputs box/filter. I've added the report on the Form Command on tisfc0501m000 session (Production Orders).
What is happening is if I highlight/select any Production Order in grid/list in this session and activate my Custom print dialog box, It won't show me the selection filter anymore and go straight to the ttstpsplopen (Select Device session) on what device I am printing the report (ie. D60 or SSRS) and when try to print it will say No Data Found.
Is there a setting to prevent my custom print session from jumping to the Select Device session right away so it shows the Production Order From -To input/filter in my dialog box.
And is there a setting or a script I can add to forward the selected line in my custom dialog to automatically populate my filters (From/To) from the selected Produciton Order in session tisfc0501m000
JaapJD
26th October 2012, 15:34
It seems to me that you are struggling with the NCRS concept (Non consecutive record selection). If you select records in the overview, the print dialog will not show the ranges. This is how a lot of standard LN sessions work. Probably you copied the form of a standard session and that contained a so-called selection group.
This is how it should work:
- No selection in the overview: print dialog shows ranges and executes a query that should result in all records in the range.
- Selection(s) made in overview: print dialog does not show the range, but process all selected records via the do.parent.selection() function. If the range was the only input on the dialog, this dialog is suppressed automatically.
If you don't want this standard bahavior implemented, you could uncheck the Selection Group option for the group in DFE.
I would recommend you to check the Software Convention Guide and the Programmers guide that can be found in the InforXtreme doc portal.
eric.dizon
29th October 2012, 22:00
Thanks for your reply Jaap I will try it out tomorrow. I know the Programmer's Guide but I haven't heard about the Software Convention guide can you please point me to where I can take a look at it?
JaapJD
29th October 2012, 22:52
Hi Eric, it can be found in the Documentation folder of the Enterprise Server image in Infor's download center. It is called Design Principles Guide.
eric.dizon
30th October 2012, 21:17
Hi Jaap,
I got a hold of the design principle guide and followed the snippet that is illustrated there that has the greastest resemblance for what I am doing, but I get this unresolve reference. I've already added the tccomdll0010 - Reporting DAL but it seems that I am missing something... Please help thanks. Eric.
eric.dizon
30th October 2012, 21:17
Tis is the Unresolved reference I am getting
tisfc04050:
std_gen6.2 -z -s ptisfc04050 -qe "e:/erpln/bse/tmp/tmp014224036"
bic6.2 -T 1752 -Pvariant=0 ptisfc0405g -z -u -d ottstpstandard:otccomdll0010 -o otisfc0405 -f "e:/erpln/bse/tmp/tmp014224035" -pacc b61aoshp -qe "e:/erpln/bse/tmp/tmp014224037"
ptisfc04050( 273): Error: 'dalhookerror' not declared
ptisfc04050( 46): Error: Unresolved reference to function 'handle.initialize.report.variables'.
ptisfc04050( 58): Error: Unresolved reference to function 'tccom.dll0010.handle.closing.message.in.statusbar'.
ptisfc04050( 103): Error: Unresolved reference to function 'handle.parent.selection.form.variables'.
ptisfc04050( 216): Error: Unresolved reference to function 'retifnok'.
ptisfc04050( 166): Error: Unresolved reference to function 'tcmcs.dll0011.show.progress.indicator'.
ptisfc04050( 170): Error: Unresolved reference to function 'update.progress.indicator'.
ptisfc04050( 182): Error: Unresolved reference to function 'destroy.progress.indicator'.
ptisfc04050( 216): Error: Unresolved reference to function 'report.group'.
ptisfc04050( 238): Error: Unresolved reference to function 'create.progress.indicator'.
ptisfc04050( 253): Error: Unresolved reference to function 'set.progress.indicator'.
JaapJD
31st October 2012, 08:30
The code snippets are just examples taken from a more extended script. You should just pick the parts from it you really need. So, look at how do.parent.selection() is used in the example and apply that for your own logic.
If you add #include <bic_dam> in the script, some errors will have gone already.
eric.dizon
1st November 2012, 16:15
Hi Jaap,
I am trying to understand the syntax of do.parent.selection(), I cannot seem to grasp parameters or arguments. I have posted my code
This is the code that I am trying to achieve I would need the NCRS selection from tisfc0501 (Productions) to be utilized in my custom Form. But for the life of me I cannot seem to understand on how to incorporate or use the do.parent.selection() function so my Custom Print Dialog box would use sel.use.tisfc001 in my selection group. If you can point me to the right direction it will be much appreciated…
|******************************************************************************
|* tisfc0405 0 VRC B61O a oshp
|* Print EHC Safety Brush Labels
|* Eric Dizon
|* 2012-10-23
|******************************************************************************
|* Main table ticst001 Estimated and Actual Material Costs, Form Type 4
|******************************************************************************
|****************************** declaration section ***************************
declaration:
table tticst001 | Estimated and Actual Material Costs
extern domain tcpdno pdno.f fixed
extern domain tcpdno pdno.t fixed
|extern domain tcpono pono.f
|extern domain tcpono pono.t
|long id1
|****************************** program section ********************************
|****************************** group section **********************************
group.1:
init.group:
get.screen.defaults()
|****************************** choice section ********************************
choice.cont.process:
on.choice:
execute(print.data)
choice.print.data:
on.choice:
if sel.use.parent.selection("tisfc001") then
do.parent.selection("sel.use.tisfc001") - | how to use this function?
else
if rprt_open() then
read.main.table()
rprt_close()
else
choice.again()
endif
endif
|****************************** field section *********************************
field.pdno.f:
when.field.changes:
pdno.t = pdno.f
|****************************** function section ******************************
functions:
function read.main.table()
{
select ticst001.*
from ticst001
where ticst001._index1 inrange {:pdno.f}
and {:pdno.t}
order by ticst001._index1
selectdo
rprt_send()
endselect
}
JaapJD
1st November 2012, 20:58
Hi Eric,
You need changes in the on.choice of print.data and the read.main.table function.
on.choice:
if rprt_open() then
if sel.use.parent.selection("tisfc001") then
do.parent.selection(read.main.table, tisfc001.pdno, tisfc001.pdno)
else
read.main.table(pdno.f, pdno.t)
endif
rprt_close()
else
choice.again()
endif
function read.main.table(domain tcpdno i.pdno.f,
domain tcpdno i.pdno.t)
{
select ticst001.*
from ticst001
where ticst001._index1 inrange {:i.pdno.f}
and {:i.pdno.t}
order by ticst001._index1
selectdo
rprt_send()
endselect
}
In this way you print either the materials in the given range of production orders (when the session has been started standalone, or no selection has been made in the overview session) or the materials of the selected production orders only.
eric.dizon
5th November 2012, 18:59
Thanks Jaap.
I believe I am close.. but I get function does not returns a value error
ptisfc04050( 45): Error: Function 'read.main.table' returns no value.
ptisfc04050( 45): Error: Function 'read.main.table' returns no value.
what data type should be the return value for this function?
eric.dizon
5th November 2012, 19:23
Don't worry about it... I got it worry working by putting a long return value datatype and returning one. Unless that is wrong or should I be expecting a domain or other data type for the read.main.table function?
JaapJD
5th November 2012, 21:07
See the programmers manual for the do.parent.selection() function. It says that the called function should return a type long. So, your solution is correct. My bad that I missed that in the example code.
eric.dizon
20th November 2012, 22:55
Thanks. That worked...
eric.dizon
14th February 2013, 23:29
I am having an same issue my custom Overview session and try to activate my Custom print dialog box it doesn't show the filters it goes directly to the select device dialog. What am I doing differently. Before I am using a LN Standard session now I am trying to activate the custom print dialog on custom overview session. Am I missing something?