1. Scott
  2. Valentina Reports ADK
  3. Четверг, Апрель 16 2015, 08:29 PM
  4.  Подписаться через email
I have been through the documentation - can't seem to find this:

Report registered under VServer. When designing query in VStudio I place a parameter in the query string.

SELECT * FROM tblJobs WHERE tblJobs.RecID = $P(JobID)


(Something like that)

How do I pass a variable as a parameter to the Report via PHP?

I would like to keep the query designed in VStudio, just pass in the parameter(s) to get my desired results.
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
Just in case I will show what Sergey means with "embed into SQL query"

Let you want send into reports 2 parameters
param1 = 55
param2 = 'My Info'

You can embed them into some SQL query, such as:

SELECT f1, f2, f3
FROM T
WHERE f1 = 100

In this way:

SELECT f1, f2, f3, 1 as "param1", 'my Info' as "param2"
FROM T
WHERE f1 = 100
Комментарий
There are no comments made yet.
Scott Ответ принят
Thanks for the quick response.
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Hi, Scott

Parameters, which you insert in Valentina Studio dialog, are used only for subreport queries.
Currently if you need to pass parameters, you should embed them into a query in PHP code.

But I agree, this feature will be useful.
Комментарий
There are no comments made yet.
  • Страница :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.