Jump to content

This topic is 4388 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hi, any help here greatly appreciated ...

 

I have a simple table that has the fields: Job Number(Number), Start Week(Number), Job Interval(Number), Job Description(Text).

Each job can start on any week (up to 52) and can have an interval of any weeks (up to 52).

 

So a job with Start Week =1 and Job Interval = 1 will happen every week and a job with Start Week = 8 and Job Interval = 12 will happen on weeks 8, 20, 28, 36 etc.

 

I am trying to write a Script that will print out a year's jobs to a PDF file for printing later. I have broken it down into 2 Scripts as shown in the screenshots.

It's not working so if anyone could point me in the right direction, then thanks heaps.

 

rgds mcdirt

 

 

post-108074-0-82757200-1359166113_thumb.

post-108074-0-33228100-1359166121_thumb.

Posted

You are saving to PDF using the "append" option.

 

To do this, there has to be a file to append to!

 

The first save to PDF has to create the PDF file. Then for all other records in your loop, you can use the append option.

  • Newbies
Posted

Hi Bruce & thanks. It seems to work though - this new version of the 2nd Script Finds the Records that have a Start Week of 1, 2, 3, 4, etc and Prints them to a single PDF using Append.

 

The hard part for me is trying to figure out how to write into the Script for it also to Find records where [(Start Week + $$Week x Job Interval) /$$Week = 1].

Any help with getting that to work greatly appreciated.

 

 

rgds mcdirt

post-108074-0-69411200-1359190975_thumb.

  • Newbies
Posted

Talking to myself again - this seems to work ...

 

Add another field to the Table with Calculated Field - (Start Week = $$Week) or ( Mod ($$Week - Start Week; Job Interval ) = 0 ) - do not store calculations

This should be a 1 when the jobs are due, use Previous 2 Scripts, looking for a 1 in the Calculated Field - prints out 52 pages seem right.

 

Happy but if there is a better way of doing it, pls let me know.

 

rgds mcdirt

This topic is 4388 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.