Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Report Names (2000)

    <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>
    I have six units that have the same reports generated for each but only containing their respective data.. There are 25 per unit reports. I use the "On Open" event to change the caption of the form to include a unit tag and a hyphen in the report caption. This works fine when I open the reports in preview, but when I go straight to print all reports have original caption (No unit tag). I'm printing to PDF files so I have to key the tag into each report. I have also tried this "On Activate".

    I'm using a macro to run the reports.


    Private Sub Report_Activate()
    Me.Caption = Forms!frmUnitDate!txtUnitCode & " - " & Me.Caption
    End Sub

    Private Sub Report_Open(Cancel As Integer)
    Me.Caption = Forms!frmUnitDate!txtUnitCode & " - " & Me.Caption
    End Sub

    <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Report Names (2000)

    The way we do it is to build the file name to use for PDF in the routine that launches the report and pass it in to the report in its OpenArgs string. The report parses out the file name and sets a public property (variable) of the report to that string. Then we can use the public property to retrieve the desired filename when it goes to the PDF printer.

    Oops! I didn't catch the 2000 in the subject. A2k reports didn't have an OpenArgs property, so you would have to set the public property directly from the code that calls the report. Then you could use it when the report gets printed.
    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report Names (2000)

    Thank you Charlotte. I was hoping there was a way to make the "On Open" event work.

    I see what my task will be this Friday.

    Have a nice day. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

Posting Permissions

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