Starting point on a page for labels

Stimulsoft Reports.NET discussion
THE V
Posts: 6
Joined: Mon Dec 10, 2007 4:40 pm
Location: California

Starting point on a page for labels

Post by THE V »

I was wondering if there was some way to change the starting point when printing multicolumn labels? For example: I have 4 records that I need to print labels with. I have a sheet of labels that is missing this first 10 labels. Is there someway to have the report start at label #11?

Thanks

Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Starting point on a page for labels

Post by Brendan »

Hey,

I've done something like this before for testing.
I will share the sample with you. You can Download it Here

I put some code behind the BeforePrintEvent for the Label_Area container. I added my own form to the report to specify where I want to start printing from and how many I want to print.

It should get you started. I made it quite a while ago so maybe the Stimulsoft team have anothe recommendation

Regards,
Brendan
THE V
Posts: 6
Joined: Mon Dec 10, 2007 4:40 pm
Location: California

Starting point on a page for labels

Post by THE V »

Brendan,

Thanks for the template. I've sat down and spent some time figuring out how it works. As I'm not a programmer, just the general bug finder and report generator, I have limited programming experience.

The template you posted uses a textbox in the form to hold the simple text to be printed. As I'm pulling the information from a SQL query I was wondering how I could add in the fields.

Do I add another report page and arrange the fields there? I'm really pretty lost at this point.

Thanks,

V
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Starting point on a page for labels

Post by Brendan »

The following sample that you can Download Here uses a simple Access Database to retrieve a list of customer names/addresses.

I modified my earlier sample to just specify starting position.

However I still required to put some code in the events behind the Databand.


In the BeforePrintEvent I am disabling each Label until it reaches the one we want to start from.
In the RenderingEvent I then reset the Datasource position back to the First one so all Customer from the beginning will then start printing from our desired label start point.


The Report is expecting the mdb file to be @ C:\Temp. So if you get an error you can either copy it to that location or just edit the Connection from the Dictionary in the Report Designer.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Starting point on a page for labels

Post by Brendan »

There's also another solution whereby you could create a copy of your Label Databand and place it above the real one.
Then remove any assigned Datasources to this dummy band.

After that all you need to do is the the dummy bands CountData property to your starting position.
However this will only work on a per row basis meaning if you have 1 label used on the sheet of paper and the next one placed horizontally across from it is not used it will be skipped.

For example if you have something like this:

Empty Empty
Empty Label
Label Label
Label Label

You would only be able to start printing at the 5th label instead of the one that's free at the 4th. However this method only requires 1 line of Code to set the CountData property of the dummy band and doesn't use Events.

the sample above allows you to start from any position
THE V
Posts: 6
Joined: Mon Dec 10, 2007 4:40 pm
Location: California

Starting point on a page for labels

Post by THE V »

Brendan,

Thanks for your efforts.

I've looked at the sample that you sent and tried to incorporate it into my database. I believe I'm using version 2007.1.0.0 version. The BeforePrintEvent doesn't disable correctly on my report, the data still prints. I have no idea why but it's a about driven me nuts trying to figure it out. It is not that critical however as it will be printing on the backing for the removed labels.

The good news is that the RenderingEvent is working mostly correctly and it does print the first label at the starting point...except, (the bad news) the starting point must be less than the total number of labels you wish to print. So if I only have 1 label I can only start at the # 1 position, 5 labels up to the #5 position, etc.

The dummy band method will not be a feasible alternative because it is too much for the enduser to have to tinker with. I personally have found how to use the two methods together to make start where I want it to. As long as I have more than 2 labels (I'm using a 80 label per sheet), it works well. But I can't have this setup for the enduser.

I believe I mentioned that I'm the programmers bug finder? I can find them but have no idea how to fix them. He's cringes when I come through the door lately and glares at me.

Thanks for your help,

V




Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Starting point on a page for labels

Post by Vital »

At this moment we test new report engine. It will be available in Feb. I think new report engine solve your problem.

Thank you.
Decipher
Posts: 3
Joined: Tue Aug 25, 2009 8:33 am
Location: Brazil

Starting point on a page for labels

Post by Decipher »

Hi,

could not download from link posted in example,

Please send me a example for eliandro.justo@gmail.com


Thanks!!
mchapman
Posts: 5
Joined: Wed Jan 25, 2017 9:39 pm

Re: Starting point on a page for labels

Post by mchapman »

I know this post is ancient, but it is attempting to do exactly what I need it to do. However, The links don't work and no code was provided for me to review. I was able to get the labels skipped/disabled until my starting position was reached, but I can't get the datasource position back to 0 correctly.

I've put the follow snippit in the Rendoring event of the datasource, but it has no effect:
IIF(Line == LabelsToSkip,
vItemCategoryManufacturer.Position = 0,
null)

If I put that same snippit in the Before Print event then it only prints from the 0 position and never increments.

Can anyone post a working example?
Lech Kulikowski
Posts: 6272
Joined: Tue Mar 20, 2018 5:34 am

Re: Starting point on a page for labels

Post by Lech Kulikowski »

Hello,

Could you explain your task in more detail? Do you need to skip some records in the data source or on the page and keep the space for the skipped labels?

Thank you.
Post Reply