Showing posts with label page. Show all posts
Showing posts with label page. Show all posts

Thursday, March 22, 2012

Bar Chart Static width

I have developed a subreport with a bar chart that is the width of a lanscaped page. When presenting a series of bars, the width of each bar changes depending on the number of data points presented. My objective is to present each bar with the same width regardless of the number of data points. Can anyone help me -- please?

If you just want to draw bars, you could use a different approach which guarantees identical width regardless of the amount of data. The approach uses a nice little trick Bob and I came up with a couple of months ago (discussed in Bob's blog: http://blogs.msdn.com/bobmeyers/archive/2005/10/15/481342.aspx).

Below is a RS2005-based sample report showing that approach:

<?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="Northwind">
<DataSourceReference>Northwind</DataSourceReference>
<rd:DataSourceID>5fda8710-6cb2-4013-bf0e-e8aadd63e007</rd:DataSourceID>
</DataSource>
</DataSources>
<BottomMargin>1in</BottomMargin>
<RightMargin>1in</RightMargin>
<rd:DrawGrid>true</rd:DrawGrid>
<InteractiveWidth>8.5in</InteractiveWidth>
<rd:SnapToGrid>true</rd:SnapToGrid>
<Body>
<ReportItems>
<Table Name="table2">
<Filters>
<Filter>
<Operator>TopN</Operator>
<FilterValues>
<FilterValue>=15</FilterValue>
</FilterValues>
<FilterExpression>=Fields!CategoryID.Value</FilterExpression>
</Filter>
</Filters>
<DataSetName>DataSet1</DataSetName>
<Top>0.125in</Top>
<TableGroups>
<TableGroup>
<Header>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="CategoryID">
<rd:DefaultName>CategoryID</rd:DefaultName>
<ZIndex>11</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!CategoryID.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox5">
<rd:DefaultName>textbox5</rd:DefaultName>
<ZIndex>10</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox17">
<rd:DefaultName>textbox17</rd:DefaultName>
<ZIndex>9</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox3">
<rd:DefaultName>textbox3</rd:DefaultName>
<ZIndex>8</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Header>
<Grouping Name="table2_Group1">
<GroupExpressions>
<GroupExpression>=Fields!CategoryID.Value</GroupExpression>
</GroupExpressions>
</Grouping>
</TableGroup>
<TableGroup>
<Header>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox12">
<rd:DefaultName>textbox12</rd:DefaultName>
<ZIndex>7</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="ReorderLevel_1">
<rd:DefaultName>ReorderLevel_1</rd:DefaultName>
<ZIndex>6</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!ReorderLevel.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox14">
<rd:DefaultName>textbox14</rd:DefaultName>
<ZIndex>5</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox4">
<rd:DefaultName>textbox4</rd:DefaultName>
<ZIndex>4</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Header>
<Sorting>
<SortBy>
<SortExpression>=Fields!ReorderLevel.Value</SortExpression>
<Direction>Descending</Direction>
</SortBy>
</Sorting>
<Grouping Name="table2_Group2">
<GroupExpressions>
<GroupExpression>=Fields!ReorderLevel.Value</GroupExpression>
</GroupExpressions>
</Grouping>
</TableGroup>
</TableGroups>
<Details>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox6">
<rd:DefaultName>textbox6</rd:DefaultName>
<ZIndex>3</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox8">
<rd:DefaultName>textbox8</rd:DefaultName>
<ZIndex>2</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="ProductName">
<rd:DefaultName>ProductName</rd:DefaultName>
<ZIndex>1</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!ProductName.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Image Name="image1">
<Sizing>Fit</Sizing>
<Source>Embedded</Source>
<Style>
<PaddingBottom>4pt</PaddingBottom>
<PaddingRight>=(1.0 - Fields!UnitsInStock.Value / Max(Fields!UnitsInStock.Value, "DataSet1")) * 72 &amp; "pt"</PaddingRight>
</Style>
<Value>gradient</Value>
</Image>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Details>
<Header>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox1">
<rd:DefaultName>textbox1</rd:DefaultName>
<ZIndex>15</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Category ID</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox9">
<rd:DefaultName>textbox9</rd:DefaultName>
<ZIndex>14</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Reorder Level</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox7">
<rd:DefaultName>textbox7</rd:DefaultName>
<ZIndex>13</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Product Name</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox2">
<rd:DefaultName>textbox2</rd:DefaultName>
<ZIndex>12</ZIndex>
<Style>
<TextAlign>Center</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Units In Stock</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Header>
<TableColumns>
<TableColumn>
<Width>1in</Width>
</TableColumn>
<TableColumn>
<Width>1in</Width>
</TableColumn>
<TableColumn>
<Width>2.375in</Width>
</TableColumn>
<TableColumn>
<Width>2.375in</Width>
</TableColumn>
</TableColumns>
<Height>1in</Height>
</Table>
</ReportItems>
<Height>1.25in</Height>
</Body>
<rd:ReportID>ab05eb76-fb3c-4ca3-8892-e2cd67a2d98d</rd:ReportID>
<LeftMargin>1in</LeftMargin>
<EmbeddedImages>
<EmbeddedImage Name="gradient">
<ImageData>iVBORw0KGgoAAAANSUhEUgAAAFwAAAAECAIAAACMUM+VAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAMBJREFUOE/t0ldOgzEUROGT/Uv03ltooffee29ZzwENgodA+FlApO/Blsa+1sglm6D0hfqLz8x34NdtTaAmXHi8cPrfNxSOq/e8n3M/SrEZW7A12rA9OrAzurAbe7A3+rAfB3AwhnAYR3AUx2IcJ7AckziF0ziDs1HBOZzHhVjEJVzGlVjFtVjHjdjELdzGHdyNPdzHAzyMIzzGkzjFMzzHC7yMK7zGG7zFu7jHB3yMJ3yOF3yNN6xCo5RGKf/6Ke8bJtRZRzfohAAAAABJRU5ErkJggg==</ImageData>
<MIMEType>image/png</MIMEType>
</EmbeddedImage>
</EmbeddedImages>
<DataSets>
<DataSet Name="DataSet1">
<Query>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
<CommandText>select * from products</CommandText>
<DataSourceName>Northwind</DataSourceName>
</Query>
<Fields>
<Field Name="ProductID">
<rd:TypeName>System.Int32</rd:TypeName>
<DataField>ProductID</DataField>
</Field>
<Field Name="ProductName">
<rd:TypeName>System.String</rd:TypeName>
<DataField>ProductName</DataField>
</Field>
<Field Name="SupplierID">
<rd:TypeName>System.Int32</rd:TypeName>
<DataField>SupplierID</DataField>
</Field>
<Field Name="CategoryID">
<rd:TypeName>System.Int32</rd:TypeName>
<DataField>CategoryID</DataField>
</Field>
<Field Name="QuantityPerUnit">
<rd:TypeName>System.String</rd:TypeName>
<DataField>QuantityPerUnit</DataField>
</Field>
<Field Name="UnitPrice">
<rd:TypeName>System.Decimal</rd:TypeName>
<DataField>UnitPrice</DataField>
</Field>
<Field Name="UnitsInStock">
<rd:TypeName>System.Int16</rd:TypeName>
<DataField>UnitsInStock</DataField>
</Field>
<Field Name="UnitsOnOrder">
<rd:TypeName>System.Int16</rd:TypeName>
<DataField>UnitsOnOrder</DataField>
</Field>
<Field Name="ReorderLevel">
<rd:TypeName>System.Int16</rd:TypeName>
<DataField>ReorderLevel</DataField>
</Field>
<Field Name="Discontinued">
<rd:TypeName>System.Boolean</rd:TypeName>
<DataField>Discontinued</DataField>
</Field>
</Fields>
</DataSet>
</DataSets>
<Width>6.75in</Width>
<InteractiveHeight>11in</InteractiveHeight>
<Language>en-US</Language>
<TopMargin>1in</TopMargin>
</Report>

|||You are saying in a few words that RS charts are useless. We figured that already. Thanks.|||

Depending what you are trying to do there are often many ways to achieve the desired effects.

Regarding the fixed width of bars shown in a chart, there are at least three other approaches besides using the "table inline chart approach".

Here is one approach:
* Add a list to the report, put the chart inside the list
* Add a (detail) group to the list with the following grouping expression:
=Int((RowNumber(Nothing)-1)/15)
This should result in a grouping of 15 items per (repeating) list instance. Every chart will be based on the values contained in the 15 data rows.

Another approach is to define multiple charts of different sizes and use the Visibility.Hidden property on the chart to dynamically hide all charts but one. Note: you can use =CountRows("DatasetName") to determine the number of rows in a particular dataset and hide one chart e.g. if the total number of dataset rows is greater than 20: Visibility.Hidden property setting: =CountRows("DatasetName") > 20

Finally, through the CustomReportItem approach, you can either use a third party ISV charting solution or you could implement your own chart-CustomReportItem that can dynamically grow based on its contents by creating differently sized chart images at runtime.

-- Robert

|||

Robert,

Thanks for your quick reply. Please understand my frustration with even such things in RS. Every extra hour of wasted research and fixing small RS bugs ("features") costs my company over $250/employee.

Part of a project I was asked to choose between RS, Crystal and ActiveReports. RS lost by not having a simple RTF control. Also, while I read stories about CustomReportItem in RS, I have yet to see one implementation, besides maybe Dundas Charts.

Regards.

|||

We certainly appreciate the feedback and I can assure you there will be significant enhancements in the next major release.

Since you have already decided against RS, just as an FYI regarding CustomReportItem (CRI):
* Dundas has shipped several CRI-based products (charts, gauges, calendar control, etc.)
* ChartFX has a CRI-based chart offering
* there are several other ISVs I know of working on various types of CRI-based controls
* Chris has some information about building a CRI on his blog, e.g.: http://blogs.msdn.com/chrishays/archive/2005/10/04/CustomReportItemSample.aspx

Note: I'm not saying that CRI is the solution to everything in RS 2005 - but it is quite useful in certain scenarios where you want the raw data being processing by the RS engine (grouping, sorting, filtering, etc.) and then generate a dynamic image based on the data.

-- Robert

Bar Chart Static width

I have developed a subreport with a bar chart that is the width of a lanscaped page. When presenting a series of bars, the width of each bar changes depending on the number of data points presented. My objective is to present each bar with the same width regardless of the number of data points. Can anyone help me -- please?

If you just want to draw bars, you could use a different approach which guarantees identical width regardless of the amount of data. The approach uses a nice little trick Bob and I came up with a couple of months ago (discussed in Bob's blog: http://blogs.msdn.com/bobmeyers/archive/2005/10/15/481342.aspx).

Below is a RS2005-based sample report showing that approach:

<?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="Northwind">
<DataSourceReference>Northwind</DataSourceReference>
<rd:DataSourceID>5fda8710-6cb2-4013-bf0e-e8aadd63e007</rd:DataSourceID>
</DataSource>
</DataSources>
<BottomMargin>1in</BottomMargin>
<RightMargin>1in</RightMargin>
<rd:DrawGrid>true</rd:DrawGrid>
<InteractiveWidth>8.5in</InteractiveWidth>
<rd:SnapToGrid>true</rd:SnapToGrid>
<Body>
<ReportItems>
<Table Name="table2">
<Filters>
<Filter>
<Operator>TopN</Operator>
<FilterValues>
<FilterValue>=15</FilterValue>
</FilterValues>
<FilterExpression>=Fields!CategoryID.Value</FilterExpression>
</Filter>
</Filters>
<DataSetName>DataSet1</DataSetName>
<Top>0.125in</Top>
<TableGroups>
<TableGroup>
<Header>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="CategoryID">
<rd:DefaultName>CategoryID</rd:DefaultName>
<ZIndex>11</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!CategoryID.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox5">
<rd:DefaultName>textbox5</rd:DefaultName>
<ZIndex>10</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox17">
<rd:DefaultName>textbox17</rd:DefaultName>
<ZIndex>9</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox3">
<rd:DefaultName>textbox3</rd:DefaultName>
<ZIndex>8</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Header>
<Grouping Name="table2_Group1">
<GroupExpressions>
<GroupExpression>=Fields!CategoryID.Value</GroupExpression>
</GroupExpressions>
</Grouping>
</TableGroup>
<TableGroup>
<Header>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox12">
<rd:DefaultName>textbox12</rd:DefaultName>
<ZIndex>7</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="ReorderLevel_1">
<rd:DefaultName>ReorderLevel_1</rd:DefaultName>
<ZIndex>6</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!ReorderLevel.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox14">
<rd:DefaultName>textbox14</rd:DefaultName>
<ZIndex>5</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox4">
<rd:DefaultName>textbox4</rd:DefaultName>
<ZIndex>4</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Header>
<Sorting>
<SortBy>
<SortExpression>=Fields!ReorderLevel.Value</SortExpression>
<Direction>Descending</Direction>
</SortBy>
</Sorting>
<Grouping Name="table2_Group2">
<GroupExpressions>
<GroupExpression>=Fields!ReorderLevel.Value</GroupExpression>
</GroupExpressions>
</Grouping>
</TableGroup>
</TableGroups>
<Details>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox6">
<rd:DefaultName>textbox6</rd:DefaultName>
<ZIndex>3</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox8">
<rd:DefaultName>textbox8</rd:DefaultName>
<ZIndex>2</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="ProductName">
<rd:DefaultName>ProductName</rd:DefaultName>
<ZIndex>1</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!ProductName.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Image Name="image1">
<Sizing>Fit</Sizing>
<Source>Embedded</Source>
<Style>
<PaddingBottom>4pt</PaddingBottom>
<PaddingRight>=(1.0 - Fields!UnitsInStock.Value / Max(Fields!UnitsInStock.Value, "DataSet1")) * 72 &amp; "pt"</PaddingRight>
</Style>
<Value>gradient</Value>
</Image>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Details>
<Header>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox1">
<rd:DefaultName>textbox1</rd:DefaultName>
<ZIndex>15</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Category ID</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox9">
<rd:DefaultName>textbox9</rd:DefaultName>
<ZIndex>14</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Reorder Level</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox7">
<rd:DefaultName>textbox7</rd:DefaultName>
<ZIndex>13</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Product Name</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox2">
<rd:DefaultName>textbox2</rd:DefaultName>
<ZIndex>12</ZIndex>
<Style>
<TextAlign>Center</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Units In Stock</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Header>
<TableColumns>
<TableColumn>
<Width>1in</Width>
</TableColumn>
<TableColumn>
<Width>1in</Width>
</TableColumn>
<TableColumn>
<Width>2.375in</Width>
</TableColumn>
<TableColumn>
<Width>2.375in</Width>
</TableColumn>
</TableColumns>
<Height>1in</Height>
</Table>
</ReportItems>
<Height>1.25in</Height>
</Body>
<rd:ReportID>ab05eb76-fb3c-4ca3-8892-e2cd67a2d98d</rd:ReportID>
<LeftMargin>1in</LeftMargin>
<EmbeddedImages>
<EmbeddedImage Name="gradient">
<ImageData>iVBORw0KGgoAAAANSUhEUgAAAFwAAAAECAIAAACMUM+VAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAMBJREFUOE/t0ldOgzEUROGT/Uv03ltooffee29ZzwENgodA+FlApO/Blsa+1sglm6D0hfqLz8x34NdtTaAmXHi8cPrfNxSOq/e8n3M/SrEZW7A12rA9OrAzurAbe7A3+rAfB3AwhnAYR3AUx2IcJ7AckziF0ziDs1HBOZzHhVjEJVzGlVjFtVjHjdjELdzGHdyNPdzHAzyMIzzGkzjFMzzHC7yMK7zGG7zFu7jHB3yMJ3yOF3yNN6xCo5RGKf/6Ke8bJtRZRzfohAAAAABJRU5ErkJggg==</ImageData>
<MIMEType>image/png</MIMEType>
</EmbeddedImage>
</EmbeddedImages>
<DataSets>
<DataSet Name="DataSet1">
<Query>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
<CommandText>select * from products</CommandText>
<DataSourceName>Northwind</DataSourceName>
</Query>
<Fields>
<Field Name="ProductID">
<rd:TypeName>System.Int32</rd:TypeName>
<DataField>ProductID</DataField>
</Field>
<Field Name="ProductName">
<rd:TypeName>System.String</rd:TypeName>
<DataField>ProductName</DataField>
</Field>
<Field Name="SupplierID">
<rd:TypeName>System.Int32</rd:TypeName>
<DataField>SupplierID</DataField>
</Field>
<Field Name="CategoryID">
<rd:TypeName>System.Int32</rd:TypeName>
<DataField>CategoryID</DataField>
</Field>
<Field Name="QuantityPerUnit">
<rd:TypeName>System.String</rd:TypeName>
<DataField>QuantityPerUnit</DataField>
</Field>
<Field Name="UnitPrice">
<rd:TypeName>System.Decimal</rd:TypeName>
<DataField>UnitPrice</DataField>
</Field>
<Field Name="UnitsInStock">
<rd:TypeName>System.Int16</rd:TypeName>
<DataField>UnitsInStock</DataField>
</Field>
<Field Name="UnitsOnOrder">
<rd:TypeName>System.Int16</rd:TypeName>
<DataField>UnitsOnOrder</DataField>
</Field>
<Field Name="ReorderLevel">
<rd:TypeName>System.Int16</rd:TypeName>
<DataField>ReorderLevel</DataField>
</Field>
<Field Name="Discontinued">
<rd:TypeName>System.Boolean</rd:TypeName>
<DataField>Discontinued</DataField>
</Field>
</Fields>
</DataSet>
</DataSets>
<Width>6.75in</Width>
<InteractiveHeight>11in</InteractiveHeight>
<Language>en-US</Language>
<TopMargin>1in</TopMargin>
</Report>

|||You are saying in a few words that RS charts are useless. We figured that already. Thanks.|||

Depending what you are trying to do there are often many ways to achieve the desired effects.

Regarding the fixed width of bars shown in a chart, there are at least three other approaches besides using the "table inline chart approach".

Here is one approach:
* Add a list to the report, put the chart inside the list
* Add a (detail) group to the list with the following grouping expression:
=Int((RowNumber(Nothing)-1)/15)
This should result in a grouping of 15 items per (repeating) list instance. Every chart will be based on the values contained in the 15 data rows.

Another approach is to define multiple charts of different sizes and use the Visibility.Hidden property on the chart to dynamically hide all charts but one. Note: you can use =CountRows("DatasetName") to determine the number of rows in a particular dataset and hide one chart e.g. if the total number of dataset rows is greater than 20: Visibility.Hidden property setting: =CountRows("DatasetName") > 20

Finally, through the CustomReportItem approach, you can either use a third party ISV charting solution or you could implement your own chart-CustomReportItem that can dynamically grow based on its contents by creating differently sized chart images at runtime.

-- Robert

|||

Robert,

Thanks for your quick reply. Please understand my frustration with even such things in RS. Every extra hour of wasted research and fixing small RS bugs ("features") costs my company over $250/employee.

Part of a project I was asked to choose between RS, Crystal and ActiveReports. RS lost by not having a simple RTF control. Also, while I read stories about CustomReportItem in RS, I have yet to see one implementation, besides maybe Dundas Charts.

Regards.

|||

We certainly appreciate the feedback and I can assure you there will be significant enhancements in the next major release.

Since you have already decided against RS, just as an FYI regarding CustomReportItem (CRI):
* Dundas has shipped several CRI-based products (charts, gauges, calendar control, etc.)
* ChartFX has a CRI-based chart offering
* there are several other ISVs I know of working on various types of CRI-based controls
* Chris has some information about building a CRI on his blog, e.g.: http://blogs.msdn.com/chrishays/archive/2005/10/04/CustomReportItemSample.aspx

Note: I'm not saying that CRI is the solution to everything in RS 2005 - but it is quite useful in certain scenarios where you want the raw data being processing by the RS engine (grouping, sorting, filtering, etc.) and then generate a dynamic image based on the data.

-- Robert

Monday, March 19, 2012

Bad practice for data sources?

I'm just wondering if it is bad programming practice to have many data sources on one page. I need a "Matrix" type of page that grabs data from many tables and so far I have 5 data sources. Is this common or is there something I should be doing to make it more efficient?That's not unbelievable, I think the most I have in my pages currently is 4 or 5. Mostly for filling dropdowns, and then a grid control, and then maybe a couple more to fill dropdowns in the gridcontrol when it's in edit mode.

bad page ID in MSDB DB

Hi All,
Greeting,

Sql Server 7
OS: Win NT

In the sql server logs i see the below error alerts

I/O error (bad page ID) detected during read of BUF pointer = 0x11e09e80, page ptr = 0x446b4000, pageid = (0x1:0x2c78), dbid = 4, status = 0x801, file = F:\MSSQL7\DATA\msdbdata.mdf..

Error: 823, Severity: 24, State: 1

Please help me in this.

Thanks in Advance
AdilHere's one place to look: http://support.microsoft.com/kb/q281809/

bad page ID

How i can repair database ms-sql when attach file i have:
error 823 I/O error (bad page ID) detected during read at offset 0x itd...
Robert LisHi

If you are trying to attach a DB, and during the attach process you get this
error, you can't do much but to revert to a backup as you can't attach a DB
that SQL Server finds to be suspect.

On the other hand, if the DB is online, then you can run DBCC CHECKDB.

--
----------
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland

IM: mike@.epprecht.net

MVP Program: http://www.microsoft.com/mvp

Blog: http://www.msmvps.com/epprecht/

"Robert-SoftMAR" <robert@.softmar.com.pl> wrote in message
news:d6qu0d$ude$1@.news.lublin.pl...
> How i can repair database ms-sql when attach file i have:
> error 823 I/O error (bad page ID) detected during read at offset 0x itd...
> Robert Lis|||Robert-SoftMAR (robert@.softmar.com.pl) writes:
> How i can repair database ms-sql when attach file i have:
> error 823 I/O error (bad page ID) detected during read at offset 0x itd...

Books Online says this about eror 823:

Check the accessibility and condition of the device in question.

Run hardware diagnostics and correct problems, if possible.

Restore damaged files from the latest database backup. Restoring from a
database backup should always be considered the primary means of fixing
a damaged database.

If you don't have a backup or if the errors detected are very isolated,
the repair functionality of DBCC CHECKDB may be useful. However, using
DBCC CHECKDB can be more time consuming than restoring the damaged
files from a backup, and you may not be able to recover all your data.

Caution If running DBCC CHECKDB with one of the repair clauses does
not correct the problem or if you are unsure how this process may
affect your data, contact your primary support provider.

The way to find this information is simply to search for 823.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Thanks
If I tray DBCC CHECKDB, I have error:
Server: Msg 911, Level 16, State 1, Line 1
Could not locate entry in sysdatabases for database 'gg_system'. No entry
found with that name. Make sure that the name is entered correctly.
This DB is not in list sysdatabases and I can't add this DB. And I don't
have any backup of DB. Maybe another repair software?
Robert Lis

Uytkownik "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> napisa w
wiadomoci news:4290ff5e$1_3@.news.bluewin.ch...
> Hi
> If you are trying to attach a DB, and during the attach process you get
> this error, you can't do much but to revert to a backup as you can't
> attach a DB that SQL Server finds to be suspect.
> On the other hand, if the DB is online, then you can run DBCC CHECKDB.
> --
> ----------
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Robert-SoftMAR" <robert@.softmar.com.pl> wrote in message
> news:d6qu0d$ude$1@.news.lublin.pl...
>> How i can repair database ms-sql when attach file i have:
>> error 823 I/O error (bad page ID) detected during read at offset 0x
>> itd...
>> Robert Lis
>>|||"Robert-SoftMAR" <robert@.softmar.com.pl> wrote in message
news:d6r1oa$1vb$1@.news.lublin.pl...
> Thanks
> If I tray DBCC CHECKDB, I have error:
> Server: Msg 911, Level 16, State 1, Line 1
> Could not locate entry in sysdatabases for database 'gg_system'. No entry
> found with that name. Make sure that the name is entered correctly.
> This DB is not in list sysdatabases and I can't add this DB. And I don't
> have any backup of DB. Maybe another repair software?

Sounds like you're pretty much up a creek w/o a paddle then.

I don't know of any tools that can read/repair off-line files for SQL
Server.|||Yes, I now this massage in Books Online but i can't do:
DBCC CHECKDB
beacouse i have error:
Could not locate entry in sysdatabases for database 'gg_system'. No entry
found with that name. Make sure that the name is entered correctly.
Robert Lis

Uzytkownik "Erland Sommarskog" <esquel@.sommarskog.se> napisal w wiadomosci
news:Xns965F261413F3Yazorman@.127.0.0.1...
> Robert-SoftMAR (robert@.softmar.com.pl) writes:
>> How i can repair database ms-sql when attach file i have:
>> error 823 I/O error (bad page ID) detected during read at offset 0x
>> itd...
> Books Online says this about eror 823:
> Check the accessibility and condition of the device in question.
> Run hardware diagnostics and correct problems, if possible.
> Restore damaged files from the latest database backup. Restoring from a
> database backup should always be considered the primary means of fixing
> a damaged database.
> If you don't have a backup or if the errors detected are very isolated,
> the repair functionality of DBCC CHECKDB may be useful. However, using
> DBCC CHECKDB can be more time consuming than restoring the damaged
> files from a backup, and you may not be able to recover all your data.
>
> Caution If running DBCC CHECKDB with one of the repair clauses does
> not correct the problem or if you are unsure how this process may
> affect your data, contact your primary support provider.
>
> The way to find this information is simply to search for 823.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp|||Robert-SoftMAR (robert@.softmar.com.pl) writes:
> Yes, I now this massage in Books Online but i can't do:
> DBCC CHECKDB
> beacouse i have error:
> Could not locate entry in sysdatabases for database 'gg_system'. No entry
> found with that name. Make sure that the name is entered correctly.
> Robert Lis

It appears that that .mdf files is a useless pile of bits. If that database
is important to you, by all means open a case with Microsoft. This is
nothing that can be sorted out over a newsgroup.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Bad page ID

<<Server: Msg 8946, Level 16, State 12, Line 2
Table error: Allocation page (1:6195408) has invalid
PFS_PAGE page header values.
Type is 0. Check type, object ID and page ID on the page.>>
The above error seems to indicate that I can check the
header values of this page.
How do I do that?
Many thanks.The message should really be "Have your support provider check the ..."
You can search for DBCC PAGE on the Net.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Karl" <kekurzenknabe@.hotmail.com> wrote in message news:2f6f01c373d6$f67b09c0$a601280a@.phx.gbl...
> <<Server: Msg 8946, Level 16, State 12, Line 2
> Table error: Allocation page (1:6195408) has invalid
> PFS_PAGE page header values.
> Type is 0. Check type, object ID and page ID on the page.>>
> The above error seems to indicate that I can check the
> header values of this page.
> How do I do that?
> Many thanks.|||Looks like you've got a corrupt PFS page. This problem cannot be
automatically repaired (even with REPAIR_ALLOW_DATA_LOSS) so you need to
restore your database from a backup after working out why the problem
occurred (check your event logs, the errorlog, run hardware diagnostics) -
or call PSS to help you.
--
Paul Randal
DBCC Technical Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
wrote in message news:eH7TZYhdDHA.416@.tk2msftngp13.phx.gbl...
> The message should really be "Have your support provider check the ..."
> You can search for DBCC PAGE on the Net.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at: http://groups.google.com/groups?oi=djq&as
ugroup=microsoft.public.sqlserver
>
> "Karl" <kekurzenknabe@.hotmail.com> wrote in message
news:2f6f01c373d6$f67b09c0$a601280a@.phx.gbl...
> > <<Server: Msg 8946, Level 16, State 12, Line 2
> > Table error: Allocation page (1:6195408) has invalid
> > PFS_PAGE page header values.
> > Type is 0. Check type, object ID and page ID on the page.>>
> >
> > The above error seems to indicate that I can check the
> > header values of this page.
> >
> > How do I do that?
> >
> > Many thanks.
>

Bad Page error

I am getting an error in my DTS logs about a bad page. Here is the exact
message.
Step Error Description:I/O error (bad page ID) detected during read at
offset 0x0000022a040000 in file 'E:\SQLData\ALS_Stage_Data.MDF'.
We are getting this error on 2 different servers. The process has been
running like a champ for years and now we are getting this message. All that
is running when it errors out is an update statement that is joining 2
tables. I have read some about tempdb running into these issues and it
suggests that there may be hardware issues. That is not the case as we have
looked into that and we have many other processes that run on these servers.
I have also read that service pack 4 needs to be installed. Well we moved
our process to another server with exactly the same configuration and it ran
fine on there. Had anybody else ran into this? Any suggestions? All help
is appreciated.
Thanks
have you run DBCC CHECKDB to see if there are any errors?
Jack Vamvas
__________________________________________________ ________________
Receive free SQL tips - register at www.ciquery.com/sqlserver.htm
SQL Server Performance Audit - check www.ciquery.com/sqlserver_audit.htm
New article by Jack Vamvas - SQL and Markov Chains -
www.ciquery.com/articles/art_04.asp
"Andy" <Andy@.discussions.microsoft.com> wrote in message
news:AA513080-F72F-4386-93CA-93CEF0673F76@.microsoft.com...
> I am getting an error in my DTS logs about a bad page. Here is the exact
> message.
> Step Error Description:I/O error (bad page ID) detected during read at
> offset 0x0000022a040000 in file 'E:\SQLData\ALS_Stage_Data.MDF'.
> We are getting this error on 2 different servers. The process has been
> running like a champ for years and now we are getting this message. All
that
> is running when it errors out is an update statement that is joining 2
> tables. I have read some about tempdb running into these issues and it
> suggests that there may be hardware issues. That is not the case as we
have
> looked into that and we have many other processes that run on these
servers.
> I have also read that service pack 4 needs to be installed. Well we moved
> our process to another server with exactly the same configuration and it
ran
> fine on there. Had anybody else ran into this? Any suggestions? All
help
> is appreciated.
> Thanks
|||Yes, we ran that and no errors were returned. We also ran it with Allow data
loss and no errors were returned. Like I mentioned below, this is happening
on 2 servers. It is the same process, but 1 is the dev server and 1 is prod.
"Jack Vamvas" wrote:

> have you run DBCC CHECKDB to see if there are any errors?
> --
> Jack Vamvas
> __________________________________________________ ________________
> Receive free SQL tips - register at www.ciquery.com/sqlserver.htm
> SQL Server Performance Audit - check www.ciquery.com/sqlserver_audit.htm
> New article by Jack Vamvas - SQL and Markov Chains -
> www.ciquery.com/articles/art_04.asp
> "Andy" <Andy@.discussions.microsoft.com> wrote in message
> news:AA513080-F72F-4386-93CA-93CEF0673F76@.microsoft.com...
> that
> have
> servers.
> ran
> help
>
>
|||Hi Andy,
This is usually caused by the hardware, but if it is happening on two
different hardware systems, it seems like a logical problem in the database.
You probably restored a backup of the database from server to another.
Here is the logical meaning of this error:
http://support.microsoft.com/default...b;en-us;828339
HTH
DeeJay Puar
MCDBA
(bad page ID): This message means that the pageID on the page header is not
the expected page that was read from the disk. For example, if SQL Server
2000 provides a file offset for database file 1 that is for logical page 100,
the pageID on the page header for that 8 KB page should be 1:100. If not, the
bad page ID is included in the logical I/O check failure message.
You can read more about it here:
"Andy" wrote:
[vbcol=seagreen]
> Yes, we ran that and no errors were returned. We also ran it with Allow data
> loss and no errors were returned. Like I mentioned below, this is happening
> on 2 servers. It is the same process, but 1 is the dev server and 1 is prod.
>
> "Jack Vamvas" wrote:
|||I looked into that as well, as I thought I did take a backup. The 2nd server
that it is happening on I created brand new databases before I kicked off the
process and we received the same error, at the same point in the process.
"DeeJay Puar" wrote:
[vbcol=seagreen]
> Hi Andy,
> This is usually caused by the hardware, but if it is happening on two
> different hardware systems, it seems like a logical problem in the database.
> You probably restored a backup of the database from server to another.
> Here is the logical meaning of this error:
> http://support.microsoft.com/default...b;en-us;828339
> HTH
> DeeJay Puar
> MCDBA
> (bad page ID): This message means that the pageID on the page header is not
> the expected page that was read from the disk. For example, if SQL Server
> 2000 provides a file offset for database file 1 that is for logical page 100,
> the pageID on the page header for that 8 KB page should be 1:100. If not, the
> bad page ID is included in the logical I/O check failure message.
> You can read more about it here:
>
> "Andy" wrote:
|||No too sure as to what is happening. I can not really duplicate it here.
On the server, did you take a backup from the old server and restore the
database on the new server? Or did you just create a shell and then ran your
dts package to load the data? Have you looked at the source tables in the DTS
package?
Have you looked into torn-page?
"Andy" wrote:
[vbcol=seagreen]
> I looked into that as well, as I thought I did take a backup. The 2nd server
> that it is happening on I created brand new databases before I kicked off the
> process and we received the same error, at the same point in the process.
> "DeeJay Puar" wrote:

Bad Page error

I am getting an error in my DTS logs about a bad page. Here is the exact
message.
Step Error Description:I/O error (bad page ID) detected during read at
offset 0x0000022a040000 in file 'E:\SQLData\ALS_Stage_Data.MDF'.
We are getting this error on 2 different servers. The process has been
running like a champ for years and now we are getting this message. All that
is running when it errors out is an update statement that is joining 2
tables. I have read some about tempdb running into these issues and it
suggests that there may be hardware issues. That is not the case as we have
looked into that and we have many other processes that run on these servers.
I have also read that service pack 4 needs to be installed. Well we moved
our process to another server with exactly the same configuration and it ran
fine on there. Had anybody else ran into this? Any suggestions? All help
is appreciated.
Thankshave you run DBCC CHECKDB to see if there are any errors?
--
Jack Vamvas
__________________________________________________________________
Receive free SQL tips - register at www.ciquery.com/sqlserver.htm
SQL Server Performance Audit - check www.ciquery.com/sqlserver_audit.htm
New article by Jack Vamvas - SQL and Markov Chains -
www.ciquery.com/articles/art_04.asp
"Andy" <Andy@.discussions.microsoft.com> wrote in message
news:AA513080-F72F-4386-93CA-93CEF0673F76@.microsoft.com...
> I am getting an error in my DTS logs about a bad page. Here is the exact
> message.
> Step Error Description:I/O error (bad page ID) detected during read at
> offset 0x0000022a040000 in file 'E:\SQLData\ALS_Stage_Data.MDF'.
> We are getting this error on 2 different servers. The process has been
> running like a champ for years and now we are getting this message. All
that
> is running when it errors out is an update statement that is joining 2
> tables. I have read some about tempdb running into these issues and it
> suggests that there may be hardware issues. That is not the case as we
have
> looked into that and we have many other processes that run on these
servers.
> I have also read that service pack 4 needs to be installed. Well we moved
> our process to another server with exactly the same configuration and it
ran
> fine on there. Had anybody else ran into this? Any suggestions? All
help
> is appreciated.
> Thanks|||Yes, we ran that and no errors were returned. We also ran it with Allow data
loss and no errors were returned. Like I mentioned below, this is happening
on 2 servers. It is the same process, but 1 is the dev server and 1 is prod.
"Jack Vamvas" wrote:
> have you run DBCC CHECKDB to see if there are any errors?
> --
> Jack Vamvas
> __________________________________________________________________
> Receive free SQL tips - register at www.ciquery.com/sqlserver.htm
> SQL Server Performance Audit - check www.ciquery.com/sqlserver_audit.htm
> New article by Jack Vamvas - SQL and Markov Chains -
> www.ciquery.com/articles/art_04.asp
> "Andy" <Andy@.discussions.microsoft.com> wrote in message
> news:AA513080-F72F-4386-93CA-93CEF0673F76@.microsoft.com...
> > I am getting an error in my DTS logs about a bad page. Here is the exact
> > message.
> >
> > Step Error Description:I/O error (bad page ID) detected during read at
> > offset 0x0000022a040000 in file 'E:\SQLData\ALS_Stage_Data.MDF'.
> >
> > We are getting this error on 2 different servers. The process has been
> > running like a champ for years and now we are getting this message. All
> that
> > is running when it errors out is an update statement that is joining 2
> > tables. I have read some about tempdb running into these issues and it
> > suggests that there may be hardware issues. That is not the case as we
> have
> > looked into that and we have many other processes that run on these
> servers.
> > I have also read that service pack 4 needs to be installed. Well we moved
> > our process to another server with exactly the same configuration and it
> ran
> > fine on there. Had anybody else ran into this? Any suggestions? All
> help
> > is appreciated.
> >
> > Thanks
>
>|||Hi Andy,
This is usually caused by the hardware, but if it is happening on two
different hardware systems, it seems like a logical problem in the database.
You probably restored a backup of the database from server to another.
Here is the logical meaning of this error:
http://support.microsoft.com/default.aspx?scid=kb;en-us;828339
HTH
DeeJay Puar
MCDBA
(bad page ID): This message means that the pageID on the page header is not
the expected page that was read from the disk. For example, if SQL Server
2000 provides a file offset for database file 1 that is for logical page 100,
the pageID on the page header for that 8 KB page should be 1:100. If not, the
bad page ID is included in the logical I/O check failure message.
You can read more about it here:
"Andy" wrote:
> Yes, we ran that and no errors were returned. We also ran it with Allow data
> loss and no errors were returned. Like I mentioned below, this is happening
> on 2 servers. It is the same process, but 1 is the dev server and 1 is prod.
>
> "Jack Vamvas" wrote:
> > have you run DBCC CHECKDB to see if there are any errors?
> >
> > --
> > Jack Vamvas
> > __________________________________________________________________
> > Receive free SQL tips - register at www.ciquery.com/sqlserver.htm
> > SQL Server Performance Audit - check www.ciquery.com/sqlserver_audit.htm
> > New article by Jack Vamvas - SQL and Markov Chains -
> > www.ciquery.com/articles/art_04.asp
> > "Andy" <Andy@.discussions.microsoft.com> wrote in message
> > news:AA513080-F72F-4386-93CA-93CEF0673F76@.microsoft.com...
> > > I am getting an error in my DTS logs about a bad page. Here is the exact
> > > message.
> > >
> > > Step Error Description:I/O error (bad page ID) detected during read at
> > > offset 0x0000022a040000 in file 'E:\SQLData\ALS_Stage_Data.MDF'.
> > >
> > > We are getting this error on 2 different servers. The process has been
> > > running like a champ for years and now we are getting this message. All
> > that
> > > is running when it errors out is an update statement that is joining 2
> > > tables. I have read some about tempdb running into these issues and it
> > > suggests that there may be hardware issues. That is not the case as we
> > have
> > > looked into that and we have many other processes that run on these
> > servers.
> > > I have also read that service pack 4 needs to be installed. Well we moved
> > > our process to another server with exactly the same configuration and it
> > ran
> > > fine on there. Had anybody else ran into this? Any suggestions? All
> > help
> > > is appreciated.
> > >
> > > Thanks
> >
> >
> >|||I looked into that as well, as I thought I did take a backup. The 2nd server
that it is happening on I created brand new databases before I kicked off the
process and we received the same error, at the same point in the process.
"DeeJay Puar" wrote:
> Hi Andy,
> This is usually caused by the hardware, but if it is happening on two
> different hardware systems, it seems like a logical problem in the database.
> You probably restored a backup of the database from server to another.
> Here is the logical meaning of this error:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;828339
> HTH
> DeeJay Puar
> MCDBA
> (bad page ID): This message means that the pageID on the page header is not
> the expected page that was read from the disk. For example, if SQL Server
> 2000 provides a file offset for database file 1 that is for logical page 100,
> the pageID on the page header for that 8 KB page should be 1:100. If not, the
> bad page ID is included in the logical I/O check failure message.
> You can read more about it here:
>
> "Andy" wrote:
> > Yes, we ran that and no errors were returned. We also ran it with Allow data
> > loss and no errors were returned. Like I mentioned below, this is happening
> > on 2 servers. It is the same process, but 1 is the dev server and 1 is prod.
> >
> >
> > "Jack Vamvas" wrote:
> >
> > > have you run DBCC CHECKDB to see if there are any errors?
> > >
> > > --
> > > Jack Vamvas
> > > __________________________________________________________________
> > > Receive free SQL tips - register at www.ciquery.com/sqlserver.htm
> > > SQL Server Performance Audit - check www.ciquery.com/sqlserver_audit.htm
> > > New article by Jack Vamvas - SQL and Markov Chains -
> > > www.ciquery.com/articles/art_04.asp
> > > "Andy" <Andy@.discussions.microsoft.com> wrote in message
> > > news:AA513080-F72F-4386-93CA-93CEF0673F76@.microsoft.com...
> > > > I am getting an error in my DTS logs about a bad page. Here is the exact
> > > > message.
> > > >
> > > > Step Error Description:I/O error (bad page ID) detected during read at
> > > > offset 0x0000022a040000 in file 'E:\SQLData\ALS_Stage_Data.MDF'.
> > > >
> > > > We are getting this error on 2 different servers. The process has been
> > > > running like a champ for years and now we are getting this message. All
> > > that
> > > > is running when it errors out is an update statement that is joining 2
> > > > tables. I have read some about tempdb running into these issues and it
> > > > suggests that there may be hardware issues. That is not the case as we
> > > have
> > > > looked into that and we have many other processes that run on these
> > > servers.
> > > > I have also read that service pack 4 needs to be installed. Well we moved
> > > > our process to another server with exactly the same configuration and it
> > > ran
> > > > fine on there. Had anybody else ran into this? Any suggestions? All
> > > help
> > > > is appreciated.
> > > >
> > > > Thanks
> > >
> > >
> > >|||No too sure as to what is happening. I can not really duplicate it here.
On the server, did you take a backup from the old server and restore the
database on the new server? Or did you just create a shell and then ran your
dts package to load the data? Have you looked at the source tables in the DTS
package?
Have you looked into torn-page?
"Andy" wrote:
> I looked into that as well, as I thought I did take a backup. The 2nd server
> that it is happening on I created brand new databases before I kicked off the
> process and we received the same error, at the same point in the process.
> "DeeJay Puar" wrote:
> > Hi Andy,
> >
> > This is usually caused by the hardware, but if it is happening on two
> > different hardware systems, it seems like a logical problem in the database.
> > You probably restored a backup of the database from server to another.
> >
> > Here is the logical meaning of this error:
> >
> > http://support.microsoft.com/default.aspx?scid=kb;en-us;828339
> >
> > HTH
> >
> > DeeJay Puar
> > MCDBA
> >
> > (bad page ID): This message means that the pageID on the page header is not
> > the expected page that was read from the disk. For example, if SQL Server
> > 2000 provides a file offset for database file 1 that is for logical page 100,
> > the pageID on the page header for that 8 KB page should be 1:100. If not, the
> > bad page ID is included in the logical I/O check failure message.
> >
> > You can read more about it here:
> >
> >
> >
> > "Andy" wrote:
> >
> > > Yes, we ran that and no errors were returned. We also ran it with Allow data
> > > loss and no errors were returned. Like I mentioned below, this is happening
> > > on 2 servers. It is the same process, but 1 is the dev server and 1 is prod.
> > >
> > >
> > > "Jack Vamvas" wrote:
> > >
> > > > have you run DBCC CHECKDB to see if there are any errors?
> > > >
> > > > --
> > > > Jack Vamvas
> > > > __________________________________________________________________
> > > > Receive free SQL tips - register at www.ciquery.com/sqlserver.htm
> > > > SQL Server Performance Audit - check www.ciquery.com/sqlserver_audit.htm
> > > > New article by Jack Vamvas - SQL and Markov Chains -
> > > > www.ciquery.com/articles/art_04.asp
> > > > "Andy" <Andy@.discussions.microsoft.com> wrote in message
> > > > news:AA513080-F72F-4386-93CA-93CEF0673F76@.microsoft.com...
> > > > > I am getting an error in my DTS logs about a bad page. Here is the exact
> > > > > message.
> > > > >
> > > > > Step Error Description:I/O error (bad page ID) detected during read at
> > > > > offset 0x0000022a040000 in file 'E:\SQLData\ALS_Stage_Data.MDF'.
> > > > >
> > > > > We are getting this error on 2 different servers. The process has been
> > > > > running like a champ for years and now we are getting this message. All
> > > > that
> > > > > is running when it errors out is an update statement that is joining 2
> > > > > tables. I have read some about tempdb running into these issues and it
> > > > > suggests that there may be hardware issues. That is not the case as we
> > > > have
> > > > > looked into that and we have many other processes that run on these
> > > > servers.
> > > > > I have also read that service pack 4 needs to be installed. Well we moved
> > > > > our process to another server with exactly the same configuration and it
> > > > ran
> > > > > fine on there. Had anybody else ran into this? Any suggestions? All
> > > > help
> > > > > is appreciated.
> > > > >
> > > > > Thanks
> > > >
> > > >
> > > >

Bad Page error

I am getting an error in my DTS logs about a bad page. Here is the exact
message.
Step Error Description:I/O error (bad page ID) detected during read at
offset 0x0000022a040000 in file 'E:\SQLData\ALS_Stage_Data.MDF'.
We are getting this error on 2 different servers. The process has been
running like a champ for years and now we are getting this message. All tha
t
is running when it errors out is an update statement that is joining 2
tables. I have read some about tempdb running into these issues and it
suggests that there may be hardware issues. That is not the case as we have
looked into that and we have many other processes that run on these servers.
I have also read that service pack 4 needs to be installed. Well we moved
our process to another server with exactly the same configuration and it ran
fine on there. Had anybody else ran into this? Any suggestions? All help
is appreciated.
Thankshave you run DBCC CHECKDB to see if there are any errors?
Jack Vamvas
________________________________________
__________________________
Receive free SQL tips - register at www.ciquery.com/sqlserver.htm
SQL Server Performance Audit - check www.ciquery.com/sqlserver_audit.htm
New article by Jack Vamvas - SQL and Markov Chains -
www.ciquery.com/articles/art_04.asp
"Andy" <Andy@.discussions.microsoft.com> wrote in message
news:AA513080-F72F-4386-93CA-93CEF0673F76@.microsoft.com...
> I am getting an error in my DTS logs about a bad page. Here is the exact
> message.
> Step Error Description:I/O error (bad page ID) detected during read at
> offset 0x0000022a040000 in file 'E:\SQLData\ALS_Stage_Data.MDF'.
> We are getting this error on 2 different servers. The process has been
> running like a champ for years and now we are getting this message. All
that
> is running when it errors out is an update statement that is joining 2
> tables. I have read some about tempdb running into these issues and it
> suggests that there may be hardware issues. That is not the case as we
have
> looked into that and we have many other processes that run on these
servers.
> I have also read that service pack 4 needs to be installed. Well we moved
> our process to another server with exactly the same configuration and it
ran
> fine on there. Had anybody else ran into this? Any suggestions? All
help
> is appreciated.
> Thanks|||Yes, we ran that and no errors were returned. We also ran it with Allow dat
a
loss and no errors were returned. Like I mentioned below, this is happening
on 2 servers. It is the same process, but 1 is the dev server and 1 is prod
.
"Jack Vamvas" wrote:

> have you run DBCC CHECKDB to see if there are any errors?
> --
> Jack Vamvas
> ________________________________________
__________________________
> Receive free SQL tips - register at www.ciquery.com/sqlserver.htm
> SQL Server Performance Audit - check www.ciquery.com/sqlserver_audit.htm
> New article by Jack Vamvas - SQL and Markov Chains -
> www.ciquery.com/articles/art_04.asp
> "Andy" <Andy@.discussions.microsoft.com> wrote in message
> news:AA513080-F72F-4386-93CA-93CEF0673F76@.microsoft.com...
> that
> have
> servers.
> ran
> help
>
>|||Hi Andy,
This is usually caused by the hardware, but if it is happening on two
different hardware systems, it seems like a logical problem in the database.
You probably restored a backup of the database from server to another.
Here is the logical meaning of this error:
http://support.microsoft.com/defaul...kb;en-us;828339
HTH
DeeJay Puar
MCDBA
(bad page ID): This message means that the pageID on the page header is not
the expected page that was read from the disk. For example, if SQL Server
2000 provides a file offset for database file 1 that is for logical page 100
,
the pageID on the page header for that 8 KB page should be 1:100. If not, th
e
bad page ID is included in the logical I/O check failure message.
You can read more about it here:
"Andy" wrote:
[vbcol=seagreen]
> Yes, we ran that and no errors were returned. We also ran it with Allow d
ata
> loss and no errors were returned. Like I mentioned below, this is happeni
ng
> on 2 servers. It is the same process, but 1 is the dev server and 1 is pr
od.
>
> "Jack Vamvas" wrote:
>|||I looked into that as well, as I thought I did take a backup. The 2nd serve
r
that it is happening on I created brand new databases before I kicked off th
e
process and we received the same error, at the same point in the process.
"DeeJay Puar" wrote:
[vbcol=seagreen]
> Hi Andy,
> This is usually caused by the hardware, but if it is happening on two
> different hardware systems, it seems like a logical problem in the databas
e.
> You probably restored a backup of the database from server to another.
> Here is the logical meaning of this error:
> http://support.microsoft.com/defaul...kb;en-us;828339
> HTH
> DeeJay Puar
> MCDBA
> (bad page ID): This message means that the pageID on the page header is no
t
> the expected page that was read from the disk. For example, if SQL Server
> 2000 provides a file offset for database file 1 that is for logical page 1
00,
> the pageID on the page header for that 8 KB page should be 1:100. If not,
the
> bad page ID is included in the logical I/O check failure message.
> You can read more about it here:
>
> "Andy" wrote:
>|||No too sure as to what is happening. I can not really duplicate it here.
On the server, did you take a backup from the old server and restore the
database on the new server? Or did you just create a shell and then ran your
dts package to load the data? Have you looked at the source tables in the DT
S
package?
Have you looked into torn-page?
"Andy" wrote:
[vbcol=seagreen]
> I looked into that as well, as I thought I did take a backup. The 2nd ser
ver
> that it is happening on I created brand new databases before I kicked off
the
> process and we received the same error, at the same point in the process.
> "DeeJay Puar" wrote:
>