Page 1 of 1

Sequence load datasource

Posted: Wed Jan 15, 2014 9:13 am
by investor123
Dear Stimulsoft,

I have 2 datasource and 1 variable

variable1:
var1 = 1

datasource1:
select costcenter from system where id = {var1} // result string 'cc between 1 and 10'

datasource2:
select * from invoice where id={docid} and {datasource1.costcenter}

and i got error message 'data not found' every time i run it.
i need both datasource run sequence. How to do it? please help me. Thank you

Re: Sequence load datasource

Posted: Wed Jan 15, 2014 12:40 pm
by HighAley
Hello.

Please, send us your report template with sample data for analysis.

Thank you.

Re: Sequence load datasource

Posted: Thu Jan 16, 2014 1:37 am
by investor123
Here is my mrt file.

Re: Sequence load datasource

Posted: Fri Jan 17, 2014 7:55 am
by HighAley
Hello.

Sorry, but we couldn't reproduce your issue without data.

You don't need to to declare variables. It's possible to use our variables exactly in query, the string is inserted without quotation marks.
Following this note it seems that the error occurs at this lines:

Code: Select all

declare @iversion varchar(20)
set @iversion = {iVersion}
You could use the variable exactly in the query:

Code: Select all

WHERE version_id='{iVersion}'
Thank you.