Results 1 to 11 of 11
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    export to rtf (WIN 2000 Acc 97)

    I try my best to figure these things out before I come here, but this one must be
    right in front of me and I cannot see it.

    I have a report whose record source is a query. (I can post the sql if necessary)
    When the report HAS records, the report is fine. I export it as an .rtf file. I then can go
    to where the file is, open it, and it looks fine.
    When the report has NO records, it still "Looks" fine in Print Preview, it Prints fine.
    BUT..........
    When I save it as rtf, and go to look at it, the entire page Header is gone, as well as the Type footer info !!
    The only part that "Saved" was the report footer.

    I compacted the db, I created a new db and imported everything. Didn't help.

    I have attached a print screen of the form and the code behind the form and the controls on the form.

    Can someone please suggest to me what is happening?

    The report is fine with data.

    Thank you,
    Michael
    Attached Files Attached Files

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

    Re: export to rtf (WIN 2000 Acc 97)

    I'm sorry, but I don't understand how a report can "print fine" if there are no records. If there are no records, you can't expect to export group headers to rtf because there is nothing to generate the header. What causes those headers and footers to print when there are no records?
    Charlotte

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: export to rtf (WIN 2000 Acc 97)

    Thank you Charlotte for replying.

    I have attached the Report when run, in Print Preview. The Header is there in plain view !!

    You asked: "I'm sorry, but I don't understand how a report can "print fine" if there are no records"
    I was under the impression that this is what the following code did:

    Private Sub Report_NoData(Cancel As Integer)

    Me.txtTotalRecordCount.Visible = False
    Me.txtTotalRecordCount2.Visible = False

    Me.lblNoData.Visible = True

    End Sub

    The code works - The report shows the label NO DATA .

    I then "Export"/Save as xxxx.RTF

    The second print screen is the rtf file.

    Like I said, the same report with data, saves fine.

    The third print screen is the same report saved as an rtf file WITH data.

    Hopefully there is a logical (ha - with Access?) reason for this behavior.

    Thank you again for any direction !

    Michael
    Attached Files Attached Files

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

    Re: export to rtf (WIN 2000 Acc 97)

    Where does the ABC Group come from? RTF files are not exact duplicates of Access reports, they're a translation. In 97, a lot of things didn't translate well. Where is this header? Is it a report header, a group header or what?
    Charlotte

  5. #5
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: export to rtf (WIN 2000 Acc 97)

    I will try to attach the db tomorrow from work.

    There is a form.(frmEVTS)
    combobox for Client (cboIPA)
    combobox for Report Type
    textbox for Date (txtMonday)

    The Reort Page header has a:
    textbox txtHeader - Control Source is ="Non Verified Requests Open as of " & [Forms]![frmEVTS]![txtMonday]
    textbox txtHeader2 - Control Source is =[Forms]![frmevts]![cboIPA].[Column](1)

    This may not be enough detail, so I will try to attach the stripped down db in the morning.

    Thank you again for looking, and have a good night !

    Michael

  6. #6
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: export to rtf (WIN 2000 Acc 97)

    OK, so I am on the West Coast and it's too early to go to sleep.

    Here is the database.

    Go to the form.

    Select ABC
    Select OPEN Requests
    Put today's date
    Click Run Report

    Then change ABC to DEF.

    Save both to your drive as an rtf file.

    Let me know what you think !

    Michael
    Attached Files Attached Files

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: export to rtf (WIN 2000 Acc 97)

    Is it acceptable to put the text boxes in the report header section instead of the page header section?

  8. #8
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: export to rtf (WIN 2000 Acc 97)

    Not only is it acceptable, but issue RESOLVED !! <img src=/S/groovin.gif border=0 alt=groovin width=21 height=21>

    Hans - The best way for me to learn, is to ask why and not just fix it
    and move on. Could you tell me why this made the difference?

    Michael

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: export to rtf (WIN 2000 Acc 97)

    Hi Michael,

    Frankly, I don't know. I downloaded your database and saw that the page header didn't survive the conversion to .rtf, so on a hunch I moved the text boxes to the report header and it worked. Apparently, page headers and footers are omitted if there are no data in the report, but why? Search me...

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

    Re: export to rtf (WIN 2000 Acc 97)

    Report headers and footers, if they exist, print once when a report is printed, but page headers and footers depend on report settings and data. I always use the report header for stuff I *always* want to see. Page headers don't print on the first page if the report's Page Header property is set to Not With Rpt Hdr, which could cause them to disappear when a single page of report header is all there is to the report. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

  11. #11
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: export to rtf (WIN 2000 Acc 97)

    Thank you Charlotte.
    The report's Page Header property is set to All Pages.

    "I always use the report header for stuff I *always* want to see"
    Starting now, so will I !!
    I still think it is odd that it will print perfectly, but I cannot "Save what I see" .

    I second your <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15> and raise you a <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

    Thank you !!
    Michael

Posting Permissions

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