showstuff11
28th July 2015, 17:45
is there a way to convert columned output into rows in report script?
any suggestion will be much appreciated! thanks!

bhushanchanda
28th July 2015, 18:00
Hi,

It's not an easy task to do that also it depends upon how your program script logic is written.

If we take a simple example of a report having following

Item, Inventory in Warehous X, Inventory in Warehouse Y

And now, you want

Item,Warehouse, Inventory

It will need a bit of programming. I will prefer going through the programmers guide and get good hold of programming report script.

In the above mentioned case, if the program script is directly sending the calculated values, then you will need to rewrite the logic completely.

If the program is sending the items and warehouses one by one, you can simply create a detail layout and let it print as the data comes.

To conclude, I don't think there is any generic way to do it.You will need to build a logic as per the requirement.

showstuff11
30th July 2015, 06:38
here is some sample data ive been doing...

its supposed be like this
"
3.2000 P P P P P P P P P 8.0000
"
but instead the output looks like a ladder :)
"
3.2000
P
P
P
P
P
P
P
P
P
8.0000
"
how am i supposed to do that..?

and all my script is standard i did not do anything yet...

except for putting a condition in the print condition of report field
like for example
for 3.2000 i put on print condition "qmptc115.pono = 10"

please help if you can..
any effort will be appreciated!
thanks.

bhushanchanda
30th July 2015, 09:18
Hi,

I am not sure how the layout looks. But, if its printing by Order No and Position like -

Orno X Pono X
Orno X Pono Y
Orno X Pono Z
....

Then, in this case there can be 2 possibilities -

A.
1. Create a new variable which will be Orno + Pono
2. Add this variable as report input field with Sort Order as presorted.
3. Create a before.field layout for this field and put all the required fields in this layout.

Now, whenever the order no and po no combination changes, this layout will print instead of printing multiple times for same position.

But the problem here is, to assign the value to the new variable and it can be tricky like you can assign it in some layout and then call before.field layout from report script.

B. Second way is quite straight forward. You can build a new report in the report script using seq.* functions or brp.* or spool.* functions and suppress the original report. This is what most people do when they do not own a source code.

showstuff11
31st July 2015, 03:49
@bhushan i will try what you've said
thank you for your reply!
very much appreciated!
ragards,
showstuff..