Sequence load datasource

Stimulsoft Reports.PHP discussion
Post Reply
investor123
Posts: 24
Joined: Fri Sep 20, 2013 4:18 am

Sequence load datasource

Post 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
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Sequence load datasource

Post by HighAley »

Hello.

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

Thank you.
investor123
Posts: 24
Joined: Fri Sep 20, 2013 4:18 am

Re: Sequence load datasource

Post by investor123 »

Here is my mrt file.
Attachments
Report.mrt
(34.67 KiB) Downloaded 296 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Sequence load datasource

Post 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.
Post Reply