Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Big picture, little picture what can I do?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-03-30 : 00:01:05
Doug writes "You've come through for me on several occassions, but if I ever really needed help - this would be the one! Thanks in advance.

I am responsible for publishing a bi-weekly used cars and trucks classified magazine. I use the ActivePDF Toolkit component, Adobe Acrobat 4.0, SQL 7 and ASP to generate the 100 to 150 pages of black and white photos, ad copy and seller information in pdf. Each page of the magazine currently contains 14 cars (3 rows of 4 cars and 1 row of 2 cars), so my code does the following:

1) connects to database
2) executes a stored procedure to create recordset
3) loops through 14 records filling in form fields on an Adobe Acrobat form as it goes (form fields in the Acrobat form are labeled with a unique name and a number representing a position in the form. For example, car one consist of the following Acrobat form fields: photo1, adcopy1, sellername1, sellerphone1, etc. Car two consists of photo2, adcopy2, sellername2, etc.
4) Programatically prints (or creates) a page after it reaches the 14th car
5) Clears the form fields in the Acrobat file and starts again until eventually I have created 100 to 150 pages of cars and trucks!

This process works GREAT, but I need to insert BIG photos here and there which throws my math for a loop! Here are my challenges:

1) Each page will only support two large photos due to page size constraints.
2) The magazine is ordered by vehicle make. Not all makes have more than one page of cars (there are some weird cars out there)
3) Each picture needs to be on the page identified by it's make. (I can't have a Chevrolet in a page labeled Cadillac at the top).
4) This process needs to be dynamic like it is now (click of a button)

So, I need an equation or code that addresses these issues:

1) If more than two cars, within the 14 that are looped through prior to the print page command, are tagged as "BIG", how do I move the "BIG" cars to the next page?

Actually, that is the big question. I am probably as clear as mud, but I am happy to explain it again or provide you with more details that may help you formulate an answer. I am stumped!

Thanks,

Doug"
   

- Advertisement -