Vbscript Sorting S’abonner

0
Avatar
Legacy Poster

Hello everyone taking the time to read this.

I am trying to sort at print time in BarTender, or even before print time in Excel, using VB scripting.
Previously, I have made my sheet of records by turning the spreadsheet 90 degrees counter clockwise, taking the second half of the records and inserting them into a second sideways column (row) in reverse order.
I am quite sure that sounds totally confusing. This is done so that when I print the sorted spreadsheet as a PDF, it prints on the card stock with record 1 in the top right corner, proceeding left to record 2, 3 and 4. And then on the bottom half of the sheet are the records starting at the halfway point +1, then +2, etc.

Now I am not printing a PDF but using BarTender to pluck the records straight from the Excel file, one at a time, at print time. So I need the records sorted so that record 1-4 will come out first, then (total records/2)+1, +2, +3,+4, then record 5-8, then (total records/2)+5, +6, +7, +8 (this example would be the first two pages) and so on until the end of the records.

I have no issue with getting BarTender to print from an Excel file as the database setup is easy in BarTender. I just cant get the sort order correct.

Anyone have any insight?

8 commentaires

0
Avatar
Susan Chen
Modérateur
Actions pour les commentaires Permalien

Hi, Bindox:


Yes, it sound quite confusing ~~ To avoid misunderstanding, can you send us your btw file format, excel database and pdf correct result and expect result you want to get from excel database correct sort order?



Thanks in advance.
0
Avatar
Ian Cummings
Modérateur
Actions pour les commentaires Permalien

In the "Database Setup" dialog of BarTender have you noticed the "Sort" tab that allows you to sort the order of records based on any field you want in ascending or descending order? Will this not help you achieve what you want?
0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

[quote name='Ian C - Seagull Support' timestamp='1344940301' post='3071']
In the "Database Setup" dialog of BarTender have you noticed the "Sort" tab that allows you to sort the order of records based on any field you want in ascending or descending order? Will this not help you achieve what you want?
[/quote]

No. I need nested sorts.
0
Avatar
Ian Cummings
Modérateur
Actions pour les commentaires Permalien

When you mention "nested sorts" do you mean sorting by more than on field? If so then this is possible by adding the sort fields in order of importance and specifying whether they are ascending or descending.
0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

[quote name='Ian C - Seagull Support' timestamp='1344959192' post='3074']
When you mention "nested sorts" do you mean sorting by more than on field? If so then this is possible by adding the sort fields in order of importance and specifying whether they are ascending or descending.
[/quote]

Let me quote my original post:
"I need the records sorted so that record 1-4 will come out first, then (total records/2)+1, +2, +3,+4, then record 5-8, then (total records/2)+5, +6, +7, +8 (this example would be the first two pages) and so on until the end of the records."

If there were 100 records, 1-4 would be first, then 51-54. Then 5-8, then 55-58.
0
Avatar
Ian Cummings
Modérateur
Actions pour les commentaires Permalien

To be honest, I didn't really understand much from your original post, and subsequent explanations haven't helped. I just took a shot at the sort order being what you wanted. I have re-read your posts a number of times, and shared it with other colleagues to look at, and unfortunately we are still none the wiser.

I will take another pot-shot.

Perhaps what you are wanting is the print order feature found in the BarTender "Page Setup" dialog under the "Printing Order" tab. In this dialog, if there are multiple rows and columns on a page you can specify where on the page the first label will be printed, and in what direction on the page subsequent labels will follow in a designated order. I hope this is what you are after, because otherwise I'm out of ideas. :)
0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

[quote name='Ian C - Seagull Support' timestamp='1344960517' post='3076']
Perhaps what you are wanting is the print order feature found in the BarTender "Page Setup" dialog under the "Printing Order" tab. In this dialog, if there are multiple rows and columns on a page you can specify where on the page the first label will be printed, and in what direction on the page subsequent labels will follow in a designated order. I hope this is what you are after, because otherwise I'm out of ideas. :)
[/quote]

The printing order tab only allows you to assign a per page print order. Id does not allow you to pull records from a database in any varying order. I have to sort the records before I print them so that my BarTender template can just pull them out in order. I was just hoping it could be done through the BarTender VB scripting in my template. Instead I will have to write a huge macro in Excel. :(
0
Avatar
Ian Cummings
Modérateur
Actions pour les commentaires Permalien

Sorry, but you will need to explain better what it is that you want. Once I and others understand what is wanted then perhaps we can help you. Currently I'm lost by your explanations.

Vous devez vous connecter pour laisser un commentaire.