Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2008
    Location
    Eastern US
    Posts
    5

    Unanswered: Printing TimeStamps 6 per page for Specific # of pages

    Howdy!
    I have a request for a Crystal Rpt with the following specs:

    6 timestamps on a page (Avery Labels) formatted as Barcodes. First page is current timestamp as when the page prints. Next page is the timestamp of when THAT page prints. This continues for as many pages as the user specifies via a parameter entry.

    So: I enter 4 for the number of pages I want to print. I should get 4 pages of barcodes - each with 6 timestamps, but the timestamp is different for each page.

    No database is available, this is supposed to be a "Crystal Only" report.

    This sounded plausible until I started it...

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Hmmm....

    Create a variable to hold the current timestamp, and a running sum across the report. Add the running sum and the timestamp together, and you should get some uniquified numberos.

    At least, in theory anyway
    George
    Home | Blog

  3. #3
    Join Date
    Dec 2008
    Location
    Eastern US
    Posts
    5
    Guess I should of cut it in 2 parts. This gets me #2 (THANKS!), #1 is getting the User input (# of pages) and get Crystal to print that #. That's the bigger hurdle.

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    The only way I can think of doing it at the moment is to create a report that has, say 10 pages and then you supress pages based on the user input. Without an external data source (be that a programming language, like C#, or a database) I can't think of a way to add new records to your report (but that's probably got a lot to do with the fact that I'm rubbish at CR )
    George
    Home | Blog

  5. #5
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I'm intrigued; how do you create a report without a datasource anyway? I can get my head round how you'd produce a single "record", but not more than one!

    If you know how then share, because that's the only bit of the puzzle missing in my mind at the moment.
    George
    Home | Blog

  6. #6
    Join Date
    Dec 2008
    Location
    Eastern US
    Posts
    5
    Inititially I created a formula field "@TimeStamp" and formatted it for the proper barcode font and such. Then I simply copied it 6 times in a HUGE details area. I am begining to think that my problem is that there is no datasource. I can create the "record" and play page formatting games to get it to print a fixed number of pages, but there's nothing behind the report that can be manipulated and whatnot. I'm entertaining thoughts of something besides Crystal, but I'm limited to what the client has: MS Office stuff (and Access is a no-no).

  7. #7
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I'm wondering if a batch file, or VBS file which created a CSV file as your data source may be appropriate?

    Alternatively Excel could be a good compromise too?
    George
    Home | Blog

  8. #8
    Join Date
    Dec 2008
    Location
    Eastern US
    Posts
    5
    I was thinking the same thing and attempted to create a table in the SQL database that the client is running, but then I was informed that this has to be a standalone solution using Crystal Reports...

    Man - the boss makes promises then we have to make the miracle happen.

    I figure that I'll give it a week of banging my head against the wall, then try Excel or something else that the client has on hand - like crayons or something

  9. #9
    Join Date
    Dec 2008
    Location
    Eastern US
    Posts
    5
    Ok - for the good of the body (because searching 100's of forums can kill a mind), here is the solution that I got from someplace across the Web. It works, just tweak it for your needs. Remember, each detail section will be a page so think of a top end number (I set mine up for 5 page limit):
    -------------
    Create a formula that will give you the "fudged" print time. It will formula will look something like this:

    CurrentDateTime + (0.000016 * (PageNumber - 1))

    "0.000016" comes from the way that date math works. The number 1 represents one day (24 hours). So, to get the value for 1 second, I divided 1 by 24 (hours) and the divided the result by 60 (minutes in an hour) and by 60 again and I rounded up the value. So, for each page, you're adding roughly 1 second to the time.

    For each page, you'll have to add a separate section to the report (I assume you're using a details section for this...). Place your barcodes using the formula from above. Then format the section and do the following:

    1. Turn on "New Page After".
    2. Click on the formula button to the right of "New Page After" and add something like the following:
    PageNumber >= {?Page Count Parameter}
    This will prevent a blank page from printing at the end of the report.
    3. Click on the formula to the right of "Suppress" and add something like the following:
    {?Page Count Parameter} < [whatever page this section will print]

    So, for page 2 it would be {?Page Count Parameter} < 2.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •