• ‘background color’ for sub report (Access 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » ‘background color’ for sub report (Access 2000)

    Author
    Topic
    #381929

    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

    Viewing 0 reply threads
    Author
    Replies
    • #645763

      Have you tried setting it to Transparent yet?

      HTH,
      Cecilia

      • #645767

        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

        • #645775

          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

          • #645783

            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

            • #645787

              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

            • #645805

              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.

            • #645817

              Why don’t you post your DB without any sensitive data and we’ll all have a go.
              Pat cheers

            • #645871

              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.

    Viewing 0 reply threads
    Reply To: ‘background color’ for sub report (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: