1. Emilio Robles
  2. Valentina Reports ADK
  3. Понедельник, Август 31 2020, 11:33 AM
  4.  Подписаться через email
Hi.
Is there a way to query the parameters of a project from xojo?
I have not found a way to do it with the vProject and vReport objects.

Maybe with javascript using vReport.runscript ()?

I need to know the parameters that are defined (interactive) to ask the user before launching the report.

Thanks.
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Hello Emilio,

No, currently there are only two methods regarging parameters in the API - VReport.SetParameterValue( paramName, value ) and VReport.ParameterValue( paramName ).

It is necessary to avoid hardcoded parameter names in Xojo code and get information about parameters from the report, right?
Комментарий
There are no comments made yet.
Emilio Robles Ответ принят
Hello Sergey. Thanks for the reply.

I have finally used an invisible expression within the report where I describe the parameters used.
From xojo I read the value of the expression and build the form to ask the user.

e.g.

params = myReport.RunScript("report.controls.params.label")


So I can change reports without having to deploy an update to my app.

It would be useful to get this information directly with the API. ;)
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
Sergey,

so is this a good idea to extend API?
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Yes, I think we can add method to return XML definition of the report parameters
Комментарий
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.