Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

How do you read data from dataset in RAP?

edited September 2014 in General
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

Comments

  • edited September 2014
    Hi Roman,

    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.


    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.