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

Author Topic: Footer only get first row from table widget  (Read 6107 times)

ann

  • Newbie
  • *
  • Posts: 16
    • View Profile
Footer only get first row from table widget
« on: September 03, 2018, 09:40:44 am »
I am getting data from table widget into GroupBandFooter. However, all the footer keep on getting data from first row. I am tough that the footer will continue append data from the next row of table widget.

Is it possible to get data from second row of data for the second footer and so on?
Is it possible to direct access into a table and get specific row or column of data?

Attached is the template design and the arrow-ed footer always get data from first row of my table widget.

Thanks in advance.

Subst

  • Sr. Member
  • ****
  • Posts: 450
    • View Profile
Re: Footer only get first row from table widget
« Reply #1 on: September 03, 2018, 06:13:44 pm »
As I see you've forgot to assign datasource to the dataBand

ann

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Footer only get first row from table widget
« Reply #2 on: September 04, 2018, 04:47:41 am »
As I see you've forgot to assign datasource to the dataBand

I did assign datasource to databand. The databand works well but footer not.

Subst

  • Sr. Member
  • ****
  • Posts: 450
    • View Profile
Re: Footer only get first row from table widget
« Reply #3 on: September 04, 2018, 02:56:44 pm »
Well, The footer band isn't for working with set of data 'row-by-row'. It's for some summary data from table. For example average of values in column and so on.

Let me see your lrxml file?

ann

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Footer only get first row from table widget
« Reply #4 on: September 05, 2018, 10:07:33 am »
Well, The footer band isn't for working with set of data 'row-by-row'. It's for some summary data from table. For example average of values in column and so on.

Let me see your lrxml file?

I see. I did the summary in a table and I just wanted to load the summary from the table. The footer table and databand table is different table.
Sure, attached is the lrxml file.

Thanks  :)

Subst

  • Sr. Member
  • ****
  • Posts: 450
    • View Profile
Re: Footer only get first row from table widget
« Reply #5 on: September 05, 2018, 12:57:22 pm »
ann, in this case U just need to add another databand and define second table for it as datasource.

Or it's strongly necessary to use the groopfooter band?

ann

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Footer only get first row from table widget
« Reply #6 on: September 07, 2018, 06:36:52 am »
ann, in this case U just need to add another databand and define second table for it as datasource.

Or it's strongly necessary to use the groopfooter band?

Thanks for the suggestion but it does not work. It will print all my databand1 first then just print databand2. I need the databand2 start printing only a row when the groupheader condition meet, and then start print the next row when the next groupheader condition meet and so on.

I sent another attachment, the arrow part need to be update on every different date.

Is it possible for me to access directly to the table in limereport GUI template? I tried $D{staff_hour.w_days[0]}, $D{staff_hour.w_days(0)}, $D{staff_hour.w_days.[0]}, $D{staff_hour.w_days.(0)} but it does not work. I am thinking to directly access into table and assign the row manually into group footer.

Sorry for the long essay and advance thanks for your help. :)

solomon78

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Footer only get first row from table widget
« Reply #7 on: September 07, 2018, 12:26:59 pm »
can you provide example of in form sketch or table on how you want it to be for easy understanding? I believe Lime Report Designer has facilities to solve your problem.

Subst

  • Sr. Member
  • ****
  • Posts: 450
    • View Profile
Re: Footer only get first row from table widget
« Reply #8 on: September 07, 2018, 02:54:02 pm »
Ann, try to use data header & data footer instead group header & group footer first.

Then If u are using LR from your application You can create the instance of LimeReport::ICallbackDatasource* for and control the navigation throw the table in your QT code.

Or you can use the master-detail relation between main data and footer data in LR.

ann

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Footer only get first row from table widget
« Reply #9 on: September 12, 2018, 01:39:38 pm »
Sorry for the late reply.

can you provide example of in form sketch or table on how you want it to be for easy understanding? I believe Lime Report Designer has facilities to solve your problem.
I will try to draft it soon to make everything clear.

Ann, try to use data header & data footer instead group header & group footer first.

Then If u are using LR from your application You can create the instance of LimeReport::ICallbackDatasource* for and control the navigation throw the table in your QT code.

Or you can use the master-detail relation between main data and footer data in LR.
Data header and data footer does not work. Will try your other suggestion soon.


If still could not manage to get it, will give up on that kind of display method.
Thanks guys.

Subst

  • Sr. Member
  • ****
  • Posts: 450
    • View Profile
Re: Footer only get first row from table widget
« Reply #10 on: September 13, 2018, 07:53:08 pm »
Hi, Ann.

Can you provide me a sample of database and exact description what result you want ?

Exact means "Step by step". What data in each place (band) your wanna see

ann

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Footer only get first row from table widget
« Reply #11 on: September 18, 2018, 04:56:00 am »
Hi, Ann.

Can you provide me a sample of database and exact description what result you want ?

Exact means "Step by step". What data in each place (band) your wanna see


Hi Subst, I try to explain at my best.

I have 2 tablewidget, one is the data(Table A) and the other one is the summary of the data(Table B).

Table A will arrange the data by date, so once the date is different, it will close with a footer and open a new header for the next date. At the same time, I need Table B first row of data to be display at the group footer.

Attached is my desired output.

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1005
    • View Profile
Re: Footer only get first row from table widget
« Reply #12 on: September 24, 2018, 07:36:34 pm »
Hi, Ann.
Do the table which you want to place on the footer contains fixed rows and columns count? (As i can see you know)
If you know how many cells should be placed, you can group them in one row but place it in table.
In another case, a table element is needed, but limereport does not currently have such an element