Francesco
24th January 2005, 13:28
I am automating tipcf5260s000 (generate product variant structure) as part of entering customized items in the sales order lines.
This session prints two reports (tipcs5260010002 - generated product structure and tipcfl999010002 - tax provider error report).
Apparently the API cannot handle two reports in one session. When I use the set.report command on both reports, I receive an error message saying that there is no such report. When I omit the second set.report, my API session hangs.
Here is the relevant part of my code:
| 3. Create Product Variant Structure
stpapi.handle.subproc(api.session, "tipcf5260s000", "add")
stpapi.zoom.option(api.session, 1, "tipcf5260s000", error.message)
stpapi.put.field("tipcf5260s000", "spool.fileout", generated.product.variant.structure")
stpapi.set.report("tipcf5260s000", "rtipcf526001000", "ASCIT", error.message)
stpapi.continue.process("tipcf5260s000", error.message)
stpapi.end.session("tipcf5260s000", error.message)
Does anybody know of a solution/workaround for this issue?
LittleJohn
14th April 2005, 09:30
Hi Francesco,
Were you able to resolve the single report limitation using FS ?
I'm facing the same problem when trying to call the session
whinp1200m000 in BaanVc. This session has 3 reports. All the 3 open up one after the other when I run this session manually.
When I try to call this session through FS.... nothing happens.
Has anyone been able to call the whinp1200m000 through FS ? Thanks
LittleJohn
Francesco
14th April 2005, 18:57
I brought the case to Baan support and they were unable to solve it too.
The single report is a known limitation and there was no way to suppress the second report without customizing the session.
My workaround was to start over and take a different route to the same goal (Sometimes in Baan there is more than one way to can a skit).
LittleJohn
14th April 2005, 19:30
Thanks for your reply.
The problem is, I dont have the code to customize this session or the report calls. Is there something you can suggest on how to go about this.
Thanks for your time.
LittleJohn
Francesco
14th April 2005, 20:43
So no, I have no suggestions on this one.
mark_h
14th April 2005, 20:47
LittleJohn,
Have you tried sending the reports to a file - using something like device ASCIF? Seems to me there was a recent post about that.
Francesco
14th April 2005, 20:52
"Only one report can be set, so sessions that print more than one report in one execution cannot be executed with the AFS."
And that's the problem. It doesn't matter if you print it to file or not.
lbencic
14th April 2005, 21:37
Several options, none of them as good as having the AFS work as is. I do have the source to look.
1. Request Baan modify the AFS calls to support multi reports, they just don't right now.
2. Request the most current source of whinh1200 from Baan and see if they have fixed to be api friendly, or if they will do that for you.
3. Request a 3rd party source code provider make the change for you and deliver an api friendly version. This is pretty common around here these days (we are a 3rd party provider).
4. Find an alternative to the session whinh1200m000. I don't see one for yours..is there ANY other way to do this?
5. Create a job for this and run that way instead.
6. Use the wrapper programs like RMCgen and QKEY, 'rush' on these boards even, to create a library. We make RMCgen, so I can't speak for the others, but it looks like this would be fairly easily done...
7. In Baan V you sometimes have the option of using the DAL instead of AFS. That's only if they have written the actual logic for the 'cont process' action in a DAL somewhere instead of all in the session (UI) script. Unfortunately this has not been done either, all the logic for whinh1200 is in the UI (unless a newer service pack has changed this, so request the most recent source!).
That's all I can think of, but as mentioned, many ways to ...what...can the skit???
lbencic
14th April 2005, 21:41
As I think about it, how about combining the Job with AFS? Create a job, put in the printers in a job way, then call the job using AFS? Never tried, but seems like a possible around for the multi report problems with AFS.
LittleJohn
17th April 2005, 00:35
Thanks for the replies....
I'll try the "rush" option....
The setting up of JOB option by Lisa.... sounds very interesting. Never thought of that... let me see if we can make that work