1. Jochen Peters
  2. Valentina Reports ADK
  3. Среда, Ноябрь 09 2016, 09:40 AM
  4.  Подписаться через email
Hi
How i can pass values to only display on the Reporte Heading to show example name of person who make the Reports
From XOJO
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Hi Alexis,

You can use report parameters for it, here is an article

You should use parameter in expression.
Комментарий
There are no comments made yet.
Jochen Peters Ответ принят
but parameters is for the query and the values i need to pass is no for the query
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Parameters can be used in expressions as well since the version 6.3
Комментарий
There are no comments made yet.
Jochen Peters Ответ принят
ok
how i use that expression from XOJO to the Report
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
For example you have defined param1 in expression:


dim theReport as VReport

theReport = my_project.MakeNewReport(
"report_1",
"sqlite://c:/somedb.sqlite",
"SELECT fldName, fldPhone FROM tblPerson" )

theReport.SetParameterValue( "param1", "value1" )

Ссылки
  1. http://goo.gl/h2jfTH
Комментарий
There are no comments made yet.
Jochen Peters Ответ принят
ok
Thanks
Комментарий
There are no comments made yet.
Jochen Peters Ответ принят
this my XOJO Code
mReport.SetParameterValue("param1",TxtDateFrom.text.Trim)

this is the code in the expression and do no show the date on the Report
$P(param1)
what i am doing wrong
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Looks correct.

You can also try with a default value of parameter.
$P(param1=default_value)

Is the parameter recognised and you can see the default value in the preview?
And from Xojo app?
Комментарий
There are no comments made yet.
Jochen Peters Ответ принят
if $P(param1=default_value) it show on the report default_value but if i send the parameter from XOJO no show any value
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Without SetParameterValue it shows default_value.
With SetParameterValue it is empty, right?
Комментарий
There are no comments made yet.
Jochen Peters Ответ принят
with SetParameterValue it shows default_value and without it shows default_value
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
And the sequence of calls is:
1. MakeNewReport
2. SetParameterValue
3. PrintToDisk/PrintToBuffer

Right?
Комментарий
There are no comments made yet.
Jochen Peters Ответ принят
ok
thanks
that was the problem the order of the call for the SetParameterValue

now works
Комментарий
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.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories