About Data Sources Parameters` Order

Stimulsoft Ultimate discussion
LMS2001201
Posts: 9
Joined: Thu Oct 08, 2015 9:29 am

About Data Sources Parameters` Order

Post by LMS2001201 »

Hi,I get a problem About Data Sources Parameters.
I use Oracle,and the Stimulsoft version is 2016.3.
e.g.
My sql text like this:

Code: Select all

select :p2 as id,:p1 as name from dual
and my parameters tab in top-down order like this:
p1=111
p2=222
my report shows like this:
id name
111 222
But,What I want is :
id name
222 111
So,How can I use the named parameters not in order???
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: About Data Sources Parameters` Order

Post by Lech Kulikowski »

Hello,

You can try to use Variables instead of parameters:
select {Variable1} as id, {Variable2} as name from dual

Thank you.
LMS2001201
Posts: 9
Joined: Thu Oct 08, 2015 9:29 am

Re: About Data Sources Parameters` Order

Post by LMS2001201 »

I have solved my problem as your solution.Thanks.
Just another question:
I read the Help Page before to find my answer,and done as fllowing in the Hepe Page:
img1.jpg
img1.jpg (9.38 KiB) Viewed 3929 times
So,I write my sql like this:

Code: Select all

select @V2 as id,@V1 as name from dual
and got a "ORA-00936: missing expression " Error.
So,my question is:
Is the named parameter must be specified by the @ symbol?
or,can I use named parameter in Oracle?
I think it is better to use Data Source parameter to solved this problem,because I use Data Source parameter all the time.
Anyway,use the "Variable" is also OK. thanks again.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: About Data Sources Parameters` Order

Post by Lech Kulikowski »

Hello,

For different connection, there are several parameters symbols - "@", ":", "?'
For Oracle, you should use ":":
select * from Table where Column = :paramName

Thank you.
LMS2001201
Posts: 9
Joined: Thu Oct 08, 2015 9:29 am

Re: About Data Sources Parameters` Order

Post by LMS2001201 »

Actually I use ":" all the time.
Now I try to update the Version to 2016.3 or higher.
In the old Version(older than 2016.3),I used ":" in my report and the DataSource parameters works not in order, it is convenient.
Sometimes the Sql is complex,has many parameters or use a same parameter at many place,so it is difficult to set the parameters in order.
But in the question I asked above,the DataSource parameters works in order,even though I use ":" and had set the parameter`s name.
So my question means if update the Version to 2016.3 ,is my reports must be reset the DataSource parameters in line with the Sql parameters` order?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: About Data Sources Parameters` Order

Post by Alex K. »

Hello,

Please send us your report for analysis.

Thank you.
LMS2001201
Posts: 9
Joined: Thu Oct 08, 2015 9:29 am

Re: About Data Sources Parameters` Order

Post by LMS2001201 »

The report for analysis has uploaded in attachment。
Thank you for your help.
ParameterOrderAnalysis.mrt
(29.07 KiB) Downloaded 209 times
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: About Data Sources Parameters` Order

Post by Lech Kulikowski »

Hello,

We need some additional time to investigate the issue.

Thank you.
LMS2001201
Posts: 9
Joined: Thu Oct 08, 2015 9:29 am

Re: About Data Sources Parameters` Order

Post by LMS2001201 »

Ok,thanks.
Waiting for your good news.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: About Data Sources Parameters` Order

Post by Lech Kulikowski »

Hello,

We couldn't reproduce the issue. Please try to check the last release build.

Thank you.
Post Reply