jaymukh
15th April 2002, 21:01
I want to
1. How to find out Arguments needed for a Function?
2. What are the command line arguments needed in ttstpconv?
I don't have the source code.
Thanks in Advance
Jay
mark_h
15th April 2002, 21:10
Check this link (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=513) out. It contains an example for launching ttstpconv and an example of creating your own conversion program.
For other functions you can use bic_info. Let me find a post about that and I will edit this reply to include that link. Here is one for bic_info (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=1650&highlight=bicinfo). You can try a search on bic_info for the tools forum to find more.
Good Luck!
Mark
jaymukh
15th April 2002, 21:20
I saw this earlier and I have one program like that, but it doesn't work with html.
wait.and.activate("ttstpconv", argv$(1), tmp.file, argv$(3),argv$(4))
Like if I use ttstpconv instead and argument as
html -g c:/windows/temp/logo.gif
and path as rept.html
It works and creates only one header logo statement in html file. But if I try to use my own function like yours it gives multiple header tag in the html file.
You know that html: doesn't work in -g -c -f .
Excel works fine.
In argument 4 [argv$(4)] it is always passing "wt", what does it mean. Is there anything else.
I don't know how to use bic_info command.
Many thanks in advance...
Jay
mark_h
15th April 2002, 22:07
Sorry I will not be much help with HTML, but could you post a little of the code. Maybe the parameters are not exactly the same as the device. Maybe an attachment with both a screen print of the device and the code. This may help me or someone else catch something. I would expect both using a device with ttstpconv and launching the program to work exactly the same.
I believe argv$(4) is a special parameter - I have never used it.
Mark
NPRao
15th April 2002, 22:29
You might also like to check out the sessions -
ttstpobjinfo and ttstpbaandoc
I know they are available in the latest BaaN versions!
ttstpbaandoc (in HTML form)
ttstpobjinfo (show object info - gives output on the display browser) instead of using the command line options...
jaymukh
15th April 2002, 22:38
string tmp.file(1024) | Temporary file name.
string local.path(1024) | Location on client for report.
long rc | Return code.
string av1(1024)
string av2(1024)
string av3(1024)
string av4(1024)
string av5(1024)
| Convert the report file into the temp file.
tmp.file = creat.tmp.file$( bse.tmp.dir$() )
av1 = argv$(1)
av2 = argv$(2)
av2 = tmp.file
av3 = argv$(3)
av4 = argv$(4)
av5 = argv$(5)
| wait.and.activate("ttstpconv", argv$(1), tmp.file, argv$(3), argv$(4))
wait.and.activate("ttstpconv", av1, av2, av3, av4)
| wait.and.activate("ttstpconv", av1, tmp.file, "html -g c:/windows/temp/slsqt.gif", "wt")
| Set the path on the client's pc and send the file down. Let the user
| enter the path and filename to be downloaded.
local.path = strip$(spool.fileout)
| Copy file to the client.
send.report.to.client(tmp.file, strip$(local.path))
| Remove our work file
| seq.unlink(tmp.file)
}
function send.report.to.client(const string src(), const string dest())
{
long in.fp
long out.fp
long err
long i
long length
long c.length
long prc
string read.str(2048)
string write.str(2048)
string rdest(2048)
domain tcmcs.str1 p
domain tcmcs.str1 c
string tmp.file2(1024)
domain tcbool pr
domain tcbool dmf
long rc | Return code.
string appl(132) | Application to start.
long app_id | Application id.
string start(1024) | Parameter for the app_start
| function which has application
| and file to use.
long pc | Page Count
long lc | Line Count
string head.file(1024)
domain tcmcs.str1 s
long q.fp
tmp.file2 = creat.tmp.file$( bse.tmp.dir$() )
string.scan(dest, "%s %s", rdest, p)
if isspace(p) then
p = " "
endif
c = " "
in.fp = seq.open(src, "r")
if in.fp < 1 then
message("Error %d opening exchange file %s", in.fp, src)
in.fp = 0
else
out.fp = seq.open(tmp.file2, "w")
endif
head.file = "${BSE}/gif/slsqt.gif"
err = server2client(head.file, "c:\windows\temp\slsqt.gif", 0)
head.file = "${BSE}/gif/slsqt.htm"
prc = 0
pc = 0
lc = 0
while seq.gets(read.str, 2048, in.fp) = 0
if pc = 0 then
q.fp = seq.open(head.file, "r")
while seq.gets(write.str, 2048, q.fp) = 0
err = seq.puts(write.str , out.fp)
endwhile
seq.close(q.fp)
pc = 1
lc = lc + 7
endif
err = seq.puts(read.str, out.fp)
lc = lc + 1
if lc > 59 then
lc = 0
pc = 0
endif
endwhile
err = seq.puts("</pre></body></html>" , out.fp)
err = seq.close(in.fp)
err = seq.close(out.fp)
jaymukh
15th April 2002, 22:42
<A NAME=p_0></A>
<pre>
<p align="left">
<IMG SRC="c:/windows/temp/slsqt.gif" >
</p>
--------
I am attaching now the above code as header and there is another footer. Whole ascii report is going as body of html code.
Baan standard is not working if I use wait.and.activate...ttstpconv
Some problem with parameter passing .
I checked bic_info6.1 just now, doesn't help much.
Thanks a lot Mark,
Jay
jaymukh
15th April 2002, 23:00
How to get them ...I don have it...I am using now BaanIV
ttstpobjinfo and ttstpbaandoc
Thanks
Jay
mark_h
16th April 2002, 14:51
We do not have those objects either. Our application admin. also said we had the latest objects. So I am not too sure about those. I also tried ttstpsessinfo on ttstpconv and it also is not too helpful. Sigh.
I am going to cut and paste your code into one of my test scripts and see what happens. I will get back to you later.
Mark
mark_h
16th April 2002, 20:51
The html device I created using ttstpconv created a nice neat html file. Each page had the logo and the bottom of each page was the top, prev and next links. Looked pretty good.
BUT then when I try the wait.and.activate("ttstpconv"...), I only get the logo on the first page and none of the pages have the top, prev or next links. I tried several times to get the output to match, but no luck.
I search a couple of forums and the Baan support site, but could not find a solution. Hopefully someone else lurking here knows what the answer is. I would recommend asking Baan what the activation parameters are.
Sorry I was not any help.
Mark