Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: Data sources in memory (list of objects, single variables etc.)  (Read 2441 times)

vgon

  • Newbie
  • *
  • Posts: 6
    • View Profile
Hi there,

All my "data sources" are constructed in memory (running my application e.g. list of strings or hashmaps to specific class instantiations or lists of various objects). It is difficult to find something close to it into Lime forum. For example, i am interested in checking the page number/number (to feed my report accordingly) and feed specific fields of a report page with data. Is it possible to have such a check through Lime?
It is also impossible to find a way to iterate through my data and fill a band's data. Moreover, there might be single fields in the report (e.g. in the reportheader) to just assign a single value coming from a specific variable in my program. What "name" should i use to access a specific field in the Lime report (is it the "objectName" from the properties in object inspector?) ? It would be very useful to have such an example. If you want me to provide more information on my concerns please tell me so.
Thank you so much in advance !!!

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1005
    • View Profile
Re: Data sources in memory (list of objects, single variables etc.)
« Reply #1 on: April 19, 2023, 09:27:21 pm »
Hi.
Have you looked at the example project demo_r1 from limereport sources ?
You can create a virtual datasource and feed it any data.

vgon

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Data sources in memory (list of objects, single variables etc.)
« Reply #2 on: April 20, 2023, 09:41:17 am »
The easiest solution i could think of, is to fill various instances of tablewidgets with required data and then getting the model of each tablewidget to make a new data source. For other cases like "single variable" text fields that are used by a page, i use $V{variable_name}. It wasn't so clear in the documentation but with code experimentation i was able to figure this out.
Thank you very much for your response !!!