Showing posts with label shown. Show all posts
Showing posts with label shown. Show all posts

Tuesday, March 27, 2012

Change in legend of chart based on values?

I am developing a chart with type as column and subtype as stacked. The values (different columns from my dataset) are shown as series in the chart. If I have an entire column with no values, nothing in shown in the graph but the column name comes in the legend. I do not want to show the particular column in legend if all the values in that column are 0 or null. Is it possible through an expression or any other way?

Please let me know.

Thanks in advance !!!

If you use a dynamic series grouping in the chart and you want to get rid of a particular series grouping instance, you could use a filter expression on the series grouping, e.g.
Filter expression: =Sum(Fields!Name.Value, "DynamicSeriesGroupingName")
Filter operator: >
Filter value: =0

Again, the filter approach will only work in the case of dynamic series groupings.

-- Robert

Thursday, March 8, 2012

Change buffer size for the text datafile data

When populating a table with a column of TEXT datatype, an error
message was shown, indicating that the data is too large for the
specified buffer size. How we I change the buffer size from the SQL
Server Enterprise Manager?
TIA,
Jeffrey
what mechanism where you using to populate your table?
Does this kb apply
http://support.microsoft.com/default...&Product=sql2k
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Jeffrey" <cjeffwang@.gmail.com> wrote in message
news:bb2899d2.0410011423.5bf86f40@.posting.google.c om...
> When populating a table with a column of TEXT datatype, an error
> message was shown, indicating that the data is too large for the
> specified buffer size. How we I change the buffer size from the SQL
> Server Enterprise Manager?
> TIA,
> Jeffrey
|||Jeffery,
Could you provide more information on exactly what error message and error
message number you received?
How were you populating the column with the TEXT datatype? Via an INSERT
statement, BULK INSERT or BCP?
The more precise information we have, the better and faster we can answer
your question!
Thanks,
John
"Jeffrey" <cjeffwang@.gmail.com> wrote in message
news:bb2899d2.0410011423.5bf86f40@.posting.google.c om...
> When populating a table with a column of TEXT datatype, an error
> message was shown, indicating that the data is too large for the
> specified buffer size. How we I change the buffer size from the SQL
> Server Enterprise Manager?
> TIA,
> Jeffrey
|||I tried to populate a table with an Excel data file. To import the data
file I opened the DTS Import/Export wizard from Enterprise Manager. The
datatype is TEXT. Thanks.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||John,
I tried to populate a table of a SQL Server database with an Excel
data file. To import the data file I opened the DTS Import/Export
wizard from Enterprise Manager. The datatype of the column is TEXT
and the error message indicated that the text data is too large for
the specified buffer size.
How do I cahnge the buffer size of the database or the column?
Thanks,
Jeffrey
"John Kane" <jt-kane@.comcast.net> wrote in message news:<#FVNToAqEHA.592@.TK2MSFTNGP11.phx.gbl>...[vbcol=seagreen]
> Jeffery,
> Could you provide more information on exactly what error message and error
> message number you received?
> How were you populating the column with the TEXT datatype? Via an INSERT
> statement, BULK INSERT or BCP?
> The more precise information we have, the better and faster we can answer
> your question!
> Thanks,
> John
>
> "Jeffrey" <cjeffwang@.gmail.com> wrote in message
> news:bb2899d2.0410011423.5bf86f40@.posting.google.c om...

Change buffer size for the text datafile data

When populating a table with a column of TEXT datatype, an error
message was shown, indicating that the data is too large for the
specified buffer size. How we I change the buffer size from the SQL
Server Enterprise Manager?
TIA,
Jeffrey
what mechanism where you using to populate your table?
Does this kb apply
http://support.microsoft.com/default...&Product=sql2k
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Jeffrey" <cjeffwang@.gmail.com> wrote in message
news:bb2899d2.0410011423.5bf86f40@.posting.google.c om...
> When populating a table with a column of TEXT datatype, an error
> message was shown, indicating that the data is too large for the
> specified buffer size. How we I change the buffer size from the SQL
> Server Enterprise Manager?
> TIA,
> Jeffrey
|||Jeffery,
Could you provide more information on exactly what error message and error
message number you received?
How were you populating the column with the TEXT datatype? Via an INSERT
statement, BULK INSERT or BCP?
The more precise information we have, the better and faster we can answer
your question!
Thanks,
John
"Jeffrey" <cjeffwang@.gmail.com> wrote in message
news:bb2899d2.0410011423.5bf86f40@.posting.google.c om...
> When populating a table with a column of TEXT datatype, an error
> message was shown, indicating that the data is too large for the
> specified buffer size. How we I change the buffer size from the SQL
> Server Enterprise Manager?
> TIA,
> Jeffrey
|||John,
I tried to populate a table of a SQL Server database with an Excel
data file. To import the data file I opened the DTS Import/Export
wizard from Enterprise Manager. The datatype of the column is TEXT
and the error message indicated that the text data is too large for
the specified buffer size.
How do I cahnge the buffer size of the database or the column?
Thanks,
Jeffrey
"John Kane" <jt-kane@.comcast.net> wrote in message news:<#FVNToAqEHA.592@.TK2MSFTNGP11.phx.gbl>...[vbcol=seagreen]
> Jeffery,
> Could you provide more information on exactly what error message and error
> message number you received?
> How were you populating the column with the TEXT datatype? Via an INSERT
> statement, BULK INSERT or BCP?
> The more precise information we have, the better and faster we can answer
> your question!
> Thanks,
> John
>
> "Jeffrey" <cjeffwang@.gmail.com> wrote in message
> news:bb2899d2.0410011423.5bf86f40@.posting.google.c om...

Friday, February 24, 2012

Cell Spanning Multiple Rows

I have a report where the first column needs to be spanned over multiple rows. The first column is part of a group, just the group name is shown on the detail row with the details. The data looked like this:
Group1 Detail 1
Group1 Detail 2
Group1 Detail 3
Group2 Detail 1
Group2 Detail 2
But I dont want the first column to repeat so it looks like this:
Group1 Detail 1
Detail 2
Detail 3
Group2 Detail 1
Detail 2
I tried to use the "Hide Duplicates" option on the group column textbox, but the borders for the textbox still show up. I could not find a simple way to get the first column to span all the rows in the group, so what I did was take the detail columns and put them in their own table and nest it in the group header row. That worked great but here is the problem:
The first column's data pushes the textbox to display 5 lines of text, but the detail may only have 1 line of data. It worked fine in the designer, but when rendered to HTML the lone detail line was aligned to the bottom of the group row. Even though the nested table's vertical alignment property is set to top, it was ignored.
I have service pack 1 installed, so I'm on the latest version. Any Ideas guys?Tables support cells that span multiple cells. When you select an entire row
an Merge Cells icon becomes active on in the Toolbar area Report Designer.
See the Merge Cells section at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSCREATE/htm/rcr_creating_structure_objects_v1_2esl.asp
for more information.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"JRodman" <JRodman@.discussions.microsoft.com> wrote in message
news:BCCC1E74-354B-40F4-8938-B71C50DFF9A1@.microsoft.com...
> I have a report where the first column needs to be spanned over multiple
rows. The first column is part of a group, just the group name is shown on
the detail row with the details. The data looked like this:
> Group1 Detail 1
> Group1 Detail 2
> Group1 Detail 3
> Group2 Detail 1
> Group2 Detail 2
> But I dont want the first column to repeat so it looks like this:
> Group1 Detail 1
> Detail 2
> Detail 3
> Group2 Detail 1
> Detail 2
> I tried to use the "Hide Duplicates" option on the group column textbox,
but the borders for the textbox still show up. I could not find a simple way
to get the first column to span all the rows in the group, so what I did was
take the detail columns and put them in their own table and nest it in the
group header row. That worked great but here is the problem:
> The first column's data pushes the textbox to display 5 lines of text, but
the detail may only have 1 line of data. It worked fine in the designer, but
when rendered to HTML the lone detail line was aligned to the bottom of the
group row. Even though the nested table's vertical alignment property is set
to top, it was ignored.
> I have service pack 1 installed, so I'm on the latest version. Any Ideas
guys?
TableSpanCells.rdl
---
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefini
tion"
xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<RightMargin>1in</RightMargin>
<Body>
<ReportItems>
<Table Name="table1">
<Height>1in</Height>
<Style />
<Header>
<TableRows>
<TableRow>
<Height>0.25in</Height>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox1">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>10</ZIndex>
<rd:DefaultName>textbox1</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>Country</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox2">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>9</ZIndex>
<rd:DefaultName>textbox2</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox3">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>8</ZIndex>
<rd:DefaultName>textbox3</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
</TableRows>
</Header>
<Details>
<TableRows>
<TableRow>
<Height>0.25in</Height>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox4">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>2</ZIndex>
<rd:DefaultName>textbox4</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="City">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>1</ZIndex>
<rd:DefaultName>City</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!City.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox6">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<rd:DefaultName>textbox6</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
</TableRows>
</Details>
<DataSetName>DataSet1</DataSetName>
<Top>0.125in</Top>
<TableGroups>
<TableGroup>
<Header>
<TableRows>
<TableRow>
<Height>0.25in</Height>
<TableCells>
<TableCell>
<ColSpan>2</ColSpan>
<ReportItems>
<Textbox Name="Country">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BorderStyle>
<Top>Solid</Top>
</BorderStyle>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>7</ZIndex>
<rd:DefaultName>Country</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!Country.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox12">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>6</ZIndex>
<rd:DefaultName>textbox12</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
</TableRows>
<RepeatOnNewPage>true</RepeatOnNewPage>
</Header>
<Grouping Name="CountryGroup">
<GroupExpressions>
<GroupExpression>=Fields!Country.Value</GroupExpression>
</GroupExpressions>
<PageBreakAtEnd>true</PageBreakAtEnd>
</Grouping>
</TableGroup>
</TableGroups>
<Footer>
<TableRows>
<TableRow>
<Height>0.25in</Height>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox7">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>5</ZIndex>
<rd:DefaultName>textbox7</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox8">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>4</ZIndex>
<rd:DefaultName>textbox8</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox9">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>3</ZIndex>
<rd:DefaultName>textbox9</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
</TableRows>
</Footer>
<Left>0.125in</Left>
<TableColumns>
<TableColumn>
<Width>2.16667in</Width>
</TableColumn>
<TableColumn>
<Width>2.16667in</Width>
</TableColumn>
<TableColumn>
<Width>2.16667in</Width>
</TableColumn>
</TableColumns>
</Table>
</ReportItems>
<Style />
<Height>1.375in</Height>
</Body>
<TopMargin>1in</TopMargin>
<DataSources>
<DataSource Name="Northwind">
<rd:DataSourceID>d5774a08-d8e5-4e74-a663-f500669d7aba</rd:DataSourceID>
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString>data source=localhost;initial
catalog=Northwind</ConnectString>
<IntegratedSecurity>true</IntegratedSecurity>
</ConnectionProperties>
</DataSource>
</DataSources>
<Width>6.62501in</Width>
<DataSets>
<DataSet Name="DataSet1">
<Fields>
<Field Name="CustomerID">
<DataField>CustomerID</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="CompanyName">
<DataField>CompanyName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="ContactName">
<DataField>ContactName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="ContactTitle">
<DataField>ContactTitle</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Address">
<DataField>Address</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="City">
<DataField>City</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Region">
<DataField>Region</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="PostalCode">
<DataField>PostalCode</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Country">
<DataField>Country</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Phone">
<DataField>Phone</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Fax">
<DataField>Fax</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>Northwind</DataSourceName>
<CommandText>SELECT Customers.*
FROM Customers
ORDER BY Country</CommandText>
</Query>
</DataSet>
</DataSets>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>4f653deb-b9af-49ca-98e1-fe972d395f88</rd:ReportID>
<BottomMargin>1in</BottomMargin>
<Language>en-US</Language>
</Report>|||You have a couple of options for row spanning:
Hide the cell that contains the group field using Previous():
<Hidden>=iif(Fields!Country.Value = Previous(Fields!Country.Value),
true, false)</Hidden>
Use a matrix that does not contain row groups or detail cells.
A sample report that demonstrates both approaches is at the end of this
posting.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"JRodman" <JRodman@.discussions.microsoft.com> wrote in message
news:818FDD2E-9ED1-41D1-AD0B-3BB95EE85D78@.microsoft.com...
> What I am attempting to do is span ROWS not columns. Any ideas how to do
this without using the "Hide Duplicates" option?
> "Bruce Johnson [MSFT]" wrote:
> > Tables support cells that span multiple cells. When you select an entire
row
> > an Merge Cells icon becomes active on in the Toolbar area Report
Designer.
> > See the Merge Cells section at
> >
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSCREATE/htm/rcr_creating_structure_objects_v1_2esl.asp
> > for more information.
> > --
> > Bruce Johnson [MSFT]
> > Microsoft SQL Server Reporting Services
> >
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "JRodman" <JRodman@.discussions.microsoft.com> wrote in message
> > news:BCCC1E74-354B-40F4-8938-B71C50DFF9A1@.microsoft.com...
> > > I have a report where the first column needs to be spanned over
multiple
> > rows. The first column is part of a group, just the group name is shown
on
> > the detail row with the details. The data looked like this:
> > >
> > > Group1 Detail 1
> > > Group1 Detail 2
> > > Group1 Detail 3
> > > Group2 Detail 1
> > > Group2 Detail 2
> > >
> > > But I dont want the first column to repeat so it looks like this:
> > >
> > > Group1 Detail 1
> > > Detail 2
> > > Detail 3
> > > Group2 Detail 1
> > > Detail 2
> > >
> > > I tried to use the "Hide Duplicates" option on the group column
textbox,
> > but the borders for the textbox still show up. I could not find a simple
way
> > to get the first column to span all the rows in the group, so what I did
was
> > take the detail columns and put them in their own table and nest it in
the
> > group header row. That worked great but here is the problem:
> > >
> > > The first column's data pushes the textbox to display 5 lines of text,
but
> > the detail may only have 1 line of data. It worked fine in the designer,
but
> > when rendered to HTML the lone detail line was aligned to the bottom of
the
> > group row. Even though the nested table's vertical alignment property is
set
> > to top, it was ignored.
> > >
> > > I have service pack 1 installed, so I'm on the latest version. Any
Ideas
> > guys?
> >
SpanRows.rdl
---
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefini
tion"
xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<RightMargin>1in</RightMargin>
<Body>
<ReportItems>
<Matrix Name="matrix1">
<Corner>
<ReportItems>
<Textbox Name="textbox4">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>4</ZIndex>
<rd:DefaultName>textbox4</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</Corner>
<Height>0.5in</Height>
<ZIndex>2</ZIndex>
<Style />
<MatrixRows>
<MatrixRow>
<MatrixCells>
<MatrixCell>
<ReportItems>
<Textbox Name="textbox11">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<rd:DefaultName>textbox11</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</MatrixCell>
</MatrixCells>
<Height>0.25in</Height>
</MatrixRow>
</MatrixRows>
<MatrixColumns>
<MatrixColumn>
<Width>0.125in</Width>
</MatrixColumn>
</MatrixColumns>
<DataSetName>DataSet1</DataSetName>
<ColumnGroupings>
<ColumnGrouping>
<DynamicColumns>
<Grouping Name="matrix1_ColumnGroup1">
<GroupExpressions>
<GroupExpression />
</GroupExpressions>
</Grouping>
<ReportItems>
<Textbox Name="textbox5">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>3</ZIndex>
<rd:DefaultName>textbox5</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</DynamicColumns>
<Height>0.25in</Height>
</ColumnGrouping>
</ColumnGroupings>
<Width>2.125in</Width>
<Top>1.25in</Top>
<RowGroupings>
<RowGrouping>
<DynamicRows>
<Grouping Name="matrix1_Country">
<GroupExpressions>
<GroupExpression>=Fields!Country.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<ReportItems>
<Textbox Name="Country_1">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>2</ZIndex>
<rd:DefaultName>Country_1</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!Country.Value</Value>
</Textbox>
</ReportItems>
</DynamicRows>
<Width>1in</Width>
</RowGrouping>
<RowGrouping>
<DynamicRows>
<Grouping Name="matrix1_City">
<GroupExpressions>
<GroupExpression>=Fields!City.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<ReportItems>
<Textbox Name="City_1">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>1</ZIndex>
<rd:DefaultName>City_1</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!City.Value</Value>
</Textbox>
</ReportItems>
</DynamicRows>
<Width>1in</Width>
</RowGrouping>
</RowGroupings>
</Matrix>
<Table Name="table1">
<Height>0.75in</Height>
<ZIndex>1</ZIndex>
<Style />
<Header>
<TableRows>
<TableRow>
<Height>0.25in</Height>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox1">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>8</ZIndex>
<rd:DefaultName>textbox1</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>Country</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox2">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>7</ZIndex>
<rd:DefaultName>textbox2</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>City</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox3">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>6</ZIndex>
<rd:DefaultName>textbox3</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
</TableRows>
</Header>
<Details>
<TableRows>
<TableRow>
<Height>0.25in</Height>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="Country">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>2</ZIndex>
<Visibility>
<Hidden>=iif(Fields!Country.Value =Previous(Fields!Country.Value), true, false)</Hidden>
</Visibility>
<rd:DefaultName>Country</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!Country.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="City">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>1</ZIndex>
<rd:DefaultName>City</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!City.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox6">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<rd:DefaultName>textbox6</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
</TableRows>
</Details>
<DataSetName>DataSet1</DataSetName>
<TableGroups>
<TableGroup>
<Grouping Name="table1_Group1">
<GroupExpressions>
<GroupExpression>=Fields!Country.Value</GroupExpression>
</GroupExpressions>
</Grouping>
</TableGroup>
</TableGroups>
<Footer>
<TableRows>
<TableRow>
<Height>0.25in</Height>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox7">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>5</ZIndex>
<rd:DefaultName>textbox7</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox8">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>4</ZIndex>
<rd:DefaultName>textbox8</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox9">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>3</ZIndex>
<rd:DefaultName>textbox9</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
</TableRows>
</Footer>
<TableColumns>
<TableColumn>
<Width>2.20834in</Width>
</TableColumn>
<TableColumn>
<Width>2.20834in</Width>
</TableColumn>
<TableColumn>
<Width>2.20834in</Width>
</TableColumn>
</TableColumns>
</Table>
<Line Name="line1">
<Top>1in</Top>
<Height>0in</Height>
<Width>6.375in</Width>
<Style>
<BorderWidth>
<Default>4pt</Default>
</BorderWidth>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
<Left>0.125in</Left>
</Line>
</ReportItems>
<Style />
<Height>2.75in</Height>
</Body>
<TopMargin>1in</TopMargin>
<DataSources>
<DataSource Name="Northwind">
<rd:DataSourceID>e1d9b0a0-afac-4bfc-b4d3-342bf39c17d4</rd:DataSourceID>
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString>data source=localhost;initial
catalog=Northwind</ConnectString>
<IntegratedSecurity>true</IntegratedSecurity>
</ConnectionProperties>
</DataSource>
</DataSources>
<Width>6.62502in</Width>
<DataSets>
<DataSet Name="DataSet1">
<Fields>
<Field Name="CustomerID">
<DataField>CustomerID</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="CompanyName">
<DataField>CompanyName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="ContactName">
<DataField>ContactName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="ContactTitle">
<DataField>ContactTitle</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Address">
<DataField>Address</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="City">
<DataField>City</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Region">
<DataField>Region</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="PostalCode">
<DataField>PostalCode</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Country">
<DataField>Country</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Phone">
<DataField>Phone</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Fax">
<DataField>Fax</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>Northwind</DataSourceName>
<CommandText>select * from customers</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
</DataSet>
</DataSets>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>4f653deb-b9af-49ca-98e1-fe972d395f88</rd:ReportID>
<BottomMargin>1in</BottomMargin>
<Language>en-US</Language>
</Report>

Friday, February 10, 2012

Cast and convert

How do I convert a colomn that is of data type varbinary to varchar so that the hex values saved there are shown as readable text usable with crystal reports.In SQL2K there is a function
master.dbo.fn_varbintohexstr (@.pbinin varbinary(8000) ) returns
nvarchar(4000)
Don't know why @.pbinin is varbinary(8000), since nvarchar(4000) can only
handle 2000 bytes!
It's just pretty simple code for doing the translation; if nvarchar(4000)
doesn't suit you, the source for the function is easy to modify (to create a
different function!)
"shaun" <shaun@.discussions.microsoft.com> wrote in message
news:F8EAF61A-2844-4C7C-BE22-46C72B9A7A77@.microsoft.com...
> How do I convert a colomn that is of data type varbinary to varchar so
that the hex values saved there are shown as readable text usable with
crystal reports.