On click “Generate Report”-> Lianja.evaluate(“report_htm()”)
Name:  lj-report.jpg Views: 18 Size:  73.0 KB

In server script “report_htm.prg”, I only have the following codes:



m.cFile = "htmlfile&(getpid()).htm"
m.nResult=StrToFile(m.cStr, m.cFile)

I tested in the console Lianja.evaluate(“_testreport()”), and it does create a file. However, when I run it a browser it fails. I also tried fwrite without success.


Try this:

m.cFile = tmpnam(".htm")
m.htmlrep = "c:\lianja\cloudserver\tenants\public\wwwroot\\zzzzw\rpt_template.htm"
m.nResult=StrToFile(m.cStr, m.cFile)

That saves to the default temporary directory: C:\lianja\server\tmp\ (can be changed in the Lianja Server Manager-> Settings) and specifies where to find the rpt_template.htm. (I’ll check re the App dir, should be able to do that without hard-coding).


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.