Hello,
I have to put some data from an SQL Server 2000 DB to a
Word document containing some numeric values (money).
I use a stored procedure like this
select field1 + ' ' + field2 + ' ' + field3 ...
from table1 where ...
So I get back one long string. How can I get all numeric
values in this string formatted? There is no format
function like in VB/A.
Second: I'd like to have a tab (Ascii 9) instead of ' ':
How can I get this?
Klaus
www.trappdata.deFormatted like what?
Take a look at this
DECLARE @.v MONEY
SELECT @.v = 1322323.6666
SELECT CONVERT(VARCHAR,@.v,0) --1322323.67 Rounded but not formatted
SELECT CONVERT(VARCHAR,@.v,1) --1,322,323.67 Formatted with commas
SELECT CONVERT(VARCHAR,@.v,2) --1322323.6666 No formatting
If you have a decimal field it doesn't work with the convert function.
The work around is to cast it to money
DECLARE @.v2 DECIMAL (36,10)
SELECT @.v2 = 13243543.56565656
SELECT CONVERT(VARCHAR,CONVERT(MONEY,@.v2),1) --13,243,543.57 Formatted
with commas
http://sqlservercode.blogspot.com/
Showing posts with label document. Show all posts
Showing posts with label document. Show all posts
Monday, March 12, 2012
Formatted Text
I want to build a report that would resemble a Word document. This report
would have a bold header and in the body of the report have a variety of
formatted text (bold, underline, italic, and different size fonts). There may
be differents formats on the same line.
I only see one way to do this and that is with the Textbox control. In this
report I would have to have a lot of Textbox controls in the layout to
generate one report page!
What other way can I accomplish this? Are there third party SQL Reporting
Services controls?Do you mean paragraphs of information with certain words bolded, for
example? That would be difficult, since there isn't a rich text control
yet.
If you mean to have simply repeating headers and paragraphs, similar to Word
headings, then that would be relatively easy using a list control or table
control.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"nickka" <nickka@.discussions.microsoft.com> wrote in message
news:27B6EF1E-0CFA-4328-828C-DD7B72C56572@.microsoft.com...
>I want to build a report that would resemble a Word document. This report
> would have a bold header and in the body of the report have a variety of
> formatted text (bold, underline, italic, and different size fonts). There
> may
> be differents formats on the same line.
> I only see one way to do this and that is with the Textbox control. In
> this
> report I would have to have a lot of Textbox controls in the layout to
> generate one report page!
> What other way can I accomplish this? Are there third party SQL Reporting
> Services controls?|||I mean paragraphs of information and the need for a rich text control.
Can third party controls be installed in SQL Reporting Services? Are there
any third party controls? Is there any information on developing custom
controls?
"Jeff A. Stucker" wrote:
> Do you mean paragraphs of information with certain words bolded, for
> example? That would be difficult, since there isn't a rich text control
> yet.
> If you mean to have simply repeating headers and paragraphs, similar to Word
> headings, then that would be relatively easy using a list control or table
> control.
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "nickka" <nickka@.discussions.microsoft.com> wrote in message
> news:27B6EF1E-0CFA-4328-828C-DD7B72C56572@.microsoft.com...
> >I want to build a report that would resemble a Word document. This report
> > would have a bold header and in the body of the report have a variety of
> > formatted text (bold, underline, italic, and different size fonts). There
> > may
> > be differents formats on the same line.
> >
> > I only see one way to do this and that is with the Textbox control. In
> > this
> > report I would have to have a lot of Textbox controls in the layout to
> > generate one report page!
> >
> > What other way can I accomplish this? Are there third party SQL Reporting
> > Services controls?
>
>|||Third-party controls aren't supported yet, but I think they will in a future
release.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"nickka" <nickka@.discussions.microsoft.com> wrote in message
news:2CDD598F-F70D-4EDC-9520-9AFD50C8F32D@.microsoft.com...
>I mean paragraphs of information and the need for a rich text control.
> Can third party controls be installed in SQL Reporting Services? Are there
> any third party controls? Is there any information on developing custom
> controls?
> "Jeff A. Stucker" wrote:
>> Do you mean paragraphs of information with certain words bolded, for
>> example? That would be difficult, since there isn't a rich text control
>> yet.
>> If you mean to have simply repeating headers and paragraphs, similar to
>> Word
>> headings, then that would be relatively easy using a list control or
>> table
>> control.
>> --
>> Cheers,
>> '(' Jeff A. Stucker
>> \
>> Business Intelligence
>> www.criadvantage.com
>> ---
>> "nickka" <nickka@.discussions.microsoft.com> wrote in message
>> news:27B6EF1E-0CFA-4328-828C-DD7B72C56572@.microsoft.com...
>> >I want to build a report that would resemble a Word document. This
>> >report
>> > would have a bold header and in the body of the report have a variety
>> > of
>> > formatted text (bold, underline, italic, and different size fonts).
>> > There
>> > may
>> > be differents formats on the same line.
>> >
>> > I only see one way to do this and that is with the Textbox control. In
>> > this
>> > report I would have to have a lot of Textbox controls in the layout to
>> > generate one report page!
>> >
>> > What other way can I accomplish this? Are there third party SQL
>> > Reporting
>> > Services controls?
>>
would have a bold header and in the body of the report have a variety of
formatted text (bold, underline, italic, and different size fonts). There may
be differents formats on the same line.
I only see one way to do this and that is with the Textbox control. In this
report I would have to have a lot of Textbox controls in the layout to
generate one report page!
What other way can I accomplish this? Are there third party SQL Reporting
Services controls?Do you mean paragraphs of information with certain words bolded, for
example? That would be difficult, since there isn't a rich text control
yet.
If you mean to have simply repeating headers and paragraphs, similar to Word
headings, then that would be relatively easy using a list control or table
control.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"nickka" <nickka@.discussions.microsoft.com> wrote in message
news:27B6EF1E-0CFA-4328-828C-DD7B72C56572@.microsoft.com...
>I want to build a report that would resemble a Word document. This report
> would have a bold header and in the body of the report have a variety of
> formatted text (bold, underline, italic, and different size fonts). There
> may
> be differents formats on the same line.
> I only see one way to do this and that is with the Textbox control. In
> this
> report I would have to have a lot of Textbox controls in the layout to
> generate one report page!
> What other way can I accomplish this? Are there third party SQL Reporting
> Services controls?|||I mean paragraphs of information and the need for a rich text control.
Can third party controls be installed in SQL Reporting Services? Are there
any third party controls? Is there any information on developing custom
controls?
"Jeff A. Stucker" wrote:
> Do you mean paragraphs of information with certain words bolded, for
> example? That would be difficult, since there isn't a rich text control
> yet.
> If you mean to have simply repeating headers and paragraphs, similar to Word
> headings, then that would be relatively easy using a list control or table
> control.
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "nickka" <nickka@.discussions.microsoft.com> wrote in message
> news:27B6EF1E-0CFA-4328-828C-DD7B72C56572@.microsoft.com...
> >I want to build a report that would resemble a Word document. This report
> > would have a bold header and in the body of the report have a variety of
> > formatted text (bold, underline, italic, and different size fonts). There
> > may
> > be differents formats on the same line.
> >
> > I only see one way to do this and that is with the Textbox control. In
> > this
> > report I would have to have a lot of Textbox controls in the layout to
> > generate one report page!
> >
> > What other way can I accomplish this? Are there third party SQL Reporting
> > Services controls?
>
>|||Third-party controls aren't supported yet, but I think they will in a future
release.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"nickka" <nickka@.discussions.microsoft.com> wrote in message
news:2CDD598F-F70D-4EDC-9520-9AFD50C8F32D@.microsoft.com...
>I mean paragraphs of information and the need for a rich text control.
> Can third party controls be installed in SQL Reporting Services? Are there
> any third party controls? Is there any information on developing custom
> controls?
> "Jeff A. Stucker" wrote:
>> Do you mean paragraphs of information with certain words bolded, for
>> example? That would be difficult, since there isn't a rich text control
>> yet.
>> If you mean to have simply repeating headers and paragraphs, similar to
>> Word
>> headings, then that would be relatively easy using a list control or
>> table
>> control.
>> --
>> Cheers,
>> '(' Jeff A. Stucker
>> \
>> Business Intelligence
>> www.criadvantage.com
>> ---
>> "nickka" <nickka@.discussions.microsoft.com> wrote in message
>> news:27B6EF1E-0CFA-4328-828C-DD7B72C56572@.microsoft.com...
>> >I want to build a report that would resemble a Word document. This
>> >report
>> > would have a bold header and in the body of the report have a variety
>> > of
>> > formatted text (bold, underline, italic, and different size fonts).
>> > There
>> > may
>> > be differents formats on the same line.
>> >
>> > I only see one way to do this and that is with the Textbox control. In
>> > this
>> > report I would have to have a lot of Textbox controls in the layout to
>> > generate one report page!
>> >
>> > What other way can I accomplish this? Are there third party SQL
>> > Reporting
>> > Services controls?
>>
Subscribe to:
Posts (Atom)