Pushing data into an object for a report and when to use square bracks


Guest

Hi there.

I'm trying to assign data to a report via the ".data" method.
something like this..

But I get an error :

I am trying to list the properties .. with a column A and a column B
In my report.html I have something like...

I also tried..

The other thing - and I'm sorry to ask two questions in one...
When do I use "test" and when do I use "[test]"
As I understand it the only time to use "test" is when you create a new object. All other times you use square brackets.

Or could I create an object from a variable if i use square brackets?
ie.


DecSoft

Hello fakie,

Are you tried with the "Report4" sample? Because in fact they use the [Report.Data] variable instead of the Report's URL, so I think that's exactly what you wanted. Please take a look at that sample. And, about your other question, in general we can use both "[brackets]" and "nobrackets" when deal with variables in actions, however, as a recomendation probably it's a good thing to always use the brackets with actions' arguments variables.



Guest

Thanks. That was fast!

I solved my problem -
1. I used ObjectsetProp "[test]" "B" "[myvalue]" and not ObjectsetProp "test" "B" "[myvalue]"
2. I used test.A in my report - but seems the builtin variable Record.A must be used.

Thanks!


DecSoft

Hello fakie,

Thanks. That was fast!

I solved my problem -
1. I used ObjectsetProp "[test]" "B" "[myvalue]" and not ObjectsetProp "test" "B" "[myvalue]"
2. I used test.A in my report - but seems the builtin variable Record.A must be used.

Thanks!

Yes; certainly for that reason (too much actions to remember all of them right now!) I always recommend to use the brackets when variables, except if the help said something else.


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.