krushna
4th January 2016, 08:21
Hello,,
Related to my query I have already checked every thing in forum but still I am going to wrong way and getting error in my session. plz help me out :confused:

my requirement is to print amount that is ticpr300.amnt but from two different companies at a time in a session.
And I have to put those companies in its form filter like the user will put companies 100 and 200 or else 110 and 600 or else 430 and 260 what ever
And according to that companies the amount should come in to there respective place in the report layout.
I have used <table>._compnr

bhushanchanda
4th January 2016, 12:22
Hi,

You can create 2 variables say x and y. Now, in your script you can assign the amounts to these variables and show it on your report layout.

e.g.

extern domain tcncmp amt.comp.x,amt.comp.y

amt.comp.x = 0.0
amt.comp.y = 0.0

select table_name.amount_field
from table_name
where table_name._compnr = :comp.x|Select data from company x
... conditions
selectdo
amt.comp.x = table_name.amount_field
endselect

select table_name.amount_field
from table_name
where table_name._compnr = :comp.y |Select data from company y
... conditions
selectdo
amt.comp.y = table_name.amount_field
endselect

Now add amt.comp.x and amt.comp.y on your report layout.

krushna
5th January 2016, 20:59
Hello bhushan,
Thank you bhushan I solved those errors with your help,, actually I had some silly mistakes in my program script and I could identify that exactly after comparing with your example
and I think you are the best guy in baanboard. :)
Thanks for your quick respond.