Results 1 to 9 of 9
  1. #1
    Lounger
    Join Date
    Apr 2002
    Location
    St. Paul, Minnesota, USA
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    'background color' for sub report (Access 2000)

    Hello all!

    I am working on a large report, with several subreports on it. There are some situations were a subreport may be blank and it is just showing a gray-ish box (where the subreport would normally be). I want the space to remain empty, but I want it to blend with the background color of the report (which is white) rather than just be a gray-ish box. Basically, users are calling me asking me why they are getting a gray box rather than data and I have to tell them about the subreport and there is not data for the particular record you are looking at so the subreport just shows as a gray box, etc. Anyway, is there anyway to do this? I've set the background color of the actual subreport to white, and when the subreport returns data it shows with a white background (you can't even tell it is a subreport cause it looks like part of the main report) but when no data is in the subreport I get the gray-ish box. Any ideas?

    Thanks in advance,

    Amanda

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    San Francisco, California, USA
    Posts
    358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'background color' for sub report (Access 2000)

    Have you tried setting it to Transparent yet?

    HTH,
    Cecilia

  3. #3
    Lounger
    Join Date
    Apr 2002
    Location
    St. Paul, Minnesota, USA
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'background color' for sub report (Access 2000)

    Cecilia,

    Set what to transparent? The background on the sub report? Or the element on the main report that brings links to the sub report (if you can even do that...?)

    I'm so dumb when it comes to Access...

    Thanks,

    Amanda

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    San Francisco, California, USA
    Posts
    358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'background color' for sub report (Access 2000)

    Go into the design view of the report. Right click on the Detail section bar. Move to Fill/Color and a color chart will open....At the top of that chart will be the word Transparent.

    I'm not 100% sure that this is the solution to your problem, but it's something to try.

    BTW, is this something that you imported/converted from another db?

    Cecilia

  5. #5
    Lounger
    Join Date
    Apr 2002
    Location
    St. Paul, Minnesota, USA
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'background color' for sub report (Access 2000)

    Hummm...ok, I see where you are talking about the Transparent, but it is "grayed out" and I can't select it. I can only select a color...I selected white, but it was what was already selected so it didn't make a difference.

    Any more ideas?

    Amanda

  6. #6
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    San Francisco, California, USA
    Posts
    358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'background color' for sub report (Access 2000)

    Set the subreport's properties (and the section where the subreport appears in the main report) to CanGrow=True and CanShrink=True?

    Then if there is no data, the whole section should just shrink itsself away....

    HTH,

    Cecilia

  7. #7
    Lounger
    Join Date
    Apr 2002
    Location
    St. Paul, Minnesota, USA
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'background color' for sub report (Access 2000)

    Nope. Still shows up, grayed out. Strange huh? I did the CanGrow=True and CanShrink=True to the subform properties and where the sub report appears in the main report. Bummer.

  8. #8
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: 'background color' for sub report (Access 2000)

    Why don't you post your DB without any sensitive data and we'll all have a go.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

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

    Re: 'background color' for sub report (Access 2000)

    Sorry, but I don't understand why your subreports would show up as gray boxes in the first place. If there is no data in a subreport, it normally shows absolutely nothing. You might have a border showing if you don't have the border of the subreport control set to transparent, but that's all you should see. You can always test the subreport to see if it has data and set the subreport control's visible property to false in the format event of the section if you can't find another way to hide it. Just make sure you always test it and set the visible property based on the results of the test, so it will show up when you do have records.

    As for CanGrow and CanShrink, you can set them on the subreport control, but make sure you also set them on the section that contains the subreport if you don't want just empty space there when the subreport isn't visible. I noticed, however, that you said "subform" several times in this thread. Are you trying to use a subform as a subreport? That certainly might cause the gray background, which is the normal condition when a subform is empty.
    Charlotte

Posting Permissions

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