Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 734
  • Last Modified:

Report Server 2005 rdl file explanation

Hi
Im new to reporting server - and such have picked up legacy reports where i have started working at..

I am interested in this report - code attached.

What Im trying to do is execute the sql behind the report for testing of performance.
So I need to be able to produce an output like the user sees when they run the report but through sql server .
When I read the xml im not clear about what happens.

I have tracked down that the main stored procedure that is 'xPLT_WTAAbsenceSpanNPD' is called - it take parameter for begin and end date.
So when I call it I get some results back.
File attached.

But then there is another stored procedure called 'xPLT_RepDefaultDates' that is called.
if i call xPLT_RepDefaultDates it doesnt take any parameters - resutls attached.

can some explain in easy terms what the xml is doing and how its interacting
i think its building a view to the user that takes the main stored procedure and processes it through the 2nd one and populates the screen with an mix of both ??

but not sure how to do this in sql code at the backend .. ??

thanks

Mo
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
  <DataSources>
    <DataSource Name="OODB">
      <rd:DataSourceID>3c8a3922-c0e2-47b0-a281-68aa8c865b70</rd:DataSourceID>
      <DataSourceReference>OODB</DataSourceReference>
    </DataSource>
  </DataSources>
  <InteractiveHeight>21cm</InteractiveHeight>
  <ReportParameters>
    <ReportParameter Name="FromDate">
      <DataType>DateTime</DataType>
      <Prompt>From Date:</Prompt>
    </ReportParameter>
    <ReportParameter Name="ToDate">
      <DataType>DateTime</DataType>
      <Prompt>To Date:</Prompt>
    </ReportParameter>
  </ReportParameters>
  <rd:DrawGrid>true</rd:DrawGrid>
  <InteractiveWidth>29.7cm</InteractiveWidth>
  <rd:GridSpacing>0.25cm</rd:GridSpacing>
  <rd:SnapToGrid>true</rd:SnapToGrid>
  <RightMargin>0.5cm</RightMargin>
  <LeftMargin>0.5cm</LeftMargin>
  <BottomMargin>0.5cm</BottomMargin>
  <rd:ReportID>11acbfee-e564-43ac-b3ad-7278fa6c0825</rd:ReportID>
  <PageWidth>29.7cm</PageWidth>
  <DataSets>
    <DataSet Name="MainData">
      <Fields>
        <Field Name="EmployeeID">
          <DataField>EmployeeID</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
        <Field Name="NPDDay">
          <DataField>NPDDay</DataField>
          <rd:TypeName>System.DateTime</rd:TypeName>
        </Field>
        <Field Name="PrevWorkDayAbs">
          <DataField>PrevWorkDayAbs</DataField>
          <rd:TypeName>System.DateTime</rd:TypeName>
        </Field>
        <Field Name="NextWorkDayAbs">
          <DataField>NextWorkDayAbs</DataField>
          <rd:TypeName>System.DateTime</rd:TypeName>
        </Field>
        <Field Name="Surname">
          <DataField>Surname</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
        <Field Name="Forenames">
          <DataField>Forenames</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
        <Field Name="Centre">
          <DataField>Centre</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
        <Field Name="Team">
          <DataField>Team</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
      </Fields>
      <Query>
        <DataSourceName>OODB</DataSourceName>
        <CommandType>StoredProcedure</CommandType>
        <CommandText>xPLT_WTAAbsenceSpanNPD</CommandText>
        <QueryParameters>
          <QueryParameter Name="@p_BeginDate">
            <Value>=Parameters!FromDate.Value</Value>
          </QueryParameter>
          <QueryParameter Name="@p_EndDate">
            <Value>=Parameters!ToDate.Value</Value>
          </QueryParameter>
        </QueryParameters>
      </Query>
    </DataSet>
    <DataSet Name="DefaultDates">
      <Fields>
        <Field Name="DefaultFromDate">
          <DataField>DefaultFromDate</DataField>
          <rd:TypeName>System.DateTime</rd:TypeName>
        </Field>
        <Field Name="DefaultToDate">
          <DataField>DefaultToDate</DataField>
          <rd:TypeName>System.DateTime</rd:TypeName>
        </Field>
        <Field Name="HolYear">
          <DataField>HolYear</DataField>
          <rd:TypeName>System.Int32</rd:TypeName>
        </Field>
      </Fields>
      <Query>
        <DataSourceName>OODB</DataSourceName>
        <CommandType>StoredProcedure</CommandType>
        <CommandText>xPLT_RepDefaultDates</CommandText>
      </Query>
    </DataSet>
  </DataSets>
  <Code />
  <Width>21cm</Width>
  <Body>
    <ColumnSpacing>1cm</ColumnSpacing>
    <ReportItems>
      <Table Name="table1">
        <ZIndex>1</ZIndex>
        <DataSetName>MainData</DataSetName>
        <Top>1.75cm</Top>
        <Width>20cm</Width>
        <Details>
          <TableRows>
            <TableRow>
              <TableCells>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="EmployeeID_1">
                      <rd:DefaultName>EmployeeID_1</rd:DefaultName>
                      <Style>
                        <BorderStyle>
                          <Default>Solid</Default>
                        </BorderStyle>
                        <FontSize>9pt</FontSize>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>6</ZIndex>
                      <Value>=Fields!EmployeeID.Value</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="textbox7">
                      <rd:DefaultName>textbox7</rd:DefaultName>
                      <Style>
                        <BorderStyle>
                          <Default>Solid</Default>
                        </BorderStyle>
                        <FontSize>9pt</FontSize>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>5</ZIndex>
                      <Value>=Trim(Fields!Surname.Value) &amp; ", " &amp; Trim(Fields!Forenames.Value)</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="Centre">
                      <rd:DefaultName>Centre</rd:DefaultName>
                      <Style>
                        <BorderStyle>
                          <Default>Solid</Default>
                        </BorderStyle>
                        <FontSize>9pt</FontSize>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>4</ZIndex>
                      <Value>=Fields!Centre.Value</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="Team">
                      <rd:DefaultName>Team</rd:DefaultName>
                      <Style>
                        <BorderStyle>
                          <Default>Solid</Default>
                        </BorderStyle>
                        <FontSize>9pt</FontSize>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>3</ZIndex>
                      <Value>=Fields!Team.Value</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="NPDDay">
                      <rd:DefaultName>NPDDay</rd:DefaultName>
                      <Style>
                        <BorderStyle>
                          <Default>Solid</Default>
                        </BorderStyle>
                        <FontSize>9pt</FontSize>
                        <Format>d</Format>
                        <TextAlign>Center</TextAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>2</ZIndex>
                      <Value>=Fields!NPDDay.Value</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="PrevWorkDayAbs">
                      <rd:DefaultName>PrevWorkDayAbs</rd:DefaultName>
                      <Style>
                        <BorderStyle>
                          <Default>Solid</Default>
                        </BorderStyle>
                        <FontSize>9pt</FontSize>
                        <Format>d</Format>
                        <TextAlign>Center</TextAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>1</ZIndex>
                      <Value>=Fields!PrevWorkDayAbs.Value</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="NextWorkDayAbs">
                      <rd:DefaultName>NextWorkDayAbs</rd:DefaultName>
                      <Style>
                        <BorderStyle>
                          <Default>Solid</Default>
                        </BorderStyle>
                        <FontSize>9pt</FontSize>
                        <Format>d</Format>
                        <TextAlign>Center</TextAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <Value>=Fields!NextWorkDayAbs.Value</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
              </TableCells>
              <Height>0.5cm</Height>
            </TableRow>
          </TableRows>
        </Details>
        <Style>
          <FontSize>9pt</FontSize>
        </Style>
        <Header>
          <TableRows>
            <TableRow>
              <TableCells>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="EmployeeID">
                      <rd:DefaultName>EmployeeID</rd:DefaultName>
                      <Style>
                        <BackgroundColor>Gainsboro</BackgroundColor>
                        <BorderStyle>
                          <Default>Solid</Default>
                        </BorderStyle>
                        <FontSize>9pt</FontSize>
                        <FontWeight>700</FontWeight>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>13</ZIndex>
                      <CanGrow>true</CanGrow>
                      <Value>Associate</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="textbox4">
                      <rd:DefaultName>textbox4</rd:DefaultName>
                      <Style>
                        <BackgroundColor>Gainsboro</BackgroundColor>
                        <BorderStyle>
                          <Default>Solid</Default>
                        </BorderStyle>
                        <FontSize>9pt</FontSize>
                        <FontWeight>700</FontWeight>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>12</ZIndex>
                      <CanGrow>true</CanGrow>
                      <Value>Name</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="textbox1">
                      <rd:DefaultName>textbox1</rd:DefaultName>
                      <Style>
                        <BackgroundColor>Gainsboro</BackgroundColor>
                        <BorderStyle>
                          <Default>Solid</Default>
                        </BorderStyle>
                        <FontSize>9pt</FontSize>
                        <FontWeight>700</FontWeight>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>11</ZIndex>
                      <CanGrow>true</CanGrow>
                      <Value>Centre</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="textbox6">
                      <rd:DefaultName>textbox6</rd:DefaultName>
                      <Style>
                        <BackgroundColor>Gainsboro</BackgroundColor>
                        <BorderStyle>
                          <Default>Solid</Default>
                        </BorderStyle>
                        <FontSize>9pt</FontSize>
                        <FontWeight>700</FontWeight>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>10</ZIndex>
                      <CanGrow>true</CanGrow>
                      <Value>Team</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="textbox12">
                      <rd:DefaultName>textbox12</rd:DefaultName>
                      <Style>
                        <BackgroundColor>Gainsboro</BackgroundColor>
                        <BorderStyle>
                          <Default>Solid</Default>
                        </BorderStyle>
                        <FontSize>9pt</FontSize>
                        <FontWeight>700</FontWeight>
                        <TextAlign>Center</TextAlign>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>9</ZIndex>
                      <CanGrow>true</CanGrow>
                      <Value>Non-Production
 Day</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="textbox2">
                      <rd:DefaultName>textbox2</rd:DefaultName>
                      <Style>
                        <BackgroundColor>Gainsboro</BackgroundColor>
                        <BorderStyle>
                          <Default>Solid</Default>
                        </BorderStyle>
                        <FontSize>9pt</FontSize>
                        <FontWeight>700</FontWeight>
                        <TextAlign>Center</TextAlign>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>8</ZIndex>
                      <CanGrow>true</CanGrow>
                      <Value>Previous Work Day (Absent)</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="textbox8">
                      <rd:DefaultName>textbox8</rd:DefaultName>
                      <Style>
                        <BackgroundColor>Gainsboro</BackgroundColor>
                        <BorderStyle>
                          <Default>Solid</Default>
                        </BorderStyle>
                        <FontSize>9pt</FontSize>
                        <FontWeight>700</FontWeight>
                        <TextAlign>Center</TextAlign>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>7</ZIndex>
                      <CanGrow>true</CanGrow>
                      <Value>Next Work 
Day (Absent)</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
              </TableCells>
              <Height>1cm</Height>
            </TableRow>
          </TableRows>
        </Header>
        <TableColumns>
          <TableColumn>
            <Width>2cm</Width>
          </TableColumn>
          <TableColumn>
            <Width>5.25cm</Width>
          </TableColumn>
          <TableColumn>
            <Width>1.75cm</Width>
          </TableColumn>
          <TableColumn>
            <Width>2.5cm</Width>
          </TableColumn>
          <TableColumn>
            <Width>2.75cm</Width>
          </TableColumn>
          <TableColumn>
            <Width>3cm</Width>
          </TableColumn>
          <TableColumn>
            <Width>2.75cm</Width>
          </TableColumn>
        </TableColumns>
        <Height>1.5cm</Height>
        <Left>0.5cm</Left>
      </Table>
      <Textbox Name="textbox3">
        <Top>0.25cm</Top>
        <Width>20.5cm</Width>
        <Style>
          <BackgroundColor>LightGrey</BackgroundColor>
          <BorderColor>
            <Default>White</Default>
          </BorderColor>
          <FontSize>16pt</FontSize>
          <TextAlign>Center</TextAlign>
          <VerticalAlign>Middle</VerticalAlign>
          <PaddingLeft>2pt</PaddingLeft>
          <PaddingRight>2pt</PaddingRight>
          <PaddingTop>2pt</PaddingTop>
          <PaddingBottom>2pt</PaddingBottom>
        </Style>
        <CanGrow>true</CanGrow>
        <Left>0.25cm</Left>
        <Height>1cm</Height>
        <Value>="Absences Spanning Non-Production Days: " &amp; format(Parameters!FromDate.Value,"dd/MM/yyyy") &amp; " -&gt; " &amp; format(Parameters!ToDate.Value,"dd/MM/yyyy")</Value>
      </Textbox>
    </ReportItems>
    <Height>3.5cm</Height>
  </Body>
  <Language>en-GB</Language>
  <PageFooter>
    <PrintOnFirstPage>true</PrintOnFirstPage>
    <ReportItems>
      <Textbox Name="textbox44">
        <Top>0.25cm</Top>
        <Width>7.75cm</Width>
        <Style>
          <FontSize>8pt</FontSize>
          <Format>g</Format>
          <TextAlign>Left</TextAlign>
          <PaddingLeft>2pt</PaddingLeft>
          <PaddingRight>2pt</PaddingRight>
          <PaddingTop>2pt</PaddingTop>
          <PaddingBottom>2pt</PaddingBottom>
        </Style>
        <ZIndex>1</ZIndex>
        <CanGrow>true</CanGrow>
        <Left>0.25cm</Left>
        <Height>0.5cm</Height>
        <Value>= "Report Date/Time: " &amp; format(NOW(),"dd MMM yyyy HH:mm")</Value>
      </Textbox>
      <Textbox Name="textbox30">
        <rd:DefaultName>textbox30</rd:DefaultName>
        <Top>0.25cm</Top>
        <Width>4.25cm</Width>
        <Style>
          <FontSize>8pt</FontSize>
          <TextAlign>Right</TextAlign>
          <PaddingLeft>2pt</PaddingLeft>
          <PaddingRight>2pt</PaddingRight>
          <PaddingTop>2pt</PaddingTop>
          <PaddingBottom>2pt</PaddingBottom>
        </Style>
        <CanGrow>true</CanGrow>
        <Left>16.5cm</Left>
        <Height>0.50265cm</Height>
        <Value>="Page" &amp; " " &amp; Globals!PageNumber &amp; " of " &amp; Globals!TotalPages</Value>
      </Textbox>
    </ReportItems>
    <Height>1cm</Height>
    <PrintOnLastPage>true</PrintOnLastPage>
  </PageFooter>
  <TopMargin>0.5cm</TopMargin>
  <PageHeight>21cm</PageHeight>
</Report>

Open in new window

xPLT-WTAAbsenceSpanNPD-results.xls
xPLT-RepDefaultDates-results.xls
0
mooriginal
Asked:
mooriginal
  • 5
  • 2
1 Solution
 
sureshbabukrishCommented:
until we see the code of SP xPLT_WTAAbsence....., we can tell how the SP Default Dates is being used.
Default Dates SP would be used to pass the date range to the first SP WTA to pull in the results.


If i get the SP CODE,  i should be able to clearly tell how this is working

for checking the perf, you can use SP WTA..  and test the performance.

the RDL file is always stored in XML format. and this XML format is stored in report server Database.




0
 
mooriginalAuthor Commented:
my mistake - sprocs attached ...

Note: xPLT_WTAAbsenceSpanNPD uses many other objects - views, sprocs, and functions I have not included them - only just the first sproc and the 2nd sproc that is called from the rdl file.

I have also attached the results of an old report that was run by a user from reporting services - so this shows how the data should look compared to my raw data.
We dont need to worry about the column names being different in the user report and my one - as I can handle that formatting once the data is correct.






xPLT-WTAAbsenceSpanNPD.txt
Absence-Spanning-Non-2DProductio.xls
0
 
mooriginalAuthor Commented:
also attached the code for rep default day sproc
xPLT-RepDefaultDates.txt
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
sureshbabukrishCommented:
i am not sure what you are trying to do? i mean what you actually want so that i can suggest based upon it.
0
 
mooriginalAuthor Commented:
ok again

the rdl contains the report and im guessing the format for the results that they user sees.

Im trying to run the report without using report server - but instead using just the sql code on the backend - ultimately I can then test its performance and also schedule the running of the code on another server ...

but thats not important i just want to be able to get my results when running the stored procedures contained in the rdl - to look and have the same data as when the report runs ...

I am getting raw data from running NPD stored procedure but its missing the Non Production day absences that will make it correct - hence if you look at the results file for NPD execution you can see that the names of some of the employees are duplicated - this is because the absence days are not populated - and thats where the RepDefaultDays comes into action

I want to be able to do in sql code what the rdl file is doing ... for the user when they run the report.

But I dont understand from the rdl file how NPD procedure call is interacting with RepDefaultDays

From a sql point of view - it would be one stored procedure that does all the processing in one go - not like the behaviour in the rdl file..

Im not an expert on xml or rdl files hence the question
0
 
mooriginalAuthor Commented:
any updates ?
0
 
Auric1983Commented:
mooriginal,

You can download BIDS (Business Intelligence Development Studio) free from MS, this is a custom version of Visual Studio 2005 to create & maintain reporting definitions.

an RDL file is simply a structure XML document that stores the queries, or in this case calls to stored procedures, and the formatting for the report.

With BIDS you can open an RDL file and use it for testing, modifying the reports, and checking out what is happening behind the scenes.

0
 
mooriginalAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now