Using DataBand CountData property

Stimulsoft Reports.NET discussion
Post Reply
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Using DataBand CountData property

Post by Jennypi »

Hello,

I have an Excel file like this:

Code: Select all

LINE#  PLANTS  FRUITS
Line1  3            2
Line2  2            3
And I would like to print labels like this:
Line1
Plant1
Fruit1

Line1
Plant1
Fruit2

Line1
Plant2
Fruit1

etc.

How can I do that?
Can you provide me with an example?

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: Using DataBand CountData property

Post by Jennypi »

One more information: the number of plants and of fruits per line is always the same: 6 plants and 5 fruits for all.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Using DataBand CountData property

Post by HighAley »

Hello.

Could you send us right data. There is only one Line1. Where do you get Friut1 and Fruit2?

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: Using DataBand CountData property

Post by Jennypi »

Here it is.
I need one label per plant and fruit ->30 labels per line (6 plants * 5 fruits)

Thank you!
Attachments
Etiquettes.xlsx
(11.95 KiB) Downloaded 187 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Using DataBand CountData property

Post by Alex K. »

Hello,

Can you please send us a sample how it should look like.

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: Using DataBand CountData property

Post by Jennypi »

I found how to solve my problem with a short script in the After print event:

Code: Select all

fruit=fruit+1;
if (fruit>5)
{plant=plant+1;
fruit=1;}
if (plant>6)
{plant=1;
fruit=1;}
[code]

Thanks.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Using DataBand CountData property

Post by Alex K. »

Hello,

Ok. Let us know if you have any additional question.

Thank you.
Post Reply