In a ReportPro 2.40 installation, opening a report gives a runtime error
Illegal characters in path error
This path is valid (copying the report to something like c:\temp and opening the report there gives the same error).
When we open the same report from the VO's ReportPro 2.31, there is no problem.
What could cause this?
Dick
Illegal characters in path error X# ReportPro
Re: Illegal characters in path error X# ReportPro
Hi Dick,
It must be illegal character in path of a dbf inside the report or something like that. Can you send the .rpt to have a look?
It must be illegal character in path of a dbf inside the report or something like that. Can you send the .rpt to have a look?
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: Illegal characters in path error X# ReportPro
There seems to be a reference to an external picture that is incorrect. Can you share the rpt file?
Robert
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Re: Illegal characters in path error X# ReportPro
Hello Robert, Chris,
I opened the report with a hex editor and indeed there's a picture reference in it. Frank has to check it (Friday) as it refers to their server. If that's the cause indeed, it leaves 3 questions:
1 Where the picture can be removed or changed, in the ReportPro editor. I don't see any picture in the designer (yet) - maybe Frank knows
2 Why the same report crashes on the X# ReportPro and not at the VO ReportPro - the picture path and picture are certainly absent on my Pc
3 And if it is indeed the jpg I would say that the message is incorrect as there are no illegal characters but only an invalid path or file. Maybe it is possible to add the path that caused the error to the error?
Anyhow, to be continued!
Dick
I opened the report with a hex editor and indeed there's a picture reference in it. Frank has to check it (Friday) as it refers to their server. If that's the cause indeed, it leaves 3 questions:
1 Where the picture can be removed or changed, in the ReportPro editor. I don't see any picture in the designer (yet) - maybe Frank knows
2 Why the same report crashes on the X# ReportPro and not at the VO ReportPro - the picture path and picture are certainly absent on my Pc
3 And if it is indeed the jpg I would say that the message is incorrect as there are no illegal characters but only an invalid path or file. Maybe it is possible to add the path that caused the error to the error?
Anyhow, to be continued!
Dick
Re: Illegal characters in path error X# ReportPro
Dick,
In VO the routines to extract filename and path were completely written in the ReportPro code.
In X# we use standard routines from the .Net Framework to extract path and filename from the string.
Apparently these routines do not like the name that is stored in the report.
Robert
In VO the routines to extract filename and path were completely written in the ReportPro code.
In X# we use standard routines from the .Net Framework to extract path and filename from the string.
Apparently these routines do not like the name that is stored in the report.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Re: Illegal characters in path error X# ReportPro
In the meantime I have found out that the picture link points to a valid and present picture file, without anything illegal in the path name. So I better send the report to you to check (why it works in VO and not in X#)
Besides a similar problem exists with another report. This has a trigger with a rather lengthy conditions line, including a nested IIF. I don't see any code which X# could consider wrong within it. The conditions expression shows valid in the VO ReportPro and the report shows from the VO program. But from the X# ReportPro, the very same report finds the expression invalid and the X# program doesn't show the report but an error.
My question is: do you need the report only, or also the dbf files, picture file etc? And if you need the dbf, should it be able to show a full working preview (so I must find a set of correctly linked dbf records as the full set of records yield rather large dbf files) or is it enough that the dbf files defined in the report are present?
Dick
Besides a similar problem exists with another report. This has a trigger with a rather lengthy conditions line, including a nested IIF. I don't see any code which X# could consider wrong within it. The conditions expression shows valid in the VO ReportPro and the report shows from the VO program. But from the X# ReportPro, the very same report finds the expression invalid and the X# program doesn't show the report but an error.
My question is: do you need the report only, or also the dbf files, picture file etc? And if you need the dbf, should it be able to show a full working preview (so I must find a set of correctly linked dbf records as the full set of records yield rather large dbf files) or is it enough that the dbf files defined in the report are present?
Dick
Re: Illegal characters in path error X# ReportPro
Hi Dick,
Can you please tell the exact path of the picture file? Might ring a bell...
About the iif(), most probably you are missing a closing parenthesis, for some strange reason the VO version allows it. If you can't find it, please show us the exact text of the condition.
Can you please tell the exact path of the picture file? Might ring a bell...
About the iif(), most probably you are missing a closing parenthesis, for some strange reason the VO version allows it. If you can't find it, please show us the exact text of the condition.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: Illegal characters in path error X# ReportPro
Hello Chris,
The picture directory is D:\kl29\rpt\bmp.
You are right about the parenthesis, indeed weird that VO accepts this:
"UN "+Imco.Unnummer+" "+lTrim(Alltrim(iif(IMCO.Taal=="NL",Un.Taalnl), iif(imco.Taal=="DU",Un.Taalde,Un.TaalUK))))
should be:
"UN "+Imco.Unnummer+" "+Trim(Alltrim(iif(IMCO.Taal=="NL",Un.Taalnl, iif(imco.Taal=="DU",Un.Taalde,Un.TaalUK)))))
The closing ) of the first iif is after the first condition (,Un.Taalnl) and should be at the end (there's a lot more behind but that part was valid). I overlooked it and frankly could not understand why it works in VO - and still can't
Thanks, if that path doesn't ring a bell, please let me know what I have to send to you.
Dick
The picture directory is D:\kl29\rpt\bmp.
You are right about the parenthesis, indeed weird that VO accepts this:
"UN "+Imco.Unnummer+" "+lTrim(Alltrim(iif(IMCO.Taal=="NL",Un.Taalnl), iif(imco.Taal=="DU",Un.Taalde,Un.TaalUK))))
should be:
"UN "+Imco.Unnummer+" "+Trim(Alltrim(iif(IMCO.Taal=="NL",Un.Taalnl, iif(imco.Taal=="DU",Un.Taalde,Un.TaalUK)))))
The closing ) of the first iif is after the first condition (,Un.Taalnl) and should be at the end (there's a lot more behind but that part was valid). I overlooked it and frankly could not understand why it works in VO - and still can't
Thanks, if that path doesn't ring a bell, please let me know what I have to send to you.
Dick
Re: Illegal characters in path error X# ReportPro
Hi Dick,
Yes, please send me the .rpt. In case that's not enough to find the problem, I will then ask you for the supporting files.
Yes, please send me the .rpt. In case that's not enough to find the problem, I will then ask you for the supporting files.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: Illegal characters in path error X# ReportPro
For future readers:
the report constructed a file name in an expression within the Picture Tool. This does not work using Bitmap or File Name returned from an Expression giving an error in the designer (not sure why not), so apparently the original designer changed the option to Directly from File. ReportPro then doesn't ask for a filename anymore (contrary to when you freshly launch the Picture Tool and select this option). So the expression remains connected with 'Directly from file'.
We found out that within the VO version the report runs, but the expression won't show the picture. It hasn't shown anything for years either (if ever...) Of course it can't / shouldn't work and it seems correct that X# doesn't accept this.
Thanks Chris for finding the offensive path. Chris made a note to show a error in runtime, as the report now simply crashes.
Dick
the report constructed a file name in an expression within the Picture Tool. This does not work using Bitmap or File Name returned from an Expression giving an error in the designer (not sure why not), so apparently the original designer changed the option to Directly from File. ReportPro then doesn't ask for a filename anymore (contrary to when you freshly launch the Picture Tool and select this option). So the expression remains connected with 'Directly from file'.
We found out that within the VO version the report runs, but the expression won't show the picture. It hasn't shown anything for years either (if ever...) Of course it can't / shouldn't work and it seems correct that X# doesn't accept this.
Thanks Chris for finding the offensive path. Chris made a note to show a error in runtime, as the report now simply crashes.
Dick