Link to home
Start Free TrialLog in
Avatar of dday515
dday515

asked on

Reporting Services - Export to PDF Causes Error

I've got a report written in Visual Studio for Reporting Services 2008. (The rdl is attached below). Its a main report with a single subreport called multiple times.

Basically - this is a calendar style report for our employee's monthly schedule.

Report works exactly as I'd expect, until I try to render it in pdf.

If there is a page header included in the report (even without any controls - just the space being there is enough), I receive the following error:

"An error occurred during local report processing. Object reference not set to an instance of an object"

Ideas? Suggestions? I'm running SQL Server 2008 Standard - SP1.

<?xml version="1.0" encoding="utf-8"?>
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition">
  <DataSources>
    <DataSource Name="DataSource1">
      <DataSourceReference>HIASQL</DataSourceReference>
      <rd:DataSourceID>9dd55766-d5d7-4d6a-8427-7fba938f7cca</rd:DataSourceID>
    </DataSource>
  </DataSources>
  <DataSets>
    <DataSet Name="Schedule">
      <Fields>
        <Field Name="WeekOf">
          <DataField>WeekOf</DataField>
          <rd:TypeName>System.DateTime</rd:TypeName>
        </Field>
        <Field Name="consultant_number">
          <DataField>consultant number</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
        <Field Name="Consultant_Name">
          <DataField>Consultant Name</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
      </Fields>
      <Query>
        <DataSourceName>DataSource1</DataSourceName>
        <CommandType>StoredProcedure</CommandType>
        <CommandText>usp_Schedule_ConsCalendar</CommandText>
        <QueryParameters>
          <QueryParameter Name="@ConsNum">
            <Value>=Parameters!ConsNum.Value</Value>
          </QueryParameter>
          <QueryParameter Name="@StartDate">
            <Value>=Parameters!StartDate.Value</Value>
          </QueryParameter>
          <QueryParameter Name="@EndDate">
            <Value>=Parameters!EndDate.Value</Value>
          </QueryParameter>
        </QueryParameters>
        <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
      </Query>
    </DataSet>
  </DataSets>
  <Body>
    <ReportItems>
      <Tablix Name="Tablix1">
        <TablixBody>
          <TablixColumns>
            <TablixColumn>
              <Width>1.5in</Width>
            </TablixColumn>
            <TablixColumn>
              <Width>1.5in</Width>
            </TablixColumn>
            <TablixColumn>
              <Width>1.5in</Width>
            </TablixColumn>
            <TablixColumn>
              <Width>1.5in</Width>
            </TablixColumn>
            <TablixColumn>
              <Width>1.5in</Width>
            </TablixColumn>
            <TablixColumn>
              <Width>1.5in</Width>
            </TablixColumn>
            <TablixColumn>
              <Width>1.5in</Width>
            </TablixColumn>
          </TablixColumns>
          <TablixRows>
            <TablixRow>
              <Height>0.25in</Height>
              <TablixCells>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="WeekOf">
                      <CanGrow>true</CanGrow>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>=Fields!WeekOf.Value</Value>
                              <Style>
                                <Format>MM/dd</Format>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style>
                            <TextAlign>Right</TextAlign>
                          </Style>
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>WeekOf</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>CornflowerBlue</BackgroundColor>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="WeekOf1">
                      <CanGrow>true</CanGrow>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>=DateAdd("d",1,Fields!WeekOf.Value)</Value>
                              <Style>
                                <Format>MM/dd</Format>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style>
                            <TextAlign>Right</TextAlign>
                          </Style>
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>WeekOf1</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>CornflowerBlue</BackgroundColor>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="WeekOf2">
                      <CanGrow>true</CanGrow>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>=DateAdd("d",2,Fields!WeekOf.Value)</Value>
                              <Style>
                                <Format>MM/dd</Format>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style>
                            <TextAlign>Right</TextAlign>
                          </Style>
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>WeekOf1</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>CornflowerBlue</BackgroundColor>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="WeekOf3">
                      <CanGrow>true</CanGrow>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>=DateAdd("d",3,Fields!WeekOf.Value)</Value>
                              <Style>
                                <Format>MM/dd</Format>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style>
                            <TextAlign>Right</TextAlign>
                          </Style>
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>WeekOf1</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>CornflowerBlue</BackgroundColor>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="WeekOf4">
                      <CanGrow>true</CanGrow>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>=DateAdd("d",4,Fields!WeekOf.Value)</Value>
                              <Style>
                                <Format>MM/dd</Format>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style>
                            <TextAlign>Right</TextAlign>
                          </Style>
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>WeekOf1</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>CornflowerBlue</BackgroundColor>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="WeekOf5">
                      <CanGrow>true</CanGrow>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>=DateAdd("d",5,Fields!WeekOf.Value)</Value>
                              <Style>
                                <Format>MM/dd</Format>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style>
                            <TextAlign>Right</TextAlign>
                          </Style>
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>WeekOf1</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>CornflowerBlue</BackgroundColor>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="WeekOf6">
                      <CanGrow>true</CanGrow>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>=DateAdd("d",6,Fields!WeekOf.Value)</Value>
                              <Style>
                                <Format>MM/dd</Format>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style>
                            <TextAlign>Right</TextAlign>
                          </Style>
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>WeekOf1</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>CornflowerBlue</BackgroundColor>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                  </CellContents>
                </TablixCell>
              </TablixCells>
            </TablixRow>
            <TablixRow>
              <Height>1.21875in</Height>
              <TablixCells>
                <TablixCell>
                  <CellContents>
                    <Subreport Name="Subreport1">
                      <ReportName>Schedule_EmployeeCalendar_Sub</ReportName>
                      <Parameters>
                        <Parameter Name="Consnum">
                          <Value>=Fields!consultant_number.Value</Value>
                        </Parameter>
                        <Parameter Name="dteStartDate">
                          <Value>=Fields!WeekOf.Value</Value>
                        </Parameter>
                        <Parameter Name="dteEndDate">
                          <Value>=Fields!WeekOf.Value</Value>
                        </Parameter>
                      </Parameters>
                      <Style>
                        <Border>
                          <Style>Solid</Style>
                        </Border>
                      </Style>
                    </Subreport>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Subreport Name="Subreport2">
                      <ReportName>Schedule_EmployeeCalendar_Sub</ReportName>
                      <Parameters>
                        <Parameter Name="Consnum">
                          <Value>=Fields!consultant_number.Value</Value>
                        </Parameter>
                        <Parameter Name="dteStartDate">
                          <Value>=DateAdd("d",1,Fields!WeekOf.Value)</Value>
                        </Parameter>
                        <Parameter Name="dteEndDate">
                          <Value>=DateAdd("d",1,Fields!WeekOf.Value)</Value>
                        </Parameter>
                      </Parameters>
                      <Style>
                        <Border>
                          <Style>Solid</Style>
                        </Border>
                        <LeftBorder>
                          <Style>None</Style>
                        </LeftBorder>
                      </Style>
                    </Subreport>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Subreport Name="Subreport3">
                      <ReportName>Schedule_EmployeeCalendar_Sub</ReportName>
                      <Parameters>
                        <Parameter Name="Consnum">
                          <Value>=Fields!consultant_number.Value</Value>
                        </Parameter>
                        <Parameter Name="dteStartDate">
                          <Value>=DateAdd("d",2,Fields!WeekOf.Value)</Value>
                        </Parameter>
                        <Parameter Name="dteEndDate">
                          <Value>=DateAdd("d",2,Fields!WeekOf.Value)</Value>
                        </Parameter>
                      </Parameters>
                      <Style>
                        <Border>
                          <Style>Solid</Style>
                        </Border>
                        <LeftBorder>
                          <Style>None</Style>
                        </LeftBorder>
                      </Style>
                    </Subreport>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Subreport Name="Subreport4">
                      <ReportName>Schedule_EmployeeCalendar_Sub</ReportName>
                      <Parameters>
                        <Parameter Name="Consnum">
                          <Value>=Fields!consultant_number.Value</Value>
                        </Parameter>
                        <Parameter Name="dteStartDate">
                          <Value>=DateAdd("d",3,Fields!WeekOf.Value)</Value>
                        </Parameter>
                        <Parameter Name="dteEndDate">
                          <Value>=DateAdd("d",3,Fields!WeekOf.Value)</Value>
                        </Parameter>
                      </Parameters>
                      <Style>
                        <Border>
                          <Style>Solid</Style>
                        </Border>
                        <LeftBorder>
                          <Style>None</Style>
                        </LeftBorder>
                      </Style>
                    </Subreport>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Subreport Name="Subreport5">
                      <ReportName>Schedule_EmployeeCalendar_Sub</ReportName>
                      <Parameters>
                        <Parameter Name="Consnum">
                          <Value>=Fields!consultant_number.Value</Value>
                        </Parameter>
                        <Parameter Name="dteStartDate">
                          <Value>=DateAdd("d",4,Fields!WeekOf.Value)</Value>
                        </Parameter>
                        <Parameter Name="dteEndDate">
                          <Value>=DateAdd("d",4,Fields!WeekOf.Value)</Value>
                        </Parameter>
                      </Parameters>
                      <Style>
                        <Border>
                          <Style>Solid</Style>
                        </Border>
                        <LeftBorder>
                          <Style>None</Style>
                        </LeftBorder>
                      </Style>
                    </Subreport>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Subreport Name="Subreport6">
                      <ReportName>Schedule_EmployeeCalendar_Sub</ReportName>
                      <Parameters>
                        <Parameter Name="Consnum">
                          <Value>=Fields!consultant_number.Value</Value>
                        </Parameter>
                        <Parameter Name="dteStartDate">
                          <Value>=DateAdd("d",5,Fields!WeekOf.Value)</Value>
                        </Parameter>
                        <Parameter Name="dteEndDate">
                          <Value>=DateAdd("d",5,Fields!WeekOf.Value)</Value>
                        </Parameter>
                      </Parameters>
                      <Style>
                        <Border>
                          <Style>Solid</Style>
                        </Border>
                        <LeftBorder>
                          <Style>None</Style>
                        </LeftBorder>
                      </Style>
                    </Subreport>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Subreport Name="Subreport7">
                      <ReportName>Schedule_EmployeeCalendar_Sub</ReportName>
                      <Parameters>
                        <Parameter Name="Consnum">
                          <Value>=Fields!consultant_number.Value</Value>
                        </Parameter>
                        <Parameter Name="dteStartDate">
                          <Value>=DateAdd("d",6,Fields!WeekOf.Value)</Value>
                        </Parameter>
                        <Parameter Name="dteEndDate">
                          <Value>=DateAdd("d",6,Fields!WeekOf.Value)</Value>
                        </Parameter>
                      </Parameters>
                      <Style>
                        <Border>
                          <Style>Solid</Style>
                        </Border>
                        <LeftBorder>
                          <Style>None</Style>
                        </LeftBorder>
                      </Style>
                    </Subreport>
                  </CellContents>
                </TablixCell>
              </TablixCells>
            </TablixRow>
          </TablixRows>
        </TablixBody>
        <TablixColumnHierarchy>
          <TablixMembers>
            <TablixMember />
            <TablixMember />
            <TablixMember />
            <TablixMember />
            <TablixMember />
            <TablixMember />
            <TablixMember />
          </TablixMembers>
        </TablixColumnHierarchy>
        <TablixRowHierarchy>
          <TablixMembers>
            <TablixMember>
              <Group Name="Details" />
              <TablixMembers>
                <TablixMember />
                <TablixMember />
              </TablixMembers>
            </TablixMember>
          </TablixMembers>
        </TablixRowHierarchy>
        <RepeatColumnHeaders>true</RepeatColumnHeaders>
        <RepeatRowHeaders>true</RepeatRowHeaders>
        <KeepTogether>true</KeepTogether>
        <DataSetName>Schedule</DataSetName>
        <Top>0.125in</Top>
        <Height>1.46875in</Height>
        <Width>10.5in</Width>
        <Style>
          <Border>
            <Style>None</Style>
          </Border>
        </Style>
      </Tablix>
    </ReportItems>
    <Height>1.59375in</Height>
    <Style>
      <Border>
        <Style>Solid</Style>
      </Border>
    </Style>
  </Body>
  <ReportParameters>
    <ReportParameter Name="ConsNum">
      <DataType>String</DataType>
      <DefaultValue>
        <Values>
          <Value>ag</Value>
        </Values>
      </DefaultValue>
      <Prompt>Cons Num</Prompt>
    </ReportParameter>
    <ReportParameter Name="StartDate">
      <DataType>DateTime</DataType>
      <DefaultValue>
        <Values>
          <Value>03/01/2009 00:00:00</Value>
        </Values>
      </DefaultValue>
      <Prompt>Start Date</Prompt>
    </ReportParameter>
    <ReportParameter Name="EndDate">
      <DataType>DateTime</DataType>
      <DefaultValue>
        <Values>
          <Value>05/02/2009 00:00:00</Value>
        </Values>
      </DefaultValue>
      <Prompt>End Date</Prompt>
    </ReportParameter>
  </ReportParameters>
  <Width>10.5in</Width>
  <Page>
    <PageHeader>
      <Height>0.01042in</Height>
      <PrintOnFirstPage>true</PrintOnFirstPage>
      <PrintOnLastPage>true</PrintOnLastPage>
      <Style>
        <Border>
          <Style>None</Style>
        </Border>
      </Style>
    </PageHeader>
    <PageHeight>8.5in</PageHeight>
    <PageWidth>11in</PageWidth>
    <LeftMargin>0.25in</LeftMargin>
    <RightMargin>0.25in</RightMargin>
    <TopMargin>0.5in</TopMargin>
    <BottomMargin>0.5in</BottomMargin>
    <Style />
  </Page>
  <rd:ReportID>8c240a5f-911c-4790-b397-1b69eb87aec3</rd:ReportID>
  <rd:ReportUnitType>Inch</rd:ReportUnitType>
</Report>
 
 
 
Subreport:
 
 
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition">
  <DataSources>
    <DataSource Name="DataSource1">
      <DataSourceReference>HIASQL</DataSourceReference>
      <rd:DataSourceID>a2fb6d80-0455-4bd6-8516-e6dd5e6f3dfa</rd:DataSourceID>
    </DataSource>
  </DataSources>
  <DataSets>
    <DataSet Name="DataSet1">
      <Fields>
        <Field Name="consultant_number">
          <DataField>consultant number</DataField>
        </Field>
        <Field Name="date_of_service">
          <DataField>date of service</DataField>
        </Field>
        <Field Name="client_number">
          <DataField>client number</DataField>
        </Field>
        <Field Name="Services_Provided">
          <DataField>Services Provided</DataField>
        </Field>
        <Field Name="Consultant_Name">
          <DataField>Consultant Name</DataField>
        </Field>
        <Field Name="Client_Name">
          <DataField>Client Name</DataField>
        </Field>
        <Field Name="notes">
          <DataField>notes</DataField>
        </Field>
        <Field Name="staff_member">
          <DataField>staff member</DataField>
        </Field>
        <Field Name="OtherOnSite">
          <DataField>OtherOnSite</DataField>
        </Field>
      </Fields>
      <Query>
        <DataSourceName>DataSource1</DataSourceName>
        <CommandType>StoredProcedure</CommandType>
        <CommandText>usp_Schedule_ConsScheduleForDateRange</CommandText>
        <QueryParameters>
          <QueryParameter Name="@Consnum">
            <Value>=Parameters!Consnum.Value</Value>
          </QueryParameter>
          <QueryParameter Name="@dteStartDate">
            <Value>=Parameters!dteStartDate.Value</Value>
          </QueryParameter>
          <QueryParameter Name="@dteEndDate">
            <Value>=Parameters!dteEndDate.Value</Value>
          </QueryParameter>
        </QueryParameters>
      </Query>
    </DataSet>
  </DataSets>
  <Body>
    <ReportItems>
      <Tablix Name="Detail">
        <TablixBody>
          <TablixColumns>
            <TablixColumn>
              <Width>1.4in</Width>
            </TablixColumn>
          </TablixColumns>
          <TablixRows>
            <TablixRow>
              <Height>0.89583in</Height>
              <TablixCells>
                <TablixCell>
                  <CellContents>
                    <Rectangle Name="Detail_Contents">
                      <ReportItems>
                        <Textbox Name="client_number">
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Fields!client_number.Value</Value>
                                  <Style>
                                    <FontStyle>Normal</FontStyle>
                                    <FontSize>8pt</FontSize>
                                    <FontWeight>Normal</FontWeight>
                                    <TextDecoration>None</TextDecoration>
                                    <Color>#000000</Color>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>General</TextAlign>
                                <LineHeight>13pt</LineHeight>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <Left>0.5416in</Left>
                          <Height>0.1562in</Height>
                          <Width>0.8584in</Width>
                          <Style>
                            <Border>
                              <Color>#000000</Color>
                            </Border>
                            <BackgroundColor>#ffffff</BackgroundColor>
                            <Direction>LTR</Direction>
                          </Style>
                        </Textbox>
                        <Textbox Name="Services_Provided">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Fields!Services_Provided.Value</Value>
                                  <Style>
                                    <FontStyle>Normal</FontStyle>
                                    <FontSize>8pt</FontSize>
                                    <FontWeight>Normal</FontWeight>
                                    <TextDecoration>None</TextDecoration>
                                    <Color>#000000</Color>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>General</TextAlign>
                                <LineHeight>13pt</LineHeight>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <Top>0.22216in</Top>
                          <Left>0.5416in</Left>
                          <Height>0.1666in</Height>
                          <Width>0.8584in</Width>
                          <ZIndex>1</ZIndex>
                          <Style>
                            <Border>
                              <Color>#000000</Color>
                            </Border>
                            <BackgroundColor>#ffffff</BackgroundColor>
                            <Direction>LTR</Direction>
                          </Style>
                        </Textbox>
                        <Textbox Name="notes">
                          <CanGrow>true</CanGrow>
                          <CanShrink>true</CanShrink>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Fields!notes.Value</Value>
                                  <Style>
                                    <FontStyle>Italic</FontStyle>
                                    <FontSize>8pt</FontSize>
                                    <FontWeight>Normal</FontWeight>
                                    <TextDecoration>None</TextDecoration>
                                    <Color>#000000</Color>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>General</TextAlign>
                                <LineHeight>13pt</LineHeight>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <Top>0.64583in</Top>
                          <Left>0.0416in</Left>
                          <Height>0.25in</Height>
                          <Width>1.3584in</Width>
                          <ZIndex>2</ZIndex>
                          <Style>
                            <Border>
                              <Color>#000000</Color>
                            </Border>
                            <BackgroundColor>#ffffff</BackgroundColor>
                            <Direction>LTR</Direction>
                          </Style>
                        </Textbox>
                        <Textbox Name="Label8">
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>Client:</Value>
                                  <Style>
                                    <FontStyle>Normal</FontStyle>
                                    <FontSize>8pt</FontSize>
                                    <FontWeight>Bold</FontWeight>
                                    <TextDecoration>None</TextDecoration>
                                    <Color>#000000</Color>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>General</TextAlign>
                                <LineHeight>13pt</LineHeight>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <Left>0.0416in</Left>
                          <Height>0.1666in</Height>
                          <Width>0.4583in</Width>
                          <ZIndex>3</ZIndex>
                          <Style>
                            <Border>
                              <Color>#000000</Color>
                            </Border>
                            <Direction>LTR</Direction>
                          </Style>
                        </Textbox>
                        <Textbox Name="Label9">
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>Service:</Value>
                                  <Style>
                                    <FontStyle>Normal</FontStyle>
                                    <FontSize>8pt</FontSize>
                                    <FontWeight>Bold</FontWeight>
                                    <TextDecoration>None</TextDecoration>
                                    <Color>#000000</Color>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>General</TextAlign>
                                <LineHeight>13pt</LineHeight>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <Top>0.22216in</Top>
                          <Left>0.0416in</Left>
                          <Height>0.1666in</Height>
                          <Width>0.5104in</Width>
                          <ZIndex>4</ZIndex>
                          <Style>
                            <Border>
                              <Color>#000000</Color>
                            </Border>
                            <Direction>LTR</Direction>
                          </Style>
                        </Textbox>
                        <Textbox Name="Label10">
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>Staff:</Value>
                                  <Style>
                                    <FontStyle>Normal</FontStyle>
                                    <FontSize>8pt</FontSize>
                                    <FontWeight>Bold</FontWeight>
                                    <TextDecoration>None</TextDecoration>
                                    <Color>#000000</Color>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>General</TextAlign>
                                <LineHeight>13pt</LineHeight>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <Top>0.44797in</Top>
                          <Left>0.0416in</Left>
                          <Height>0.1562in</Height>
                          <Width>0.375in</Width>
                          <ZIndex>5</ZIndex>
                          <Style>
                            <Border>
                              <Color>#000000</Color>
                            </Border>
                            <Direction>LTR</Direction>
                          </Style>
                        </Textbox>
                        <Textbox Name="staff_member">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Fields!OtherOnSite.Value</Value>
                                  <Style>
                                    <FontStyle>Normal</FontStyle>
                                    <FontSize>8pt</FontSize>
                                    <FontWeight>Normal</FontWeight>
                                    <TextDecoration>None</TextDecoration>
                                    <Color>#000000</Color>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>General</TextAlign>
                                <LineHeight>13pt</LineHeight>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <Top>0.44797in</Top>
                          <Left>0.5416in</Left>
                          <Height>0.1666in</Height>
                          <Width>0.8584in</Width>
                          <ZIndex>6</ZIndex>
                          <Style>
                            <Border>
                              <Color>#000000</Color>
                            </Border>
                            <BackgroundColor>#ffffff</BackgroundColor>
                            <Direction>LTR</Direction>
                          </Style>
                        </Textbox>
                      </ReportItems>
                      <KeepTogether>true</KeepTogether>
                      <Style />
                    </Rectangle>
                  </CellContents>
                </TablixCell>
              </TablixCells>
            </TablixRow>
          </TablixRows>
        </TablixBody>
        <TablixColumnHierarchy>
          <TablixMembers>
            <TablixMember />
          </TablixMembers>
        </TablixColumnHierarchy>
        <TablixRowHierarchy>
          <TablixMembers>
            <TablixMember>
              <Group Name="Detail_Details_Group">
                <DataElementName>Item</DataElementName>
              </Group>
              <DataElementName>Item_Collection</DataElementName>
              <DataElementOutput>Output</DataElementOutput>
              <KeepTogether>true</KeepTogether>
            </TablixMember>
          </TablixMembers>
        </TablixRowHierarchy>
        <DataSetName>DataSet1</DataSetName>
        <Height>0.89583in</Height>
        <Width>1.4in</Width>
        <Style>
          <BackgroundColor>#ffffff</BackgroundColor>
        </Style>
      </Tablix>
    </ReportItems>
    <Height>0.89583in</Height>
    <Style />
  </Body>
  <ReportParameters>
    <ReportParameter Name="Consnum">
      <DataType>String</DataType>
      <Prompt>Consnum</Prompt>
    </ReportParameter>
    <ReportParameter Name="dteStartDate">
      <DataType>DateTime</DataType>
      <Prompt>dteStartDate</Prompt>
    </ReportParameter>
    <ReportParameter Name="dteEndDate">
      <DataType>DateTime</DataType>
      <Prompt>dteEndDate</Prompt>
    </ReportParameter>
  </ReportParameters>
  <Width>1.4in</Width>
  <Page>
    <Style />
  </Page>
  <ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
  <rd:ReportID>be78b726-d4de-4817-9f45-c7e8b8bfbd81</rd:ReportID>
  <rd:ReportUnitType>Inch</rd:ReportUnitType>
</Report>

Open in new window

Avatar of newbieal
newbieal
Flag of United States of America image

Could you provide specifics from the report server log file?

http://msdn.microsoft.com/en-us/library/ms156500.aspx
Avatar of dday515
dday515

ASKER

Sure: here they are:

library!ReportServer_0-2!106c!04/21/2009-20:22:31:: i INFO: RenderForNewSession('/Schedule_EmployeeCalendar')
library!ReportServer_0-2!106c!04/21/2009-20:22:50:: Call to GetItemTypeAction(/Data Sources).
library!ReportServer_0-2!98c!04/21/2009-20:22:51:: Call to GetItemTypeAction(/Data Sources/HIASQL).
library!ReportServer_0-2!1690!04/21/2009-20:22:51:: Call to CreateDataSourceAction(HIASQL, /Data Sources, True).
library!ReportServer_0-2!e60!04/21/2009-20:22:51:: Call to GetItemTypeAction(/Schedule_EmployeeCalendar).
library!ReportServer_0-2!106c!04/21/2009-20:22:51:: Call to GetItemDataSourcesAction(/Schedule_EmployeeCalendar).
library!ReportServer_0-2!98c!04/21/2009-20:22:52:: Call to CreateReportAction(Schedule_EmployeeCalendar, /, True).
library!ReportServer_0-2!1690!04/21/2009-20:22:53:: Call to SetItemDataSourcesAction(/Schedule_EmployeeCalendar).
library!ReportServer_0-2!1690!04/21/2009-20:23:14:: i INFO: RenderForNewSession('/Schedule_EmployeeCalendar')
reportrendering!ReportServer_0-2!1690!04/21/2009-20:23:14:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: An error occurred during rendering of the report., ;
 Info: Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.OnDemandReportRendering.ReportRenderingException: An error occurred during rendering of the report. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.ReportingServices.Rendering.HPBProcessing.Paragraph.GetRichTextParagraph()
   at Microsoft.ReportingServices.Rendering.HPBProcessing.TextBox.GetRichTextBox()
   at Microsoft.ReportingServices.Rendering.HPBProcessing.TextBox.AddToPage(RPLWriter rplWriter, PageContext pageContext, Double pageLeft, Double pageTop, Double pageRight, Double pageBottom, RepeatState repeatState)
   at Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.RowInfo.AddToPageContent(ScalableList`1 columnInfo, Int32& colsOnPage, Boolean isLTR, Boolean pinnedToParentCell, RPLWriter rplWriter, PageContext pageContext, Double pageLeft, Double pageTop, Double pageRight, Double pageBottom, RepeatState repeatState)
   at Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.AddToPage(RPLWriter rplWriter, PageContext pageContext, Double pageLeft, Double pageTop, Double pageRight, Double pageBottom, RepeatState repeatState)
   at Microsoft.ReportingServices.Rendering.HPBProcessing.PageItemContainer.AddToPage(RPLWriter rplWriter, PageContext pageContext, Double pageLeft, Double pageTop, Double pageRight, Double pageBottom, RepeatState repeatState)
   at Microsoft.ReportingServices.Rendering.HPBProcessing.Report.NextPage(RPLWriter rplWriter, Int32 page, Int32 totalPages)
   at Microsoft.ReportingServices.Rendering.HPBProcessing.HPBProcessing.GetNextPage(RPLReport& rplReport)
   at Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer.Render(Report report, NameValueCollection deviceInfo, Hashtable renderProperties, CreateAndRegisterStream createAndRegisterStream)
   at Microsoft.ReportingServices.Rendering.ImageRenderer.RendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, Hashtable& renderProperties, CreateAndRegisterStream createAndRegisterStream)
   --- End of inner exception stack trace ---
   at Microsoft.ReportingServices.Rendering.ImageRenderer.RendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, Hashtable& renderProperties, CreateAndRegisterStream createAndRegisterStream)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension newRenderer, DateTime executionTimeStamp, ProcessingContext pc, RenderingContext rc, IChunkFactory cacheDataChunkFactory, IChunkFactory yukonCompiledDefinition, Boolean& dataCached)
   --- End of inner exception stack trace ---
library!ReportServer_0-2!1690!04/21/2009-20:23:17:: i INFO: Exception UnhandledReportRenderingException dumped to: C:\Program Files\Microsoft SQL Server\MSRS10.HIASQL\Reporting Services\Logfiles flags= ReferencedMemory, AllThreads, SendToWatson
chunks!ReportServer_0-2!1690!04/21/2009-20:23:17:: w WARN: Rolling back shared chunk transaction for snapshot 'ed918142-c211-4afd-9986-7f23074da4a9', Permanent=False.
library!ReportServer_0-2!1690!04/21/2009-20:23:17:: w WARN: Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.OnDemandReportRendering.ReportRenderingException: An error occurred during rendering of the report. ---> System.NullReferenceException: Object reference not set to an instance of an object.
I see this in your log file:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.ReportingServices.Rendering.HPBProcessing.Paragraph.GetRichTextParagraph()

That seems to be the hang-up.  I researched the HPBProessing function and came across this info:
http://support.microsoft.com/kb/957107

Do you think this is applicable to you?  Have you downloaded the latest updates for SQL Server 2008?
Avatar of dday515

ASKER

Yes, I installed Service Pack 1, which included the information in your link.
For handling subreports , there is an event
protected void LocalReport_SubreportProcessing (object sender, SubreportProcessingEventArgs e)
      {
            try
            {
                  if (lrdsSubReport != null && lrdsSubReport.Count > 0)
                  {
                        e.DataSources.Add (lrdsSubReport[1]);
                  }
            }
            catch (Exception ex)
      }

check whether error is releted to this part
ASKER CERTIFIED SOLUTION
Avatar of dday515
dday515

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm glad it was a 'simple' solution.  I had read that some folks resolved this with drastic measures, such as reinstalling SQL Server instances. :-)
I had the same problem. Had 2 subreports. This solution (set keep together to true) worked for me perfectly!!! Thanks dday515!
Wow.  I have been searching for 3 hours for the solution.  This was it.  Amazing.  Thanks so much!!!