0

I'm creating a simple report in SSRS 2008. I started with copying an existing report definition and modified it to fit my needs. I'm working in Visual Studio Ultimate 2012, in C# on an ASP.NET MVC project.

I have two rectangles, Rectangle1 and Rectangle2. Rectangle1 is from the original report and displays just fine, I just rearranged the ReportItems inside it. Rectangle2, however, is not showing up on the generated report. I created it in the designer and cut/pasted existing images into it. In addition to external images, Rectangle2 contains a textbox with a static value.

Here's what I've tried:

  • verified my data is getting passed and is correct.
  • verified all relevant expressions.
  • verified that the images I'm requesting exist.
  • removed shrink/grow parameters.
  • verified no conditional display requirements are set.
  • created an entirely new rectangle with textboxes and images (doesn't display).
  • compared XML between Rectangle1 and Rectangle2.
  • compared parameter values (in designer) between Rectangle1 and Rectangle2 as well as all of their child elements.
  • adjusted Z-index parameters.

I have found nothing relevant on the web. Anywhere. Nada. Zip. I'm out of ideas.

Please point me in the right direction.


Here's some XML:

<Rectangle Name="Rectangle1">
    <ReportItems>
      <Image Name="GHS_1">
        <Source>External</Source>
        <Value>="file:///" + Parameters!AppPath.Value + Parameters!GHSPictograms.Value(0)</Value>
        <MIMEType>image/png</MIMEType>
        <Sizing>FitProportional</Sizing>
        <Top>0.45312in</Top>
        <Left>0.17958in</Left>
        <Height>1.56in</Height>
        <Width>1.56in</Width>
        <Visibility>
          <Hidden>=Parameters!GHSPictograms.Value(0) = ""</Hidden>
        </Visibility>
        <Style>
          <Border>
            <Style>None</Style>
          </Border>
        </Style>
      </Image>
      <Textbox Name="Textbox1">
        <CanGrow>true</CanGrow>
        <KeepTogether>true</KeepTogether>
        <Paragraphs>
          <Paragraph>
            <TextRuns>
              <TextRun>
                <Value xml:space="preserve"> </Value>
                <Style />
              </TextRun>
            </TextRuns>
            <Style />
          </Paragraph>
        </Paragraphs>
        <rd:DefaultName>Textbox1</rd:DefaultName>
        <Top>2.0521in</Top>
        <Left>3.91688in</Left>
        <Height>0.25in</Height>
        <Width>0.05208in</Width>
        <ZIndex>4</ZIndex>
        <Style>
          <Border>
            <Style>None</Style>
          </Border>
          <PaddingLeft>2pt</PaddingLeft>
          <PaddingRight>2pt</PaddingRight>
          <PaddingTop>2pt</PaddingTop>
          <PaddingBottom>2pt</PaddingBottom>
        </Style>
      </Textbox>
    </ReportItems>
    <KeepTogether>true</KeepTogether>
    <Top>0.84944in</Top>
    <Height>6.84897in</Height>
    <Width>3.96896in</Width>
    <ZIndex>2</ZIndex>
    <Style>
      <Border>
        <Style>None</Style>
      </Border>
    </Style>
  </Rectangle>

...

<Rectangle Name="Rectangle2">
    <ReportItems>
      <Image Name="PPE0">
        <Source>External</Source>
        <Value>="File:///" + Parameters!AppPath.Value + Parameters!PPEImages.Value(0)</Value>
        <MIMEType>image/png</MIMEType>
        <Sizing>FitProportional</Sizing>
        <Top>0.45312in</Top>
        <Height>1in</Height>
        <Width>1in</Width>
        <Visibility>
          <Hidden>=Parameters!PPEImages.Count &lt; 1</Hidden>
        </Visibility>
        <Style>
          <Border>
            <Style>None</Style>
          </Border>
        </Style>
      </Image>
      <Textbox Name="Textbox2">
        <KeepTogether>true</KeepTogether>
        <Paragraphs>
          <Paragraph>
            <TextRuns>
              <TextRun>
                <Value>PPE</Value>
                <Style>
                  <FontSize>12pt</FontSize>
                  <FontWeight>Bold</FontWeight>
                </Style>
              </TextRun>
            </TextRuns>
            <Style />
          </Paragraph>
        </Paragraphs>
        <rd:DefaultName>Textbox2</rd:DefaultName>
        <Height>0.33333in</Height>
        <Width>1in</Width>
        <ZIndex>5</ZIndex>
        <Style>
          <Border>
            <Style>None</Style>
          </Border>
          <PaddingLeft>2pt</PaddingLeft>
          <PaddingRight>2pt</PaddingRight>
          <PaddingTop>2pt</PaddingTop>
          <PaddingBottom>2pt</PaddingBottom>
        </Style>
      </Textbox>
    </ReportItems>
    <KeepTogether>true</KeepTogether>
    <Top>0.84944in</Top>
    <Left>4.0384in</Left>
    <Height>1.45312in</Height>
    <Width>5.60125in</Width>
    <ZIndex>5</ZIndex>
    <Style>
      <Border>
        <Style>None</Style>
      </Border>
    </Style>
  </Rectangle>

UPDATE: We managed to make Rectangle2 display at the expense of Rectangle1 toying around with Z-index. So this is an issue with multiple rectangles...

kozmi
  • 25
  • 2
  • 8
  • Note: I was able to bypass the problem by nesting everything in one large Rectangle. SSRS doesn't like multiple Rectangles as immediate ReportItems of Body. – kozmi Mar 07 '17 at 01:57

1 Answers1

0

Three things to think about:

  1. Do you have to use a rectangle if it is just a single textbox? You may just align that as it's own element

  2. Is the textbox overflowing or having a font that could overflow sizing? Rectangles number one issues are displaying values due to alignment, formatting, etc. If you are not sure put something very tiny in the box and then make the rectangle massive. For extra debugging do step 1 first and verify the box will exist without a rectangle

  3. How are you debugging the process? Is it in Business Intelligence Development Studio in the designer or in another place? I would test in the designer if you are not as another issue is display may vary on end product used if you are using something other than IE. Also if you are using a container element to display in code like a ReportViewer, Form or other front end equivalent it could be overriding some values.

Those are my ideas anyways as I have had images and text not appear in rectangles before as well.

djangojazz
  • 14,131
  • 10
  • 56
  • 94
  • Thanks for chiming in. 1. Textbox plus 5 images. The whole group will conditionally display - eventually. If need be I'll take the rectangles out but I'm stuck with a stubborn case of supposed-tos. 2. No overflowing. I delineated heights and widths and can tell clearly in the designer. 3. I'm hopping between designer and xml on the VS side and the rendered report is generated to pdf (download). Hmm... ReportViewer could be overriding values. I'll look into this - can you point me to some refs? Thanks again, greatly appreciated! – kozmi Aug 29 '13 at 19:58
  • It really depends on your issue. I would check in the Visual Studio Designer or if you don't have that get to the SSRS site and use the designer that is available in web mode. The examples would be for almost ALL front ends would point to a css file potentially overriding base characteristics of viewer. – djangojazz Aug 30 '13 at 13:52