1. Scott
  2. Valentina Reports ADK
  3. Thursday, April 16 2015, 08:29 PM
  4.  Subscribe via 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.
Comment
There are no comments made yet.
Ruslan Zasukhin Accepted Answer
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
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 1
Scott Accepted Answer
Thanks for the quick response.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 2
Sergey Pashkov Accepted Answer
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.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 3
  • Page :
  • 1


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