I have just published a bunch of reports from a legacy version of Crystal to XI and there are a few reports with a formula that uses “StoreStringVar” in them. I’m not sure of how this syntax is supposed to be and the formula does not work in XI. We do most of our report develpoment in Webi and I’m not an expert in Crystal.
if anyone could help me with the syntax of the folowing formula sample it would be fantastic.
formula “INI”
If OnFirstRecord then StoreStringVar (‘01c’, ‘initialised’);
If OnFirstRecord then StoreStringVar (‘01t’, Space(0));
…
01c & 01t are other formulas
Formula “01c”
EvaluateAfter({@INI});
EvaluateAfter({@SET});
FetchStringVar (‘01c’)
the “Set” formula
EvaluateAfter ({@INI});
NumberVar setcol := 0;
if (OnFirstRecord or Previous({HRTCODE4.SY_CODE_FOUR}) <> {HRTCODE4.SY_CODE_FOUR})
and {HRTCODE4.SY_CODE_FOUR} <> ’ ’
then
if FetchStringVar (‘01c’) = ‘initialised’ then NumberVar setcol := 1
…
if setcol = 1 then StoreStringVar (‘01c’, {HRTCODE4.SY_CODE_FOUR})
…
if setcol = 1 then StoreStringVar (‘01t’, {HRTCODE4.SY_CODE_ABBR})
…
setcol
That’s too bad you don’t have experience with Crystal… seems like you’re dealing with some of the more advanced Crystal topics!
Your best bet will be to open and save these legacy reports with Crystal XI. New performance and processing enhancements will make them work a lot faster than their originals (and hopefully will fix your formulas, too). If it’s not possible to go through to open and save each one, and to answer your question: the StoreStringVar and FetchStringVar were the old methods of sharing variables to/from the subreport and the main report. Anywhere you see:
StoreStringVar(‘var_name’,‘var_value’) becomes
shared stringvar var_name := “var_value” ;
So in your case:
StoreStringVar ('01c', 'initialised')
becomes
Shared StringVar 01c := "initialised" ;
Similarly, wherever you see FetchStringVar(‘var_name’) becomes
Shared StringVar var_name ;
And assuming they used these correctly in the legacy reports, you’ll have to go through the main report and the subreports to fix these formulas.
If you want to continue using Store and Fetch functions, I do not think you can obtain the uf5store.exe from the Business Objects support site any longer do yoour only option is to find it on the Crystal Reports version 7 CD.
From the CD: Insert the Crystal Reports CD into your CD ROM drive.
From the CD: In Windows Explorer, go to the CD drive, open the UFL folder, then open the Uf5store folder.
Run the self-extracting executable Uf5store.exe, accepting the defaults. This copies 3 files to the C:\Seagate\UFLS folder:
· Uf5store.dll - use with 16-bit Crystal Reports
· U25store.dll - use with 32-bit Crystal Reports
· Readme.txt - explains how to install the files and use the functions they include.
In Windows NT: Copy the appropriate DLL (either 16 or 32-bit) to the C:\Winnt\Crystal directory.
These dll’s will have to be copied to the same folder on your XI server.