Discussion:
Reports - IlLegal File Name
(too old to reply)
Bob McKinney
2008-12-01 23:03:33 UTC
Permalink
Hi All: Using dB+2.6.1 w/XPpro S3. This error haunts me in my dreams. I wrote about this in early Nov and never did get a definitive answer as to the cause. I finally got it to print. Then somehow, something got changed, I don't know what I did, but now, every time I try to print a report I get the 'illegal filename' error. I created ReportViewer.wfm (Ken's Book pg 121) and I get the same error as from :dUFLP:Preview.wfm from the line of code

**form.ReportViewer.filename = "PoReport.rep" ** (from Ken's Book)

below is the class declaration stmt for PoReport.rep

****sample code****
class POREPORTREPORT of BASECREPORT from Base.crp
set procedure to :dUFLP:REPCNTL.CC additiv
etc.....
*** end sample ********

I haven't got the foggiest why the "name" is causing the error. "PoReport" is the name. Different reports with different names, of course, draws the same error. If someone can tell me what is causing this, it would sure help and be appreciated.....Bob
Ken Mayer [dBVIPS]
2008-12-02 00:33:54 UTC
Permalink
Post by Bob McKinney
Hi All: Using dB+2.6.1 w/XPpro S3. This error haunts me in my dreams. I wrote about this in early Nov and never did get a definitive answer as to the cause. I finally got it to print. Then somehow, something got changed, I don't know what I did, but now, every time I try to print a report I get the 'illegal filename' error. I created ReportViewer.wfm (Ken's Book pg 121) and I get the same error as from :dUFLP:Preview.wfm from the line of code
**form.ReportViewer.filename = "PoReport.rep" ** (from Ken's Book)
below is the class declaration stmt for PoReport.rep
****sample code****
class POREPORTREPORT of BASECREPORT from Base.crp
set procedure to :dUFLP:REPCNTL.CC additiv
etc.....
*** end sample ********
I haven't got the foggiest why the "name" is causing the error. "PoReport" is the name. Different reports with different names, of course, draws the same error. If someone can tell me what is causing this, it would sure help and be appreciated.....Bob
Check the bootstrap code for the report:

local r
r = new POReportReport()
r.render()

Make sure the second line matches the classname in the CLASS statement.

Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
http://www.goldenstag.net/dbase
Ken Mayer [dBVIPS]
2008-12-02 13:49:59 UTC
Permalink
Hi Ken: The suggested bootstrap didn't work. Still get 'illegal file name' error. See first sample for where & what I entered.
Sorry. I have no clue. I don't have any problems using Preview.wfm with
reports ... works fine for me.

Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
http://www.goldenstag.net/dbase
Chris Stoeckert
2008-12-03 04:05:33 UTC
Permalink
Hi Bob,
Like Ken, I don't have any problems using Preview.wfm and I suspect that the
"illegal file name" error is coming from someplace else. However, from the
minimal information you provided it is nearly impossible to suggest where
<g>. Perhaps it you would post the complete report and a small part of the
supporting query (e.g. database file with a half-dozen rows) in the Binaries
group -- someone here would be able to help you. Just a suggestion ...
Chris
Post by Ken Mayer [dBVIPS]
Hi Ken: The suggested bootstrap didn't work. Still get 'illegal file
name' error. See first sample for where & what I entered.
Sorry. I have no clue. I don't have any problems using Preview.wfm with
reports ... works fine for me.
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
http://www.goldenstag.net/dbase
Bob McKinney
2008-12-05 12:57:59 UTC
Permalink
Hi Chris: After much fiddling w/wizzard and designer, I think I find that consistency in the chain of names is essential. Ex-table = PurchaseOrder, form=PurchaseOrder, report=PoReport will Not work. That's where the 'illegal name' was coming from. Changed the report name to 'PurchaseOrder.rep' and now it prints the correct report from Preview.wfm. You old pro's were probably already doing that w/o thinking about it. Now I'm going thru the struggle of changing names in other forms, etc. Talk about a mess!!.....Bob
Post by Chris Stoeckert
Hi Bob,
Like Ken, I don't have any problems using Preview.wfm and I suspect that the
"illegal file name" error is coming from someplace else. However, from the
minimal information you provided it is nearly impossible to suggest where
<g>. Perhaps it you would post the complete report and a small part of the
supporting query (e.g. database file with a half-dozen rows) in the Binaries
group -- someone here would be able to help you. Just a suggestion ...
Chris
Post by Ken Mayer [dBVIPS]
Hi Ken: The suggested bootstrap didn't work. Still get 'illegal file
name' error. See first sample for where & what I entered.
Sorry. I have no clue. I don't have any problems using Preview.wfm with
reports ... works fine for me.
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
http://www.goldenstag.net/dbase
Bob McKinney
2008-12-02 13:23:42 UTC
Permalink
Hi Ken: The suggested bootstrap didn't work. Still get 'illegal file name' error. See first sample for where & what I entered.

******* sample #1 (copied from PoReport.rep)*****
local r
r = new POREPORTREPORT()
r.render()

** END HEADER -- do not remove this line
//
// Generated on 11/30/2008
//
class POREPORTREPORT of BASECREPORT from Base.crp
****** end sample #1****

In an answer to my original thread (early Nov), Merilyn had written to enter the following code (sample #2) Into Preview.wfm to possibly help pinpoint the problem. Don't know what I did shortly after that, but it started printing and I didn't follow up on the suggestion, that I remember.

******* sample #2***
if TYPE("uReport") == "C"
? "uR = " + uReport //*** results = ViewerSample.rep
try
set procedure to (uReport) additive
f.viewer.fileName = uReport // ***from the results, this is line # 290

catch (exception e)
? "e.mes = " + e.message
? "e.line = " + e.lineno
? "e.code = " + e.code
MSGBOX("Problem Using Report File Name!xx" + CHR(13) + e.message, "Preview.wfm", 16)
bOpen = false
******* end #2 *****

*****results of #2 (copied from display pane of cmd/wnd) ******
uR = poreport.rep
e.mes = Error: Illegal file name.
e.line = 290
e.code = 185
***** end results*****
The above info only means to me that 'somethings wrong', but I don't see how it's the filename Any additional thoughts appreciated....Bob
Post by Ken Mayer [dBVIPS]
Post by Bob McKinney
Hi All: Using dB+2.6.1 w/XPpro S3. This error haunts me in my dreams. I wrote about this in early Nov and never did get a definitive answer as to the cause. I finally got it to print. Then somehow, something got changed, I don't know what I did, but now, every time I try to print a report I get the 'illegal filename' error. I created ReportViewer.wfm (Ken's Book pg 121) and I get the same error as from :dUFLP:Preview.wfm from the line of code
**form.ReportViewer.filename = "PoReport.rep" ** (from Ken's Book)
below is the class declaration stmt for PoReport.rep
****sample code****
class POREPORTREPORT of BASECREPORT from Base.crp
set procedure to :dUFLP:REPCNTL.CC additiv
etc.....
*** end sample ********
I haven't got the foggiest why the "name" is causing the error. "PoReport" is the name. Different reports with different names, of course, draws the same error. If someone can tell me what is causing this, it would sure help and be appreciated.....Bob
local r
r = new POReportReport()
r.render()
Make sure the second line matches the classname in the CLASS statement.
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
http://www.goldenstag.net/dbase
Bob McKinney
2008-12-02 13:33:33 UTC
Permalink
Please, ignore line 2 (? "Ur = ") of sample #2. That was left over from testing on a different viewer. However I did get the same error msg......Bob
Hi Ken: The suggested bootstrap didn't work. Still get 'illegal file name' error. See first sample for where & what I entered.
******* sample #1 (copied from PoReport.rep)*****
local r
r = new POREPORTREPORT()
r.render()
** END HEADER -- do not remove this line
//
// Generated on 11/30/2008
//
class POREPORTREPORT of BASECREPORT from Base.crp
****** end sample #1****
In an answer to my original thread (early Nov), Merilyn had written to enter the following code (sample #2) Into Preview.wfm to possibly help pinpoint the problem. Don't know what I did shortly after that, but it started printing and I didn't follow up on the suggestion, that I remember.
******* sample #2***
if TYPE("uReport") == "C"
? "uR = " + uReport //*** results = ViewerSample.rep
try
set procedure to (uReport) additive
f.viewer.fileName = uReport // ***from the results, this is line # 290
catch (exception e)
? "e.mes = " + e.message
? "e.line = " + e.lineno
? "e.code = " + e.code
MSGBOX("Problem Using Report File Name!xx" + CHR(13) + e.message, "Preview.wfm", 16)
bOpen = false
******* end #2 *****
*****results of #2 (copied from display pane of cmd/wnd) ******
uR = poreport.rep
e.mes = Error: Illegal file name.
e.line = 290
e.code = 185
***** end results*****
The above info only means to me that 'somethings wrong', but I don't see how it's the filename Any additional thoughts appreciated....Bob
Post by Ken Mayer [dBVIPS]
Post by Bob McKinney
Hi All: Using dB+2.6.1 w/XPpro S3. This error haunts me in my dreams. I wrote about this in early Nov and never did get a definitive answer as to the cause. I finally got it to print. Then somehow, something got changed, I don't know what I did, but now, every time I try to print a report I get the 'illegal filename' error. I created ReportViewer.wfm (Ken's Book pg 121) and I get the same error as from :dUFLP:Preview.wfm from the line of code
**form.ReportViewer.filename = "PoReport.rep" ** (from Ken's Book)
below is the class declaration stmt for PoReport.rep
****sample code****
class POREPORTREPORT of BASECREPORT from Base.crp
set procedure to :dUFLP:REPCNTL.CC additiv
etc.....
*** end sample ********
I haven't got the foggiest why the "name" is causing the error. "PoReport" is the name. Different reports with different names, of course, draws the same error. If someone can tell me what is causing this, it would sure help and be appreciated.....Bob
local r
r = new POReportReport()
r.render()
Make sure the second line matches the classname in the CLASS statement.
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
http://www.goldenstag.net/dbase
Geoff Wass [dBVIPS]
2008-12-03 05:13:44 UTC
Permalink
Bob,

When you say

? "uR = " + uReport //*** results = ViewerSample.rep

but your code is

below is the class declaration stmt for PoReport.rep

****sample code****
class POREPORTREPORT of BASECREPORT from Base.crp

You are passing "viewersample.rep" somewhere where you should be passing
the name of your report.

That above assumes I am understanding what you are doing. :-)
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
Loading...