How to repeat DataBand using quantity from field.

Stimulsoft Reports.WEB discussion
elmarx
Posts: 2
Joined: Tue Nov 24, 2015 10:26 pm

How to repeat DataBand using quantity from field.

Post by elmarx »

Hello,

I have already searched that forum for a solution but I couldn't find one that suits my case. But maybe I missed something. Anyway here is my case.

Imagine that I have a Delivery Note with 5 positions. Each position has its own field with quantity in the delivery note.

Delivery Note 1__
L__Position1 (4)
L__Position2 (3)
L__Position3 (2)
L__Position4 (1)
L__Position5 (8)

What I need is to print a label for each position n times, where n=each position's quantity. So in my case general number of labels would be 18. 4 labels for Position 1 etc.

My current report contains only one databand and it prints now 5 labels.

I was trying to use BeforePrint event and put there: {DataBand1.CountData = (int)MMNN_MMOO_00000100.Quantity;}. Then report shows only 4 labels for Position1 (which is correct) but doesn't pass to next position.

What am I doing wrong?

PS. I'm quite fresh in Stimulsoft.

Thank You for answering me.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: How to repeat DataBand using quantity from field.

Post by Alex K. »

Hello,

As a way, you can use additional DataBand and in BeforePrint event of your main band set the CountData property for the second band.

Thank you.
Attachments
ReportSample.mrt
(20.32 KiB) Downloaded 527 times
elmarx
Posts: 2
Joined: Tue Nov 24, 2015 10:26 pm

Re: How to repeat DataBand using quantity from field.

Post by elmarx »

Thank You Aleksey that worked fine.

Cheers
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Re: How to repeat DataBand using quantity from field.

Post by Andrew »

Hello,

Thank you for letting us know about this.
Nirali213
Posts: 11
Joined: Wed Sep 09, 2020 6:22 am

Re: How to repeat DataBand using quantity from field.

Post by Nirali213 »

Hello,

I follow this steps but still i can not able to fix the problem. i am new in stimulsoft report please help me with this
Lech Kulikowski
Posts: 7336
Joined: Tue Mar 20, 2018 5:34 am

Re: How to repeat DataBand using quantity from field.

Post by Lech Kulikowski »

Hello,

Please send us your report with test data that reproduces the issue for analysis.

Thank you.
Nirali213
Posts: 11
Joined: Wed Sep 09, 2020 6:22 am

Re: How to repeat DataBand using quantity from field.

Post by Nirali213 »

Hello,

i attached my report.plz give me sollution.
Attachments
ReportSample.mrt
(2.97 KiB) Downloaded 254 times
Nirali213
Posts: 11
Joined: Wed Sep 09, 2020 6:22 am

Re: How to repeat DataBand using quantity from field.

Post by Nirali213 »

Hello,

i want to print test 3 times. Thank you
Lech Kulikowski
Posts: 7336
Joined: Tue Mar 20, 2018 5:34 am

Re: How to repeat DataBand using quantity from field.

Post by Lech Kulikowski »

Hello,

In your report is used Interpretation mode (CalculationMode property). In that mode, events are not supported.

Thank you.
Nirali213
Posts: 11
Joined: Wed Sep 09, 2020 6:22 am

Re: How to repeat DataBand using quantity from field.

Post by Nirali213 »

Hello,

I removed Calculation Mode property but still it is not working . Please help me with this
Attachments
ReportSample.mrt
(2.5 KiB) Downloaded 223 times
Post Reply