Application Help

Amith

Amith

Active Member
Hi all,

I am working on application,the requirement is that in Find & Browse form there should be a button named "Print Report" and in grid we should be able to select multiple records,till here its fine.

When be select some 4 records in grid and click "print Report" button it should generate a report with those 4 records only.

I tried attaching a Data Structure to report and in button event rules I used Report interconnection,but only one out of four records are printing in report.

So is there any way all 4 selected records can be printed in report.

Thanks in Advance...
 
Hi Amith,

Work table, work table, work table is the solution in general to process this scenario - had been discussed more dozens of tim on JDEList.

Regards,

Zoltán
 
i agree with zoltan. that way, u'll get all of them on one report. instead of a workfile, u could activate the "repeat for grid" option in the button clicked event of the row exit u added, but that will fire a separate report for each selected row. and i dont think that's what you want.
 
This is what you could do, Amith:
1. Find a field you are able to update in the table the grid is based on. Let's call it a flag.
2. Modify application to update the field (flag) when the grid row is selected.
3. Modify report to filter & print the records based on the flag field.
4. Do not forget to reset the field
smirk.gif

5. Post your success/failure
tongue.gif

Welcome to THE JDEList,
 
Amith,

1. Create a Flag Column in the grid
2. In the Row Exit for the Print - CREATE A UNIQUE KEY
3. Read through the grid for each record flagged
4. As the flagged records are identified - write them to a work table, include the new Unique Key
5. After all records have been read - Pass the UNIQUE KEY as a report
Interconnect

Note: The report will have to have the Unique Key in its Processing Options.

The report should use the value of the Report Interconnect as the Data Selection.

Let us know if this works

(db)
 
adrian, technically, this will work. as long as not more than one instance (session) of the app is running. a workfile like zoltan suggested allows for the use of a unique session-key, which can then be used in the called ube to select only the records of the calling instance (i use 'instance' instead of 'user', because even one user can start multiple instances of an app, and thus multiple sessions).

edit: just saw daniel's post appear. we both pretty much suggest the same thing
cool.gif


ps daniel: "Note: The report will have to have the Unique Key in its Processing Options."? huh? i don't get that part.
 
Thanks for replying

remo,
I tried using "Repeat for Grid" option,as u said it is firing separate reports,this is fine for now.But the requirement is to print in single report.

Adrian_Chimirel, DBohner,

I am trying your logic,I need some time to reply
 
Small request,

If anyone can guide me in work table(workfile) process it will be fine,I am new to this concept
 
Hi all I finally got the output,

First I created a temporary table with one coloumn(ex MCU).then in Button clicked section I used "Insert table I/O" operation to pass GC MCU value to temp table and I selected "repeat for grid" option,so that all selected record's MCU values will be stored in the temp table.

Then in post button click section I used Report interconnection

This is the coding part in report
DO Section:
F55O001.Select
BC Business Unit = TK Business Unit
F55O001.Fetch Next
VA rpt_CostCenter <- TK Business Unit
//
If SV File_IO_Status is equal to CO ERROR
Suppress Section Write
End If

END Section:
Delete All Rows From Table
"F55O001" -> BF szTableName
 
Hi Amith,

[ QUOTE ]
Small request,

If anyone can guide me in work table(workfile) process it will be fine,I am new to this concept

[/ QUOTE ]

I had done more dozens such a job and I have solutions for all the steps. It is after more year of practice in JDE development.

It is so long to describe all deatails, I already posted all, maybe in separate posts - on JDEList. Please, check/search the archive on JDEList.

Please, respect, I am on holiday in a Thermal Hotel in Hungary and I would like to do many other than write a manual.

But do not leave you without help/pointers, here are some thoughts in this round:

- How to make "static" selection on a Form with Grid.
- how to use session scope unique ID for work tables (UKID)
- how make index/indicies on work table
- how to create proper BSVW(s) with work table
- how to deal with work table in the called Form or UBE
- how to delete section scope work table entries with partial key delete table I/O
...as you see, it is a large "program"

As/If I will can and will have time and fun, will dropp the answers for you - but please, search JDEList (narrowing on my posts and with some key words)- "Search is your Friend". Maybe you will need less help/answer - saving other's time.

Thanks you in advance & Regards,

Zoltán
 
alright amith. now all you need to do is add a unique session key to your workfile as some of us suggested to prevent multiple users/instances getting in each others' way. use zoltan's advice and search this forum. i believe i once posted in one of those topics as well. i tend to use PEID&TCID as session key, to be retrieved with 'Retrieve Process and Transaction IDs' (and somehow i always tend to add USER as well
smile.gif
). pass this session key to the ube as well, and select on it (note: also in your delete statement, because you only want to delete the records of your *current* session).
 
Hi Omer,

About work table session IDs.
[ QUOTE ]
i tend to use PEID&TCID as session key,

[/ QUOTE ]

Once upon a time, when I was newbie to JDE development - I used Audit Fields in a combination. Later I set up a Next Number for this puprpose. In the most last years I use UKID. Why?
- single field key
- 15 long, instead of 8 length of Next Numbers
- do not require setup from environment to environment - as NNs do, because the first call to "Get Next Un..." BSFN Call will automatically create the initial entry in the F0002? table
- table ID specific, so very well fits to use in work tables
- fits to use to delete wt entries before/after work table usage
-...etc.

FYI & regards

Zoltán
 
Back
Top