Hi
I am running into unexpected syntax errors while integrating some of our older reports (that are still in use by one of our other software products that use an older version of Combit - 14 if memory serves - that I believe predates data binding) with our newer software system that uses the .NET Combit API (presently version 27).
The context: In our older reporting environment, which I believe uses event-based data supply, the header variables appear in the designer directly under the Variables folder in the Variables/Fields sidebar. Thus all references to them in the report itself are just their names, e.g. for a variable named “Bin_ID”: Atrim$(Bin_ID)
.
In our new software’s reporting environment, using data binding, I am able to reproduce this by setting the data provider’s RootTableName
to an empty string. This causes everything to still display correctly with no errors in the designer. The report also displays correctly in the designer’s Preview.
However, this does not work when trying to print the report. I get an LL_Expression_Exception
stating that one of the expressions used has an error. Tracing the error using Debwin4 reveals that when printing, for some reason, it cannot find the variables now: ERR: error parsing formula 'Atrim$(Bin_ID)': Syntax error: cannot interpret term 'Bin_ID'
.
The odd thing is that if I don’t blank out the RootTableName
(causing the variables to now show under a folder with that name under Variables in the designer) and then modify the report to reference the variables with this parent name, e.g. Atrim$(Header.Bin_ID)
, the report now works in both the designer and when printing.
While this method does work (and is probably the more modern approach), it is undesirable for this particular project because it does not allow us to use the existing report files in both software environments (both will be running in parallel in production environments).
How would I go about further investigating how to get top-level variables working in both the designer and printing modes?