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

Author Topic: Multiple Databands side by side  (Read 2912 times)

tv

  • Newbie
  • *
  • Posts: 3
    • View Profile
Multiple Databands side by side
« on: January 16, 2022, 01:48:56 am »
First of all compliments for the good design !
This is the most stable, well ordered and clear concept report tool for Qt. Also from the aspect of usability and efficiency, well done.
If we use it at the end we will donate you for sure.

We have a special problem of sorting data in the report.
We have done this in the past with MS ACCESS and this tool had subreports. This was a nice idea, on the other hand we sometimes got mad.

The idea we have with limereport would be to have several databands with different datasources side by side as columns also of different length.
This way we could print from different tables in the database values with different row counts side by side.
The data - measurement values - are shown in a nice collumn overview side by side.

It would be possible to achieve this also with qt model and sort the data into this model before calling the report.

On the other hand by placing databands with different datasets side by side would avoid additional programming.

Simply making the width (in the moment fixed in the designer) of the databands smaller than the page width and get this way several columns will not lead to the result we want, I presume. Or am I wrong?

What do you think?





Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1005
    • View Profile
Re: Multiple Databands side by side
« Reply #1 on: January 17, 2022, 09:31:00 pm »
Hi!
Thank you for your kind words about my project!
If I understood you right you want something like shown in the attached picture, isn't it?

tv

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Multiple Databands side by side
« Reply #2 on: January 18, 2022, 04:34:55 pm »
you're welcome and exactly !

In principle we can do this with a model - as said before.

In cases we don't want to program this - or we can't - my proposal together with sql datasources is the only way I can see in the moment to get this working. Also a view in a database could solve this. Ugly programming. :-\

By the way:

1. I solved the externalPainter - I hope - to be used with bands. See issue #374 (#371 for a minor bug, but it took me long to find it)

2. are you interested in commercial marketing ? This should not be discussed here. I compared really a lot of tools and there are some advantages.

bye for now
Thomas

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1005
    • View Profile
Re: Multiple Databands side by side
« Reply #3 on: January 18, 2022, 09:25:37 pm »
Look at this example, I think it can help in your case

tv

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Multiple Databands side by side
« Reply #4 on: January 20, 2022, 12:00:42 pm »
nice, working !  ;D

But realy tricky.

Without deep knowledge of the software no chance.

What puzzles me a bit, is that the databand datasource is not required to get the correct number of iterations to fetch all rows.
The number of rows are different.

So this breaks a bit the concept ?

But as a demonstrator excellent.

And I discovered that it is possible to explore the classes/objects with the interactive look-up functionality.
And even get pointers .... Huuh.

Is this API also for C++ available ? (not the lookup, the access to the classes/instances.)

Because presenting this functionality to the fingertips of customers is somewhat dangerous.
« Last Edit: January 20, 2022, 12:16:08 pm by tv »

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1005
    • View Profile
Re: Multiple Databands side by side
« Reply #5 on: January 26, 2022, 01:02:00 am »
Quote
What puzzles me a bit, is that the databand datasource is not required to get the correct number of iterations to fetch all rows.
The number of rows are different.
I can explain what happens in this report :)
I have selected the biggest datasource via variable "base_ds".
Then I just move the current row pointer in the other datasources via script and fix if datasource at the end in the map "datasources".
Then $S{if (!datasources.get("d1")) $D{d1.1}; else ""} checks if datasource has data to render or not.
No tricks, just JavaScript :)

Quote
Is this API also for C++ available ? (not the lookup, the access to the classes/instances.)
No, limereport interacts only with objects that are registered in the script engine scope.