How do you read data from dataset in RAP?
Hi,
I have problem with combination of RB's RAP and SDAC (MSSQL Data Access
Components).
I have report with 3 pipelines:
Pipeline1
+- Pipeline2 (detail of Pipeline1)
+- Pipeline3 (detail of Pipeline2)
Pipeline1: 1 row of data
Pipeline2: 1 row of data
Pipeline3: empty
Pipeline2 is in subreport which containts TppLabel with OnPrint:
procedure Label47OnPrint;
begin
if Pipeline3['MyAttr'] = 2 then
Label47.Caption := 'Two'
else
Label47.Caption := 'Other';
end;
If I show preview I can see error:
I cannot run program: SubReport1.Label47OnPrint
Could not convert variant of type (UnicodeString) into type (Double)
Problem is in SDAC because I don't see any error with old version of SDAC
with the same RB.
I would like to debug it but I cannot due to closed RAP (dcu only).
I need info: How do you get data from dataset (if Pipeline3['MyAttr'] = 2
then)?
I don't able to create small sample for SDAC developers...
Thanks
Roman Krupicka
I have problem with combination of RB's RAP and SDAC (MSSQL Data Access
Components).
I have report with 3 pipelines:
Pipeline1
+- Pipeline2 (detail of Pipeline1)
+- Pipeline3 (detail of Pipeline2)
Pipeline1: 1 row of data
Pipeline2: 1 row of data
Pipeline3: empty
Pipeline2 is in subreport which containts TppLabel with OnPrint:
procedure Label47OnPrint;
begin
if Pipeline3['MyAttr'] = 2 then
Label47.Caption := 'Two'
else
Label47.Caption := 'Other';
end;
If I show preview I can see error:
I cannot run program: SubReport1.Label47OnPrint
Could not convert variant of type (UnicodeString) into type (Double)
Problem is in SDAC because I don't see any error with old version of SDAC
with the same RB.
I would like to debug it but I cannot due to closed RAP (dcu only).
I need info: How do you get data from dataset (if Pipeline3['MyAttr'] = 2
then)?
I don't able to create small sample for SDAC developers...
Thanks
Roman Krupicka
This discussion has been closed.
Comments
My first suggestion would be to try this outside RAP in Delphi and see
if you get the same behavior. RAP is going to use the same datapipeline
logic to access a field value as code in Delphi would.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com