Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
What version of Baan have you installed
Baan IV
42%
FP3
5%
FP4
0%
FP5
0%
FP6
0%
FP7
0%
10.2 (incl. 10.2.1)
0%
10.3
11%
10.4
16%
10.5
26%
Other
0%
Total votes: 19

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 7th May 2004, 23:52
Jabran Jabran is offline
Member
 
Join Date: Oct 2003
Posts: 31
Jabran is on a distinguished road
Baan: 7.1c.05.148 - DB: SQL Server - OS: Windows NT 4. Server
Question Getting Email /Fax number of a business partner in a ttstpconv replacement script

Hello all,

I have replaced the default ttstpconv script associated with a print device (and calling ttstpconv from within my script, after some processing). Now when a report is printed on my device, I do some pre-processing before passing it to ttstpconv. What I need more at this point is to know the fax number and email of the business partner (being refered in the report) to whom the report (invoice/RFQ, whatever it is) is being sent . I think that there should be some standard way to get this information some how. Any help/ideas will be appreciated a lot.

Thanks in advance.

Sincerely,
Jabran
Reply With Quote
  #2  
Old 8th May 2004, 17:13
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,949
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Using ttstpconv

You said you do some pre-processing and then pass it to ttstpconv. As part of your preprocessing you can pass it to ttstpconv and convert it with the ASCII format into a temporary file. At this point you can read it use seq.open, seq.get. Then you just do select on the suppliers table. Then you can do a second pass into the final ttstpconv. Just one thought?

Mark
Reply With Quote
  #3  
Old 8th May 2004, 21:12
Jabran Jabran is offline
Member
 
Join Date: Oct 2003
Posts: 31
Jabran is on a distinguished road
Baan: 7.1c.05.148 - DB: SQL Server - OS: Windows NT 4. Server
Hello Mark,

Thanks for your reply. The other post was a bit related to this one as well. Even if I read the report from ASCII file, then I will need to identify the supplier for whom I will require to do select. For this reason, I am wondering if there is some field information kept by baan in its temporary file which I can read and then get the related email/fax information from related table. Actually this is to be done for each report having supplier info etc. so if I wirte code to get suppiler info for one kind of ASCII report, it may not work with some other.

Just one other thought, is it possible that in the ttstpconv replacement script, to access parent print session and then get the information of selected supplier? Perhpas this kind of approach may work for all kind of reports?

Please let me know about your opinion.

Thanks,
Jabran
Reply With Quote
  #4  
Old 10th May 2004, 15:50
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,949
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
I think I understand now..

I think I see what you are saying - I just do not think there is a way to find detailed information for a report. One thing you might do is in the report you could add a layout and in the report script you could put the info you need somewhere, maybe even a table. So when the user selects your device the layout will have a print expression of spool.device="your new device". Then in the script your can write the temp file name, the supplier number or any other info you need. You could read this table from you ttstpconv script then use the suppliers table to get the fax/email information. Just a thought.

Mark
Reply With Quote
  #5  
Old 10th May 2004, 19:14
lbencic's Avatar
lbencic lbencic is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, IL, USA
Posts: 1,148
lbencic will become famous soon enough
Baan: 2.2d - LN - DB: most - OS: most
Mark's idea is a good one. May be more than you want to do, especially if you have a lot of reports you want to do similar things with.
I would just add that the third party add on StreamServe does just that - you can generate the report into a streamserve report and completly modify the format. You get the report variables as well such as the Supplier ID and you can then do different format logic based on those variables.
This is a high end product ($$), other similar products like Crystal may offer the same I have not used extensively. I would not recommend for just this one problem, but if you have a lot of document needs it may be of interest.
StreamServe homepage
Reply With Quote
  #6  
Old 14th May 2004, 23:18
Jabran Jabran is offline
Member
 
Join Date: Oct 2003
Posts: 31
Jabran is on a distinguished road
Baan: 7.1c.05.148 - DB: SQL Server - OS: Windows NT 4. Server
Hi all,

Originally I sent this message to Mark, and I am posting it to board so that others may also benfit from this. Appended to my message is the reply of Mark.

Will appreciate more suggestions and ideas.

Thanks.
Jabran
----------------------------------------------------------

Jabran wrote on 14th May 2004 14:20:
Hello Mark,

Thanks for your response. I am a little bit stuck at this point. If there are many reports then each report will have to be extended. Our client does not want to exetend any standard sessions/reports etc. But still, if we are able to add new scripts in addition to the standard ones with each report, this may be the solution we require. I am a baan beginner, so if you can explain your idea a little bit more (with some technical information), it will help me a lot.

One more thing, how do you see if from a device script, I try to get parent session till I get to the session where report selection parameters were provided, and from there, import values for Business partner from form objects? In this manner I will be able to get required information for a report without extending the reports with additional scripts. Please let me know your ideas over this and the previous point.

I thank you for your time and assistance.

Sincerely,
Jabran

--------------------------------------------------------------------
Re: Exetending reports layout ?
For API function servers check out the DDC/API Function server forum. There is a sticky post in there that has some documentation. Search and look for examples for doing API function servers. Just keep in mind I have never done a tools function server and I am not even sure they will work.

Here is what I was thinking - you could do a select on ttadv330 for company 0 and for the VRC you want to add a layout to. This should get all the reports for your company. Then using API function servers start ttadv3130m000 Maintain reports, do a find for your language, VRC and report. Next use stpapi.application.option to start maintain layouts. You can use other stpapi commands to read through the layouts. Insert the layout that you want. Then exit the sessions. Next check the ttadv330.scpt field to see if it is yes. If yes then based on the package you should know the location of the report script - example ${BSE}/application/tdB40C_c4_prd/rtdpur. Open the script for appending. Append the code you want - just remember that you might need to add declarations. If no then add the script(create script name just like baan) and set ttadv330.scpt to yes. Repeat until all reports have been changed. Then run ttadv3240m000 and compile all report scripts as Lisa mentioned.

This is all theory, but it sounds like it would work. Any other questions you probably should post on the thread. This way others, like Lisa, can answer. Some may even have better ideas than me.

Mark
Reply With Quote
  #7  
Old 15th May 2004, 00:32
lbencic's Avatar
lbencic lbencic is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, IL, USA
Posts: 1,148
lbencic will become famous soon enough
Baan: 2.2d - LN - DB: most - OS: most
Is this the same problem as in the other post of the same subject? Maybe these should be merged. I think there are 3rd party solutions for your specific report problem, but they cost and you are probably trying to avoid that.

How are you planning on calling this script? Attaching to the session? Call from somewhere in the code? Or from the report? All of these things require a modification of some sort.

I can't think of a way to attach a script 'in addition to' the report script or the program script without in some way changing something to at least attach it and/or trigger it. Keep in mind that when you make an addition to reports, you copy the standard and change the copy in your VRC. You do not ever change the standard. Updating reports to have your company's information, be it in a logo or additional information printed, is a very common need, and done often. You are not changing Baan flow in any way, just the output format.

It seems the most straight forward solution is to modify the report scripts and put the table writes in there. If you are doing many many reports, make a library that does the work, and just call the library where needed. This would require copying each report and modifying the report script.

You may be able to do this automatically with some script, as Mark suggested, to add to the layout and report script, compile automatically. This would be the same as adding the change yourself though, still a change.
Reply With Quote
  #8  
Old 11th June 2004, 11:06
squaresh's Avatar
squaresh squaresh is offline
Junior Member
 
Join Date: Apr 2003
Posts: 14
squaresh is on a distinguished road
Baan: B50c - DB: SQL2000 - OS: WIN2000
I have another idea for finding fax or mail of a customer or supplier.
Maybe we can use a configuration file for the specific ttstpconv
where we can tell : the string to be matched to find the key, the table where to lookup for this key, the field where the data is to be found, the string to be matched to detect a report change

The report data must first be processed as PS (postscript) which is a format readable by tools such as grep or sed.

For example, a config file could be like this :

[rtdpur4401011000]
string to be matched: "Supplier : ........."
fax query: "select tccom100.*, tccom130.tefx:fax from tccom100, tccom130 where tccom100.bpid = ......... and tccom100.cadr refers to tccom130"
report change: "Invoice no: ............"
...

[rtdpur4404011000]
...
Reply With Quote
Sponsored Links
  #9  
Old 11th June 2004, 18:59
lbencic's Avatar
lbencic lbencic is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, IL, USA
Posts: 1,148
lbencic will become famous soon enough
Baan: 2.2d - LN - DB: most - OS: most
That's great, it looks like you are very far. The preprocessing you do, you would query/parse the report text to find the supplier, so you have that in hand? If so you can look up the supplier record in tccom020 to get the fax number. There is not a field for the email, but if you are creative you can add that in place of the 'telex' field if you are not using it, or some other field. Same for Customers.

Just to add to what I said about 3rd party products, it looks like Nazdaq's Mail Merge does exactly this, and it is MUCH less expensive than things like Streamserve. I would highly recommend checking out their site and/or getting a demo (www.nazdaq.co.il). It is so reasonable and supported it may not be worth coding yourself. You do not have to modify the reports to use their product. They store an address book as part of their offering, so that problem would be resolved as well without changing fields in Baan.

Good luck either way
Reply With Quote
  #10  
Old 18th November 2004, 10:53
transforce transforce is offline
Junior Member
 
Join Date: Mar 2003
Location: netherlands
Posts: 9
transforce is on a distinguished road
Version one document management software

We sell an output and document management application called Version One and we have integrated it into BaaN to do exactly what you want. You send your output to DbForm. Dbform reformats the document exactly the way you want it and reads an few additional tables to find the adresses ( fax, email print etc) You can have different email and fax adresses for different documents with the same business partner. If you want to send one document twice thats possible too. You just store an email adress and a printer adress and the document is send twice by DbForm.

Feel free to contact me if you want any additional info
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Contact by Business partner mostrightfuture Tools Development 0 17th August 2004 11:45
One time business partner changing riazsayeed Distribution, Transportation & Warehousing 5 16th July 2004 16:45


All times are GMT +2. The time now is 05:23.


©2001-2017 - Baanboard.com - Baanforums.com