String Size / Memo field limits
Greetings,
I have run into a snag with the memo and string variables in several
reports. I could not figure it out in the first report but I have
reproduce the issue in a smaller report. Here's a sample of the code.
DetailBeforePrint;
var
TempString : String;
begin
OpeningSize.Text := PscheduletagPL['Tagwidth'] + ' x ' +
PscheduletagPL['Tagheight'];
if OpeningSize.Text = ' x ' then
OpeningSize.Text := '';
{1.} if Pos('EXT', UpperCase(PscheduletagPL['Taglocation'])) > 0 then
DoorExterior.Text := 'X'
else
DoorExterior.Text := '';
TempString := '';
{2.} TempString := PscheduletagPL['Dooradds'];
if Pos('ASTR', UpperCase(TempString)) > 0 then
DoorAstragal.Caption := 'X'
else
DoorAstragal.Caption := '';
The PscheduletagPL['Taglocation'] is a 1000 varchar field in the interbase
database. Report builder interpets the field as a memo 1000. There is two
different places that the code will blow up.
1. if Pos('EXT', UpperCase(PscheduletagPL['Taglocation'])) > 0 then
2. TempString := PscheduletagPL['Dooradds'];
The error is: "Can not generate report. Can not run program:
DetailBeforeReport". I have tried several different ways to accoomplish
this task but it seems that I am stuck on this issue. Is there a fix or
work around?
I have run into a snag with the memo and string variables in several
reports. I could not figure it out in the first report but I have
reproduce the issue in a smaller report. Here's a sample of the code.
DetailBeforePrint;
var
TempString : String;
begin
OpeningSize.Text := PscheduletagPL['Tagwidth'] + ' x ' +
PscheduletagPL['Tagheight'];
if OpeningSize.Text = ' x ' then
OpeningSize.Text := '';
{1.} if Pos('EXT', UpperCase(PscheduletagPL['Taglocation'])) > 0 then
DoorExterior.Text := 'X'
else
DoorExterior.Text := '';
TempString := '';
{2.} TempString := PscheduletagPL['Dooradds'];
if Pos('ASTR', UpperCase(TempString)) > 0 then
DoorAstragal.Caption := 'X'
else
DoorAstragal.Caption := '';
The PscheduletagPL['Taglocation'] is a 1000 varchar field in the interbase
database. Report builder interpets the field as a memo 1000. There is two
different places that the code will blow up.
1. if Pos('EXT', UpperCase(PscheduletagPL['Taglocation'])) > 0 then
2. TempString := PscheduletagPL['Dooradds'];
The error is: "Can not generate report. Can not run program:
DetailBeforeReport". I have tried several different ways to accoomplish
this task but it seems that I am stuck on this issue. Is there a fix or
work around?
This discussion has been closed.
Comments
it is a LITTLE different than the conventional MS products.
My name is Tim and any help would be greatly appreciated!
Kind regards,
Tim
I have noticed that the always blows up on the end of the second pass. If
I set the "PassSetting" to one pass, the report will run but if I go to
the end of the report and try to go back a page, I receive the same error.
I have also tried putting a ppDBMemo box on the report, make it so it is
not visible, and then try to do any of the string functions on the
ppDBMemo.text and I still receive the same error. It seems that I have a
problem with the Memo 1000 field. Does anyone have a clue as to why this
is happening. I would be happy to send an example!
D6
RB 6.03
Kind Regards,
Tim Armstrong
Please send an example that shows the problem and we'll take a look at it.
Send all attachments to support@digital-metaphors.com
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com