pralash
10th November 2017, 14:08
Hi,
I'm new for LN Programming... I have created a basic report as shown in the attachment (output-report.png)... But I want to need some customization in the existing report.... That is how to add the additional check box option while we execute the report as shown in the attachments(2-exist.png)...
I also need to create some own checkbox similar to (2-exist.png) as shown in the attachment(1-customize.png)...
Finally I need to print the report according to the selection of checkbox by the end user... In order to perform this report operation, can I try this task as a single report or by create 3 individual report....
Can you please assist me that how to perform this task...
Thanks in advance,
Regards,
Pralash
bhushanchanda
10th November 2017, 14:45
Hi,
Pralash, you can do it in a single report. Create 3 different layouts for your report and add print conditions to them. The print condition can be the values of checkboxes. So, depending on the print condition of checkboxes, if print condition is true, that particular layout will be printed.
pralash
10th November 2017, 15:03
Hi,
I have no detailed knowledge about the reporting process in LN. So can you please explain in detail about how to add the checkbox in the session and also how to check the print condition of the check boxes...
Can you please give me sample script for perform this report customization process.
Thanks so much...
Regards,
Pralash
bhushanchanda
10th November 2017, 15:14
Pralash,
That is a fast forward process of learning.
My Advice - Start by creating a session with a simple check box
How to do that?
1. Open the session form in DFE, and add a form field with some name like prnt.f with domain as tcyesno.
2. Declare this form field in your session as
extern domain tcyesno prnt.f
3. Compile the form and script.
4. Start the session, you will see the check box on the form.
This will be the first step towards developing your report.
I feel, it's always to start with the basics rather than starting to code complex things.
To use this form field in your report, you need to add it in your report input fields and then you can use it. But again, that is next part. So, start with the basics.
pralash
10th November 2017, 15:23
Thanks so much for your help Bhushan....
I'll try the steps as you told....
Regards,
Pralash
pralash
13th November 2017, 07:52
Hello bhushanchanda,
I've created a checkbox in the report and also add the form field "tot.log.user" in the report input field... So i'm getting the result as in the attachment... Now I need to check the value of the check box in the report script and enable the corresponding layout....
Could you tell me please the script how to check the value of check box and enable the layout...
Regards,
Pralash
bhushanchanda
13th November 2017, 10:12
Good.
Now, in your report, double click on the layout you want to print based on the condition, in the Output Expression, you can give condition as tot.log.user = tcyesno.yes or tot.log.user = tcyesno.no
See the attached image for reference.
pralash
13th November 2017, 11:13
Hello bhushanchanda,
Thanks so much for your information....
I'll try the layout process as you told....
Regards,
Pralash
pralash
13th November 2017, 15:00
Hello bhushanchanda,
I have created one more detail layout (detail.2)... I set the output expression for detail layout 2 as you already told tot.log.user=tcyesno.yes. ( as shown layout-2.png)
I got the result of detail.1 as shown in the attachment(res1.png) without clicking the checkbox. While I click the checkbox (res1.png), I got the result as shown in the attachment (res4.png)...
Hence while I execute the report by choosing the check box, the detail.1 and detail.2 are executed one by one.... But I want to execute only the detail.2 when I choose the checkbox... So how can I overcome the detail.1 output while detail.2 is printed..?
Can you please assist me how to overcome this issue? and tell me some sample script for handling "detail" section....
Regards,
Pralash
bdittmar
13th November 2017, 15:53
Hello,
on d.1 :
if Checkbox = tcyesno.yes then
lattr.print = false
else
lattr.print = true
endif
on d.2 :
if Checkbox = tcyesno.yes then
lattr.print = true
else
lattr.print = false
endif
or use a printexpression on Detail.1
Printexpression 1 means - print ever
on d.2 you use :
tot.log.user = tcyesno.yes
so use tot.log.user = tcyesno.no on D.1 !
Regards
bhushanchanda
13th November 2017, 16:01
Pralash,
As I can see, you have given the Output expression to only Detail 2 layout. So, for Detail 1 layout, you can set expression as tot.log.user = tcyesno.no and it should work fine.
pralash
14th November 2017, 08:40
Thanks for your information...
It's working fine now....
Regards,
Pralash
pralash
14th November 2017, 08:41
Thanks for your information....
I'll try as you told...
Regards,
Pralash
pralash
14th November 2017, 10:00
Hello bhushanchanda,
I have created a session which list out all users who are logged in the BaaN in a particular time period as shown in the attachment(count.png)...
As I I already discussed with you, When I click the "Total Logged User" check box(k2.png), it will provides the report details as follows.(for example)
Login Date Total Number of User logged in
11/9/2017 6
11/10/2017 8
11/11/2017 10
Can you please tell me how to write script for the above task?
Regards,
Pralash
mark_h
14th November 2017, 21:09
In 4c4 you can just add another layout to accomplish this. What I would do is add a footer layout and put the field in that layout. Then click in the aggregate function and make it total. I would only print that layout when the print total flag was checked. So I would change output expression on it to check if the print total flag was yes(or checked). I would assume ln would be the same - but I have been wrong before on that.
pralash
15th November 2017, 07:49
Thanks so much for your reply....
It's working fine for me if I used the footer layout instead of detail layout... But I want to know that how to find the count for each and every user login in the table as I mentioned in my previous post...
Can you please assist me how to perform this task?
Regards,
Pralash
mark_h
15th November 2017, 14:23
If your report is printing everyone logged into the system - then you could do a count in the report footer. Or if it you want to print totals by lets say something like date. Then you make data a sort field on the report, then add an after.field layout section for date and put your count in that layout.
pralash
18th November 2017, 08:20
Thanks for your information....
I'll try to workout it...
Regards,
Pralash