Band is printed twice if another band is situated below

Stimulsoft Reports.WPF discussion
User avatar
PJoyeux
Posts: 160
Joined: Tue Nov 26, 2013 9:40 am
Location: Germany

Band is printed twice if another band is situated below

Post by PJoyeux »

Hi,

I have a report with 2 bands on it. Those bands are attached to two different business objects.

If I remove the second band from the report, then the first band prints correctly (there 12 entries, and 12 rows are printed). If I leave the second band (which is located below the first one) then the first band prints 12 rows, then the second prints 6 records (in 3 rows because I use two columns), but then the first bands prints again!

This is how I want it to be printed (mockup):
Bild 4.png
Bild 4.png (80.16 KiB) Viewed 5619 times
This is how it gets printed (first band printed a second time, after the second band):
StimulSoftRepeatingBandProblem.png
StimulSoftRepeatingBandProblem.png (122.35 KiB) Viewed 5619 times
This is how it gets printed when ony the FIRST band exists (first band printed once):
Bild 3.png
Bild 3.png (68.93 KiB) Viewed 5619 times
I have attached the report. The third page is the one concerned. I think I must have messed up something, somewhere, but what? ;)

Thanks for your help!

Cheers,
Pascal
Attachments
Fahrauftrag.mrt
(98 KiB) Downloaded 338 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Band is printed twice if another band is situated below

Post by HighAley »

Hello.

We need a sample data for this report template. While you use Business Objects, it's better to get a sample project.
Meanwhile, try to add a Data Band with Disposition Business Object on the Page3. Set its background color to see where it is printed. If I'm right, you will see this Band before each DataBand4.

Thank you.
User avatar
PJoyeux
Posts: 160
Joined: Tue Nov 26, 2013 9:40 am
Location: Germany

Re: Band is printed twice if another band is situated below

Post by PJoyeux »

Hi,

I have no idea how I could make the data available... The structure of the date is visible in the dictionary. I have ONE object of the type "Disposition". The Disposition object has 13 sub-objects of the type "SitzplanReihen" and 6 objects of the type "TourenEinstiege".

"Disposition"."SitzplanReihen" is used as DataSource for the DataBand4. "Disposition"."TourenEinstiege" is used as DataSource for the DataBand7.

I have colored the two bands. Attached is a screenshot of the preview and the the new report-itself.

I can't understand what happens... Both bands are printer twice... :-(

Pascal
Attachments
Bild 1.png
Bild 1.png (105.44 KiB) Viewed 5610 times
Fahrauftrag.mrt
(100.01 KiB) Downloaded 483 times
User avatar
PJoyeux
Posts: 160
Joined: Tue Nov 26, 2013 9:40 am
Location: Germany

Re: Band is printed twice if another band is situated below

Post by PJoyeux »

I have simplified the report and removed pages. There is now only 1 page with those databands, I have removed Header and footer-band but the problem persists...

This is the structur of the Disposition-object in c#

Code: Select all

        public String BusunternehmerFirmenName { get; set; }
        public String BusunternehmerAnsprechpartner { get; set; }
        public String BusunternehmerAdresse { get; set; }
        public String BusunternehmerPLZundOrt { get; set; }
        public String BusunternehmerTelefon { get; set; }

        public String ReiseName { get; set; }
        public DateTime ReiseAbfahrtsdatum { get; set; }
        public DateTime ReiseTermin { get; set; }

        public String DispositionBegleittext { get; set; }
        public String DispositionEinsaetzeDesTermins { get; set; }
        public int DispositionEinsatz { get; set; }

        public String HotelName { get; set; }
        public String HotelTelefon { get; set; }
        public String HotelAdresse { get; set; }

        public List<TourenEinstiegePrintingBusinessClass> TourenEinstiege { get; set; }
        public List<SitzplanReihePrintingBusinessClass> SitzplanReihen { get; set; }
        public int AnzahlBelegterSitzplaetze { get; set; }
If both properties (Lists) "TourenEinstiege" and "SitzplanReihen" have entries then the bands get printed twice. If "TourenEinstiege" has not entries, then DataBand7 gets printed once and DataBand1 is not printed. If "SitzplanReihen" has not entries then DataBand7 is not printed and DataBand1 is printer once. As Soon as there are entries in both lists, then both bands gets printed twice... :shock:

I have no idea what the problem might be...

Cheers,
Pascal
Attachments
Fahrauftrag TEST.mrt
(26.09 KiB) Downloaded 468 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Band is printed twice if another band is situated below

Post by HighAley »

Hello.

Sorry, but we couldn't reproduce your issue.
Please, send us a sample working project with all necessary data to reproduce it.

Thank you.
User avatar
PJoyeux
Posts: 160
Joined: Tue Nov 26, 2013 9:40 am
Location: Germany

Re: Band is printed twice if another band is situated below

Post by PJoyeux »

Aleksey Andreyanov wrote: Please, send us a sample working project with all necessary data to reproduce it.
While thinking about a way to make the data available to you I continued tinkering with the report and finally found a solution...

I have now wrapped by two bands within "Master-Band". Both sub-bands are place in panels and the "Master-Band" is attached to the Disposition-Business-Object, the two sub-bands are attached to Dispostion.TourenEinstieg and Dispostion.SitzplanReihen respectively.
Bild 2.png
Bild 2.png (65.76 KiB) Viewed 5605 times
The big difference between my actual solution and the former one is the "Master-Band". Formerly my two bands were losely laying directly on the background of the page. I still don't know why those bands were printed twice with the first solution, but now it works.

I guess I must get used to always use DataBands... ;-)

Thanks for your support!

Cheers,
Pascal
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Band is printed twice if another band is situated below

Post by HighAley »

Hello.

There are some differences of building report when using Business Objects instead of any other Data Source.
It's not necessary to set the Master Component and Data Relation when Business Object is set.
Also due to the defined structure of the Business Objects the bands could behave unexpectedly if you miss band with root Business Object.
I hope it made some clarity for you.

Thank you.
User avatar
PJoyeux
Posts: 160
Joined: Tue Nov 26, 2013 9:40 am
Location: Germany

Re: Band is printed twice if another band is situated below

Post by PJoyeux »

Aleksey Andreyanov wrote: It's not necessary to set the Master Component and Data Relation when Business Object is set.
This is a misunderstandig I presume. I gave the name "Master-Band" to the band containing the others just to explain what I did. It's just a name... I have not used Master/Detail Relations...
Aleksey Andreyanov wrote:Also due to the defined structure of the Business Objects the bands could behave unexpectedly if you miss band with root Business Object.
I guess this was indeed my problem. I had not used a band with the Root-Business-Object. That's what my "Master-Band" does now...

Cheers,
Pascal
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Band is printed twice if another band is situated below

Post by HighAley »

Hello, Pascal.

It means that your problem is solved.
We will improve our documentation to avoid such problems in feature.

Thank you.
User avatar
PJoyeux
Posts: 160
Joined: Tue Nov 26, 2013 9:40 am
Location: Germany

Re: Band is printed twice if another band is situated below

Post by PJoyeux »

Yes, the problem is solved, thank you!

Cheers,
Pascal
Post Reply