2018.1.2: DataBands inconsistent behaviour (Bug)

Stimulsoft Reports.WEB discussion
vineet
Posts: 69
Joined: Fri Nov 10, 2017 3:12 am

2018.1.2: DataBands inconsistent behaviour (Bug)

Post by vineet »

Hi there,

I can't seem to wrap my head around this behaviour of Master-Detail databands. I was facing it over a long time and it took really long to replicate it.

I hope I am able to explain it properly and provide you with as much information to fix this.

Version: 2018.1.2
Product: Stimulsoft.Web

Scenario:
I have a very basic report with 3-level Master-detail DataBands on one page. No fancy stuff.
School
-- Class
-- -- Student (has a property = Marks)

Now, when I display all in databands after setting MasterComponent, everything works as expected and I see the whole list:
Whole data correct display
Whole data correct display
2017-12-07_164450.png (9.7 KiB) Viewed 3292 times
Now, I added a filter to the Student DataBand to only show students with Marks > 50. It worked sweet:
Marks > 50
Marks > 50
Greater50.png (5.37 KiB) Viewed 3292 times
Now, here's the issue. When I update the filter to show all students with Marks > 80, although it shows the StudentIds and the classes that they belong to, it doesn't show the School?! How am I able to tell which school do these kids belong to?
Marks > 80 (Bug)
Marks > 80 (Bug)
Greater80.png (3.54 KiB) Viewed 3292 times

My 2 cents of in-depth error understanding:
It so happens that when the filter is applied, if the resulting rows are at the first position of child bands, the master is shown. This is why you saw School in the filter with Marks > 50. Because the first child (first class) in School Master band was "Science" and this class had students with Marks > 50.
But as soon as the filter was made to only target the second class "Commerce", the master disappeared. This was done using filter = Marks > 80.

Can you please fix this or tell me what I may be doing wrong so that I can use Stimulsoft in our enterprise product? I think this is quite inconsistent and should not happen in such a professional product.

Cheers,
Vineet
Attachments
Book2.xlsx
Data for the report
(11.89 KiB) Downloaded 311 times
Report1.mrt
(10.99 KiB) Downloaded 262 times
vineet
Posts: 69
Joined: Fri Nov 10, 2017 3:12 am

Re: 2018.1.2: DataBands inconsistent behaviour (Bug)

Post by vineet »

Anyone?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: 2018.1.2: DataBands inconsistent behaviour (Bug)

Post by Edward »

Hi Vineet,

I do apologize if I did not get the issue in the correct way, and please feel free to correct me if I am wrong, but here is how I would get around the issue, please check the attached report. It worked for me exactly in the same way in both Web and Desktop versions of the report engine.
If you think about the data source for each of the 3 databands, then every one of them is being 'scrolled' depending on the current row position of the Master, first or the second child. That is the way I think is the easier to understand what is going on during the rendering.

Sometimes there are no child rows for the master databand or for the first child in master-detail-subdetail reports. In that case, there is a property of the databand which is :
PrintIfDetailEmpty
This property will render a master row even if the children bands are missing for one of the master bands.

Thank you,
Edward
Report1_wih_colours.mrt
(13.02 KiB) Downloaded 288 times
vineet
Posts: 69
Joined: Fri Nov 10, 2017 3:12 am

Re: 2018.1.2: DataBands inconsistent behaviour (Bug)

Post by vineet »

Thanks for replying, Edward. PrintIfDetailEmpty serves a different purpose. The scenario I am talking only happens with PrintIfDetailEmpty = FALSE. As I don't want to see the master bands if detail is filtered out. Imagine the scenario if my database had 10,000 schools and I run a filter on the Student band for Marks = 77, it will show me 9,999 other schools + their classes for no reason!

It correctly hides the master band when the filter causes the first child of school to appear. But not when it is the second. You do agree that this is a bug and needs fixing, right?

PrintIfDetailEmpty is of no help to me. I just want to see SchoolA > Science > Student2.
2017-12-10_002759.png
2017-12-10_002759.png (6.77 KiB) Viewed 3262 times
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: 2018.1.2: DataBands inconsistent behaviour (Bug)

Post by Edward »

Hi Vineet,

Thank you for explaining the problem. Do you think the good workaround would be to set the height of the Master band and the height of the first child to zero, and to remove all the text components from these bands? Please see the attached report.

Thank you,
Edward
Attachments
Report1_wih_colours_v1.mrt
(11.24 KiB) Downloaded 148 times
vineet
Posts: 69
Joined: Fri Nov 10, 2017 3:12 am

Re: 2018.1.2: DataBands inconsistent behaviour (Bug)

Post by vineet »

No, Edward, I want to show the school and class once per a group of students to show that they are all grouped under them. What's the point of repeating all that header data in every row? That is a poor design in my opinion.

Please refer to my initial post, the first image that I have attached shows the view that I am after. But should work for any children. Why can't the Master be displayed for the second child? That is a conceptual bug in my opinion. Is this something that cannot be fixed?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: 2018.1.2: DataBands inconsistent behaviour (Bug)

Post by Edward »

Hi Vineet,

I see the problem now, thank you for the hint. I had to switch on the filtering from your first sample in order to reproduce the problem, will let you know once the work of the PrintIfDetailIsEmpty is improved for the sub-detail bands in this topic.

Thank you,
Edward
vineet
Posts: 69
Joined: Fri Nov 10, 2017 3:12 am

Re: 2018.1.2: DataBands inconsistent behaviour (Bug)

Post by vineet »

Yes!!! Thanks, Edward. Please keep me posted on this as I need to purchase it before Christmas, but my PoC reports have this weird issue that needs fixing.

Cheers
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: 2018.1.2: DataBands inconsistent behaviour (Bug)

Post by Edward »

Hi Vineet,

Sure, will update this topic once the problem is solved.

Thank you,
Edward
5503
vineet
Posts: 69
Joined: Fri Nov 10, 2017 3:12 am

Re: 2018.1.2: DataBands inconsistent behaviour (Bug)

Post by vineet »

Hi Edward, I assume the latest update does not fix this?
Post Reply