Showing posts with label create. Show all posts
Showing posts with label create. Show all posts

Thursday, March 29, 2012

Formula column.

HI,
I have a problem in formula column.
I have 8 1 bit varibles in a table
for ex: Flag1, falg2, flag3 ...Flag8
Now I want to create another variable as a small integer and copy all
the flgas to that field.
For ex:

(flag1 << 0x80) | (flag2 << 0x40) | .... | flag8

I tried all possible ways?

Let me know how to write the formula for this column.

Thanks,
Venkat.Assuming you don't have any NULLs:

(flag1*128 | flag2*64 | flag3*32 | flag4*16 | flag5*8 | flag6*4 | flag7*2 |
flag8*1)

--
David Portas
----
Please reply only to the newsgroup
--

"Venkat" <arunkvrr@.yahoo.com> wrote in message
news:f21476c8.0308281543.145ceff9@.posting.google.c om...
> HI,
> I have a problem in formula column.
> I have 8 1 bit varibles in a table
> for ex: Flag1, falg2, flag3 ...Flag8
> Now I want to create another variable as a small integer and copy all
> the flgas to that field.
> For ex:
> (flag1 << 0x80) | (flag2 << 0x40) | .... | flag8
> I tried all possible ways?
> Let me know how to write the formula for this column.
> Thanks,
> Venkat.

formula column

Hi,
I would like to create a calculated column using the formula
section for a table. I am having some trouble doing this.

The table's name is ReportParameter. The calculated column's name is
tbcalculatedcolumn and tb1 and tb2 are boolean columns in the table.
I would like to use an If then statement such as the following (in
psuedo code):

If tb1 = 1 then tbcalculatedcolumn = 1
Elseif tb2 = 1 then tbcalculatedcolumn = 2
Endif

Thanks for the help,
BillHi

Maybe something like:

CREATE TABLE MyTable ( tb1 bit, tb2 bit, tbcalculatedcolumn AS CASE WHEN
tb1 = 1 then 1
WHEN tb2 = 1 then 2
END )

INSERT INTO MyTable ( tb1, tb2 ) VALUES ( 1,1 )
INSERT INTO MyTable ( tb1, tb2 ) VALUES ( 1,0 )
INSERT INTO MyTable ( tb1, tb2 ) VALUES ( 0,1 )

SELECT * FROM MyTable
/*
tb1 tb2 tbcalculatedcolumn
-- -- ------
1 1 1
1 0 1
0 1 2
*/

John
"Billy Cormic" <billy_cormic@.hotmail.com> wrote in message
news:dd2f7565.0310010526.3ce4be47@.posting.google.c om...
> Hi,
> I would like to create a calculated column using the formula
> section for a table. I am having some trouble doing this.
> The table's name is ReportParameter. The calculated column's name is
> tbcalculatedcolumn and tb1 and tb2 are boolean columns in the table.
> I would like to use an If then statement such as the following (in
> psuedo code):
> If tb1 = 1 then tbcalculatedcolumn = 1
> Elseif tb2 = 1 then tbcalculatedcolumn = 2
> Endif
> Thanks for the help,
> Bill|||> I would like to create a calculated column using the formula
Why? Why not just put a CASE expression in a query or view rather than
create an extra redundant column.

> tbcalculatedcolumn and tb1 and tb2 are boolean columns in the table.
There is no Boolean data type in SQLServer. You mean a numeric column
(presumably BIT).

--
David Portas
----
Please reply only to the newsgroup
--

"Billy Cormic" <billy_cormic@.hotmail.com> wrote in message
news:dd2f7565.0310010526.3ce4be47@.posting.google.c om...
> Hi,
> I would like to create a calculated column using the formula
> section for a table. I am having some trouble doing this.
> The table's name is ReportParameter. The calculated column's name is
> tbcalculatedcolumn and tb1 and tb2 are boolean columns in the table.
> I would like to use an If then statement such as the following (in
> psuedo code):
> If tb1 = 1 then tbcalculatedcolumn = 1
> Elseif tb2 = 1 then tbcalculatedcolumn = 2
> Endif
> Thanks for the help,
> Bill|||Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in
your schema are. Sample data is also a good ideas, along with clear
specifications.

>> The table's name is ReportParameter. <<

That is not a table name; a table is an entity or a relationship. It
is also too vague to be a data element. You need to read a book about
database design.

>> The calculated column's name is "tbcalculatedcolumn" ...<<

Please tell me that "tbl-" is not a silly redundant prefix; and there
is always a better name than "calculated_column" for a calculated
column -- what extactly did you you compute? Interest? discounts? To
be is to be something in particular; to be nothing in particular is to
be nothing.

>> and tb1 and tb2 are boolean columns in the table. <<

There are no BOOLEAN variables in SQL; it would destroy the 3VL. Look
up the CASE expression in any pf the books on SQL you clearly have
never read.|||> There are no BOOLEAN variables in SQL; it would destroy the 3VL.

Aren't Booleans defined in SQL99?|||Yes. Joe goes into denial when confronted with SQL99 ;-)

--
David Portas
----
Please reply only to the newsgroup
--

"Christian Maslen" <christian.maslen@.techie.com> wrote in message
news:b9c8cfba.0310021514.11d51a@.posting.google.com ...
> > There are no BOOLEAN variables in SQL; it would destroy the 3VL.
> Aren't Booleans defined in SQL99?|||>> Joe goes into denial when confronted with SQL99 <<

So does everyone else who worked on the draft documents :)

They had to re-define the foundation to get them into SQL-99 and this
is oneof many reasons nobody is gallopping to SQL-99. The US
government requires SQL-92 and refers to it as "a standard in
progress" in their bid forms.

The problem is that a data type in SQL must be NULL-able; a NULL
doesnto have a data type itself, but holds a place for a value which
may or may not be determined later.

1) The fundamental rule of a NULL is that it propagates.

2) The fundamental rule of 3VL is that your have TRUE, FALSE and
UNKNOWN as the only possible values.

These fundamentals don't go together if you can have a column with a
3VL datatype. The "solution" was to make NULL = UNKNOWN but only in a
BOOLEAN column and then worry about null propagation. This screws up
3VL operators in some pretty awful ways that can drive an SQL engine
nuts:

FALSE OR UNKNOWN = UNKNOWN -- definition of OR
FALSE OR NULL = NULL = UNKNOWN -- null propagation
TRUE OR UNKNOWN = TRUE -- definition of OR
TRUE OR NULL = NULL = UNKNOWN -- null propagation

likewise,

TRUE AND UNKNOWN = UNKNOWN -- definition of AND
TRUE AND NULL = NULL = UNKNOWN -- null propagation
FALSE AND UNKNOWN = FALSE -- definition of AND
FALSE AND NULL = NULL = UNKNOWN -- null propagation

Tuesday, March 27, 2012

Forms Authentication Finally Working!!

I finally got forms authentication to work, but when I create a new user and
log in, I don't get any menus. My question is how do I assign the user I
created access to the appropriate menus (e.g., view report list,
subscriptions, etc.)?
The sample dB is different then the ReportServer dB.Ok I am an idiot and forgot to go into the RSReportServer.config file to
enter the name of the user i created. For all of you that had this problem,
this is what you needed to do!
"Neo" wrote:
> I finally got forms authentication to work, but when I create a new user and
> log in, I don't get any menus. My question is how do I assign the user I
> created access to the appropriate menus (e.g., view report list,
> subscriptions, etc.)?
> The sample dB is different then the ReportServer dB.|||Hi Neo
Where do I include this user in RSReportServer.config. The
<AdminConfiguration> portion in for the admin user I guess....
thanks
Angelo
"Neo" wrote:
> Ok I am an idiot and forgot to go into the RSReportServer.config file to
> enter the name of the user i created. For all of you that had this problem,
> this is what you needed to do!
> "Neo" wrote:
> > I finally got forms authentication to work, but when I create a new user and
> > log in, I don't get any menus. My question is how do I assign the user I
> > created access to the appropriate menus (e.g., view report list,
> > subscriptions, etc.)?
> >
> > The sample dB is different then the ReportServer dB.|||Hi Angelo,
You need to find the <security> element and change the "username." Please
see the sample below:
<Security>
<Extension Name="Forms"
Type="Microsoft.Samples.ReportingServices.CustomSecurity.Authorization,
Microsoft.Samples.ReportingServices.CustomSecurity" >
<Configuration>
<AdminConfiguration>
<UserName>changethistoyourusername</UserName>
</AdminConfiguration>
</Configuration>
</Extension>
</Security>
Sorry about the word wrap. HTH.
"Mathi" wrote:
> Hi Neo
> Where do I include this user in RSReportServer.config. The
> <AdminConfiguration> portion in for the admin user I guess....
> thanks
> Angelo
> "Neo" wrote:
> > Ok I am an idiot and forgot to go into the RSReportServer.config file to
> > enter the name of the user i created. For all of you that had this problem,
> > this is what you needed to do!
> >
> > "Neo" wrote:
> >
> > > I finally got forms authentication to work, but when I create a new user and
> > > log in, I don't get any menus. My question is how do I assign the user I
> > > created access to the appropriate menus (e.g., view report list,
> > > subscriptions, etc.)?
> > >
> > > The sample dB is different then the ReportServer dB.

Monday, March 26, 2012

Formatting text within a text box

Trying to use this tool to create a form letter. I have a text box that has a paragraph of data within that paragraph I'd like to bold a word or underline a word. Is this just a gross misuse of this tool or is there a way to format text within the text box?Unfortunately, Reporting Services alone does not support richly formatted text, such as html or rtf. This is slated for a future release.

In the meantime, if you want to output to Word or Excel, you can use a 3rd party tool, OfficeWriter from SoftArtisans. OfficeWriter

lets you preserve all Excel and Word formatting.

http://officewriter.softartisans.com/officewriter-250.aspx

Ian|||I see other references to this being slated for a future release from last year. Do you know ballpark when that will be? Sometime 07 or later this year?|||

Hi Ran,

Can you tell us roughly when RTF feature would be available? In 6 months? One year? We're using Reporting Services extensively. The missing RTF feature is really painful.

Thanks!

Formatting text within a text box

Trying to use this tool to create a form letter. I have a text box that has a paragraph of data within that paragraph I'd like to bold a word or underline a word. Is this just a gross misuse of this tool or is there a way to format text within the text box?Unfortunately, Reporting Services alone does not support richly formatted text, such as html or rtf. This is slated for a future release.

In the meantime, if you want to output to Word or Excel, you can use a 3rd party tool, OfficeWriter from SoftArtisans. OfficeWriter

lets you preserve all Excel and Word formatting.

http://officewriter.softartisans.com/officewriter-250.aspx

Ian|||I see other references to this being slated for a future release from last year. Do you know ballpark when that will be? Sometime 07 or later this year?|||

Hi Ran,

Can you tell us roughly when RTF feature would be available? In 6 months? One year? We're using Reporting Services extensively. The missing RTF feature is really painful.

Thanks!

Friday, March 23, 2012

formatting smallmoney to 2 decimals

Using SS2000 SP4. Is there anyway to default the smallmoney column to only 2
decimals after the period - i.e. 144.55? When I create the column in EM with
the smallmoney datatype, the precision field is grayed out. Isn't there some
way to put a format code like "####.##" somewhere?
Thanks,
--
Dan D.Hi Dan
"Dan D." wrote:

> Using SS2000 SP4. Is there anyway to default the smallmoney column to only
2
> decimals after the period - i.e. 144.55? When I create the column in EM wi
th
> the smallmoney datatype, the precision field is grayed out. Isn't there so
me
> way to put a format code like "####.##" somewhere?
> Thanks,
> --
> Dan D.
SQL Server will stored smallmoney with 4 decimal places regardless,
formatting output should be done on the client.
John|||Dan
DECIMAL(5,2) or NUMERIC datatypes
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:01B59869-B53E-4442-97AB-94B376C26390@.microsoft.com...
> Using SS2000 SP4. Is there anyway to default the smallmoney column to only
> 2
> decimals after the period - i.e. 144.55? When I create the column in EM
> with
> the smallmoney datatype, the precision field is grayed out. Isn't there
> some
> way to put a format code like "####.##" somewhere?
> Thanks,
> --
> Dan D.|||On 7 May, 14:21, Dan D. <D...@.discussions.microsoft.com> wrote:
> Using SS2000 SP4. Is there anyway to default the smallmoney column to only
2
> decimals after the period - i.e. 144.55? When I create the column in EM wi
th
> the smallmoney datatype, the precision field is grayed out. Isn't there so
me
> way to put a format code like "####.##" somewhere?
> Thanks,
> --
> Dan D.
Use DECIMAL/NUMERIC. Avoid MONEY or SMALLMONEY for currency values,
there are two many problems associated with the money types.
Do remember that SQL Server has no real control over how numeric
values are displayed. In all cases it is your client software that
determines display formatting, not SQL Server.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--sql

formatting smallmoney to 2 decimals

Using SS2000 SP4. Is there anyway to default the smallmoney column to only 2
decimals after the period - i.e. 144.55? When I create the column in EM with
the smallmoney datatype, the precision field is grayed out. Isn't there some
way to put a format code like "####.##" somewhere?
Thanks,
Dan D.
Hi Dan
"Dan D." wrote:

> Using SS2000 SP4. Is there anyway to default the smallmoney column to only 2
> decimals after the period - i.e. 144.55? When I create the column in EM with
> the smallmoney datatype, the precision field is grayed out. Isn't there some
> way to put a format code like "####.##" somewhere?
> Thanks,
> --
> Dan D.
SQL Server will stored smallmoney with 4 decimal places regardless,
formatting output should be done on the client.
John
|||Dan
DECIMAL(5,2) or NUMERIC datatypes
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:01B59869-B53E-4442-97AB-94B376C26390@.microsoft.com...
> Using SS2000 SP4. Is there anyway to default the smallmoney column to only
> 2
> decimals after the period - i.e. 144.55? When I create the column in EM
> with
> the smallmoney datatype, the precision field is grayed out. Isn't there
> some
> way to put a format code like "####.##" somewhere?
> Thanks,
> --
> Dan D.
|||On 7 May, 14:21, Dan D. <D...@.discussions.microsoft.com> wrote:
> Using SS2000 SP4. Is there anyway to default the smallmoney column to only 2
> decimals after the period - i.e. 144.55? When I create the column in EM with
> the smallmoney datatype, the precision field is grayed out. Isn't there some
> way to put a format code like "####.##" somewhere?
> Thanks,
> --
> Dan D.
Use DECIMAL/NUMERIC. Avoid MONEY or SMALLMONEY for currency values,
there are two many problems associated with the money types.
Do remember that SQL Server has no real control over how numeric
values are displayed. In all cases it is your client software that
determines display formatting, not SQL Server.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx

formatting smallmoney to 2 decimals

Using SS2000 SP4. Is there anyway to default the smallmoney column to only 2
decimals after the period - i.e. 144.55? When I create the column in EM with
the smallmoney datatype, the precision field is grayed out. Isn't there some
way to put a format code like "####.##" somewhere?
Thanks,
--
Dan D.Hi Dan
"Dan D." wrote:
> Using SS2000 SP4. Is there anyway to default the smallmoney column to only 2
> decimals after the period - i.e. 144.55? When I create the column in EM with
> the smallmoney datatype, the precision field is grayed out. Isn't there some
> way to put a format code like "####.##" somewhere?
> Thanks,
> --
> Dan D.
SQL Server will stored smallmoney with 4 decimal places regardless,
formatting output should be done on the client.
John|||Dan
DECIMAL(5,2) or NUMERIC datatypes
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:01B59869-B53E-4442-97AB-94B376C26390@.microsoft.com...
> Using SS2000 SP4. Is there anyway to default the smallmoney column to only
> 2
> decimals after the period - i.e. 144.55? When I create the column in EM
> with
> the smallmoney datatype, the precision field is grayed out. Isn't there
> some
> way to put a format code like "####.##" somewhere?
> Thanks,
> --
> Dan D.|||On 7 May, 14:21, Dan D. <D...@.discussions.microsoft.com> wrote:
> Using SS2000 SP4. Is there anyway to default the smallmoney column to only 2
> decimals after the period - i.e. 144.55? When I create the column in EM with
> the smallmoney datatype, the precision field is grayed out. Isn't there some
> way to put a format code like "####.##" somewhere?
> Thanks,
> --
> Dan D.
Use DECIMAL/NUMERIC. Avoid MONEY or SMALLMONEY for currency values,
there are two many problems associated with the money types.
Do remember that SQL Server has no real control over how numeric
values are displayed. In all cases it is your client software that
determines display formatting, not SQL Server.
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--

formatting of reports and blank pages

Why whenever I create a report that is more than 1 page long, do I get a blank page between every page of my report? In VS for example if I create a 3 page report, I get a 6 page report and every other page is blank.

How do you prevent this?

Cheers,

Mike

The culprit is ration of Page Heigth and Page Width. Check in Report-Properties-> Page Width and Page Height. Try setting Width = 31cm and Height = 28cm.

-kushpaw

Wednesday, March 21, 2012

Formatting numbers

Any help on this problem would be greatly appreciated.
I have a field in my database that contanis numbers (i.e. 1, 2, 6, 7
etc.)
I want to create a stored procedure to return these numbers, but
formatted in such a way that they always show a full 10 digits. For
example 7 would be 0000000007 and 243 would be 0000000243 and 120000007
would be 0120000007 etc.
I know in Access something like this could be achieved by doing
format$([MyNumber],"0000000000"). Anyone know how I can do this in SQL?
-JoelSELECT RIGHT('0000000000' + CAST(YourNumberCol AS VARCHAR(10)),10)
Andrew J. Kelly SQL MVP
<jsnation@.gmail.com> wrote in message
news:1133567995.941523.96000@.f14g2000cwb.googlegroups.com...
> Any help on this problem would be greatly appreciated.
> I have a field in my database that contanis numbers (i.e. 1, 2, 6, 7
> etc.)
> I want to create a stored procedure to return these numbers, but
> formatted in such a way that they always show a full 10 digits. For
> example 7 would be 0000000007 and 243 would be 0000000243 and 120000007
> would be 0120000007 etc.
> I know in Access something like this could be achieved by doing
> format$([MyNumber],"0000000000"). Anyone know how I can do this in SQL?
> -Joel
>|||Formatting should be done in your frontend not in SQLServer, but you
could consider this one here:
DECLARE @.Number VARCHAR(10)
SET @.Number = 2
SELECT RIGHT('0000000000' + @.Number,10)
HTH, Jens Suessmeyer.|||DECLARE @.temp TABLE ( test_number INT IDENTITY )
DECLARE @.i INT
SET NOCOUNT ON
SET @.i = 1
-- Insert some dummy values
WHILE @.i < 100
BEGIN
INSERT INTO @.temp DEFAULT VALUES
SET @.i = @.i + 1
END
SET NOCOUNT OFF
SELECT REPLICATE ( 0 , 10-LEN( test_number ) ) + CAST( test_number AS
VARCHAR )
FROM @.temp
-- Damien
"jsnation@.gmail.com" wrote:

> Any help on this problem would be greatly appreciated.
> I have a field in my database that contanis numbers (i.e. 1, 2, 6, 7
> etc.)
> I want to create a stored procedure to return these numbers, but
> formatted in such a way that they always show a full 10 digits. For
> example 7 would be 0000000007 and 243 would be 0000000243 and 120000007
> would be 0120000007 etc.
> I know in Access something like this could be achieved by doing
> format$([MyNumber],"0000000000"). Anyone know how I can do this in SQL?
> -Joel
>|||>> have a field [sic] in my database ..<<
Let's get back to the basics of an RDBMS. Rows are not records; fields
are not columns; tables are not files.
The basic principle of a tiered architecture is that display is done in
the front end and never in the back end. This a more basic programming
principle than just SQL and RDBMS.
You are asking BAAAAAD questions from fundamental ignorance. Please
get a few eyars under your belt before you try to write a database.
Remember, it takes SIX years to become a Union Journeyman Carpenter
(NOT a Master!) in New York State. How long have you been writing SQL?|||Wrong! Formatting (display) is done where it is most efficient and scalable
to do it. We aren't using mainframes anymore, it matters how much data is
passed between the server and client/middle tier.
The most basic programming principle is that you look at your architecture
and design for what you have and not implement definitive statements likes
yours willy nilly.
Consider - paging, pivoting etc... is it really efficient to pass back a
million rows to the client just to get the second page of 50 rows? Nope, it
isn't - but thats what your statement proposes.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"--CELKO--" <jcelko212@.earthlink.net> wrote in message
news:1133666034.583452.191970@.g43g2000cwa.googlegroups.com...
> Let's get back to the basics of an RDBMS. Rows are not records; fields
> are not columns; tables are not files.
>
> The basic principle of a tiered architecture is that display is done in
> the front end and never in the back end. This a more basic programming
> principle than just SQL and RDBMS.
> You are asking BAAAAAD questions from fundamental ignorance. Please
> get a few eyars under your belt before you try to write a database.
> Remember, it takes SIX years to become a Union Journeyman Carpenter
> (NOT a Master!) in New York State. How long have you been writing SQL?
>|||Hi
I think, most efficient way will be
Select Replace(Str(m, n), ' ', '0')
Where m is actual number and n is required length
e.g. Select Replace(Str(8, 10), ' ', '0')
will return 0000000008
Prashant Deshmukh
"jsnation@.gmail.com" wrote:

> Any help on this problem would be greatly appreciated.
> I have a field in my database that contanis numbers (i.e. 1, 2, 6, 7
> etc.)
> I want to create a stored procedure to return these numbers, but
> formatted in such a way that they always show a full 10 digits. For
> example 7 would be 0000000007 and 243 would be 0000000243 and 120000007
> would be 0120000007 etc.
> I know in Access something like this could be achieved by doing
> format$([MyNumber],"0000000000"). Anyone know how I can do this in SQL?
> -Joel
>sql

Formatting Issues

Is there a way to create a report where the data appears vertically in
multiple "columns" with lines around each column and multiple fields in each
column of differing data lengths.
I can do this in Crystal Reports but can't seem to find a way to do it in SQL.
The problem is that the data in one column affects the data in another
column as far as the formatting columns. I get extra white space.
I can't concantenate all of the data together because I need to bold the
labels.
Here is what I want:
ColumnHeader1 ColumnHeader2
some data Label 1:
vs. This data will go past
other data one line
Label 2:
This data can also be
multiple lines
Here is what I get:
ColumnHeader1 ColumnHeader2
some data Label 1:
vs. This data will go past
one line
other data
Label 2:
This data can also be
multiple lines
Because the 2nd row in ColumnHeader2 is 2 lines it pushes the data in the
2nd row in ColumnHeader1 down 2 lines as well.
I have tried using tables, list boxes, and subreports. None of them work .
. . especially with trying to add lines around each column. The top line
will appear only on the first page and the bottom line only on the last page.
The left and right border lines also get messed up.On Dec 7, 5:14 pm, Orne <polysilly...@.yahoo.com> wrote:
> On Dec 7, 2:57 pm, Anonymous <Anonym...@.discussions.microsoft.com>
> wrote:
>
> > Is there a way to create a report where the data appears vertically in
> > multiple "columns" with lines around each column and multiple fields in each
> > column of differing data lengths.
> > I can do this in Crystal Reports but can't seem to find a way to do it in SQL.
> > The problem is that the data in one column affects the data in another
> > column as far as the formatting columns. I get extra white space.
> > I can't concantenate all of the data together because I need to bold the
> > labels.
> > Here is what I want:
> > ColumnHeader1 ColumnHeader2
> > some data Label 1:
> > vs. This data will go past
> > other data one line
> > Label 2:
> > This data can also be
> > multiple lines
> > Here is what I get:
> > ColumnHeader1 ColumnHeader2
> > some data Label 1:
> > vs. This data will go past
> > one line
> > other data
> > Label 2:
> > This data can also be
> > multiple lines
> > Because the 2nd row in ColumnHeader2 is 2 lines it pushes the data in the
> > 2nd row in ColumnHeader1 down 2 lines as well.
> > I have tried using tables, list boxes, and subreports. None of them work .
> > . . especially with trying to add lines around each column. The top line
> > will appear only on the first page and the bottom line only on the last page.
> > The left and right border lines also get messed up.
> Create two Rectangle objects side-by-side, then drag all of your
> Column 1 data into the left Rectangle, and drag all of the Column 2
> data into the right rectangle. Make sure that the two are Top
> aligned, and the right of the first rectangle is against the left of
> the second rectangle.
> Rectangles act like DIV tags in HTML, everything inside them will be
> rendered in its own space.
> -- Scott
I agree with Scott. I just wanted to mention that to add report based
columns, in case you don't know, you would do the following:
Click the Layout tab in BIDS >> select the Report drop-down at the top
>> select Report Properties... >> select the Layout tab >> select the
number of Columns and spacing between them.
Of course, if used in this scenario could yield negative formatting
results; however, it could be considered.
Regards,
Enrique Martinez
Sr. Software Consultant|||I created the rectangles but the report only shows the first record. Is
there something else I need to do or will this not work for what I want to do?
There are 53 records and the report should show 1 record per page.
"Orne" wrote:
> On Dec 7, 2:57 pm, Anonymous <Anonym...@.discussions.microsoft.com>
> wrote:
> > Is there a way to create a report where the data appears vertically in
> > multiple "columns" with lines around each column and multiple fields in each
> > column of differing data lengths.
> >
> > I can do this in Crystal Reports but can't seem to find a way to do it in SQL.
> >
> > The problem is that the data in one column affects the data in another
> > column as far as the formatting columns. I get extra white space.
> >
> > I can't concantenate all of the data together because I need to bold the
> > labels.
> >
> > Here is what I want:
> >
> > ColumnHeader1 ColumnHeader2
> > some data Label 1:
> > vs. This data will go past
> > other data one line
> >
> > Label 2:
> > This data can also be
> > multiple lines
> >
> > Here is what I get:
> >
> > ColumnHeader1 ColumnHeader2
> > some data Label 1:
> > vs. This data will go past
> > one line
> > other data
> > Label 2:
> > This data can also be
> > multiple lines
> >
> > Because the 2nd row in ColumnHeader2 is 2 lines it pushes the data in the
> > 2nd row in ColumnHeader1 down 2 lines as well.
> >
> > I have tried using tables, list boxes, and subreports. None of them work .
> > . . especially with trying to add lines around each column. The top line
> > will appear only on the first page and the bottom line only on the last page.
> > The left and right border lines also get messed up.
> Create two Rectangle objects side-by-side, then drag all of your
> Column 1 data into the left Rectangle, and drag all of the Column 2
> data into the right rectangle. Make sure that the two are Top
> aligned, and the right of the first rectangle is against the left of
> the second rectangle.
> Rectangles act like DIV tags in HTML, everything inside them will be
> rendered in its own space.
> -- Scott
>|||On Dec 10, 12:18 pm, Anonymous <Anonym...@.discussions.microsoft.com>
wrote:
> I created the rectangles but the report only shows the first record. Is
> there something else I need to do or will this not work for what I want to do?
> There are 53 records and the report should show 1 record per page.
>
> "Orne" wrote:
> > On Dec 7, 2:57 pm, Anonymous <Anonym...@.discussions.microsoft.com>
> > wrote:
> > > Is there a way to create a report where the data appears vertically in
> > > multiple "columns" with lines around each column and multiple fields in each
> > > column of differing data lengths.
> > > I can do this in Crystal Reports but can't seem to find a way to do it in SQL.
> > > The problem is that the data in one column affects the data in another
> > > column as far as the formatting columns. I get extra white space.
> > > I can't concantenate all of the data together because I need to bold the
> > > labels.
> > > Here is what I want:
> > > ColumnHeader1 ColumnHeader2
> > > some data Label 1:
> > > vs. This data will go past
> > > other data one line
> > > Label 2:
> > > This data can also be
> > > multiple lines
> > > Here is what I get:
> > > ColumnHeader1 ColumnHeader2
> > > some data Label 1:
> > > vs. This data will go past
> > > one line
> > > other data
> > > Label 2:
> > > This data can also be
> > > multiple lines
> > > Because the 2nd row in ColumnHeader2 is 2 lines it pushes the data in the
> > > 2nd row in ColumnHeader1 down 2 lines as well.
> > > I have tried using tables, list boxes, and subreports. None of them work .
> > > . . especially with trying to add lines around each column. The top line
> > > will appear only on the first page and the bottom line only on the last page.
> > > The left and right border lines also get messed up.
> > Create two Rectangle objects side-by-side, then drag all of your
> > Column 1 data into the left Rectangle, and drag all of the Column 2
> > data into the right rectangle. Make sure that the two are Top
> > aligned, and the right of the first rectangle is against the left of
> > the second rectangle.
> > Rectangles act like DIV tags in HTML, everything inside them will be
> > rendered in its own space.
> > -- Scott- Hide quoted text -
> - Show quoted text -
Oh, umm, I assumed you were using Table objects, not TextBox. The
table will repeat whatever is in its details section for every record
in your DataSet. Check the expression in your boxes; if it says
=First( Fields!... ) then it will only return the data in the first
record.
If you want one record per page, create a List object, and drag the
items into the list. right click on it and go to the List Properties,
and check the Page Break at end checkbox. I think that should create
your one record per page.
-- Scott|||On Dec 7, 2:57 pm, Anonymous <Anonym...@.discussions.microsoft.com>
wrote:
> Is there a way to create a report where the data appears vertically in
> multiple "columns" with lines around each column and multiple fields in each
> column of differing data lengths.
> I can do this in Crystal Reports but can't seem to find a way to do it in SQL.
> The problem is that the data in one column affects the data in another
> column as far as the formatting columns. I get extra white space.
> I can't concantenate all of the data together because I need to bold the
> labels.
> Here is what I want:
> ColumnHeader1 ColumnHeader2
> some data Label 1:
> vs. This data will go past
> other data one line
> Label 2:
> This data can also be
> multiple lines
> Here is what I get:
> ColumnHeader1 ColumnHeader2
> some data Label 1:
> vs. This data will go past
> one line
> other data
> Label 2:
> This data can also be
> multiple lines
> Because the 2nd row in ColumnHeader2 is 2 lines it pushes the data in the
> 2nd row in ColumnHeader1 down 2 lines as well.
> I have tried using tables, list boxes, and subreports. None of them work .
> . . especially with trying to add lines around each column. The top line
> will appear only on the first page and the bottom line only on the last page.
> The left and right border lines also get messed up.
Create two Rectangle objects side-by-side, then drag all of your
Column 1 data into the left Rectangle, and drag all of the Column 2
data into the right rectangle. Make sure that the two are Top
aligned, and the right of the first rectangle is against the left of
the second rectangle.
Rectangles act like DIV tags in HTML, everything inside them will be
rendered in its own space.
-- Scott

Formatting Drill Down Reports

Morning all,

I'm using report builder to create reports on Employee information. When the report is viewed through Report Manager you get the automatically generated drill down reports wherever there is a relation in your data model. This i'm sure everyone knows.

My question is, when navigating through these automatically created reports is there anyway to format the output, I only ask because the reports created are often created with two colomns which span the entire web page the first column is left justified and the second is right justified creating a huge gap in the middle. Couple this with the fact that there are no borders seperating the rows and the rows become very hard to match up.

Any info is much appreciated, thanksWhile creating a model, you can see entities having attributes. Select entities and open property window which will display all the available properties for entities. Now select property defaultdetailedattributes, here you can select fields to be displayed for drilldown reports.

You can set attribute size by selecting available attribute in the entity. Select attribute> properties > width for adjusting field size for drillthrough reports.

By default, model will take width of each fields same as in database schema. It may possible that some fields are long in size e.g. String data fields

I hope this will be helpful to you

Monday, March 12, 2012

Formatting "scoped" calculated members

Hi,

How do I format calculated members that have been modified in a Scope-statement?

Example:

CREATE MEMBER CURRENTCUBE.Test1
AS NULL,
FORMAT_STRING = "#,#.00",
NON_EMPTY_BEHAVIOR = { [Measure1], [Measure2] },
VISIBLE = 1 ;

SCOPE ([Company].[Company].children,[Measures].[Test1]);
This = [Measures].[Measure1]/[Measures].[Measure2];
END SCOPE;

My calculated member "Test1" looses its formatting in the Scope-statement and is therefore no longer formatted as "#,#.00". How can I change this?

Try the following:

CREATE MEMBER CURRENTCUBE.Test1
AS NULL,
FORMAT_STRING = "#,#.00",
NON_EMPTY_BEHAVIOR = { [Measure1], [Measure2] },
VISIBLE = 1 ;

SCOPE ([Company].[Company].children,[Measures].[Test1]);
This = [Measures].[Measure1]/[Measures].[Measure2];
FORMAT_STRING(THIS) = '#,#.00';
END SCOPE;

formatted file using stored procedure

how do i create a formatted file using a stored procedure?

for eg. if i have the following...

date : 5th April : should occupy 6 spaces (numeric) (05/04/2003)
Place: London : should occupy 20 spaces (text).
Country: United Kingdom should occupy 20 spaces (text)
EOL Terminator: (1 character only)
:
:
:

the sample final output should be like:

050403London United Kingdom
050403Washington DC USA
050403Delhi India

any quick help is appreciated,earlier post discarded the spaces between the sample records... it should reas as

050403London^^^^^^^^^^^^^^United Kingdom^^^^^^
:
:

where ^ denotes a blank space.

regards|||In your SELECT statement CONVERT the text fields to fix length CHAR. So if City needs to be 40 characters it is CONVERT(CHAR(40), City). You can run the stored procedure from ISQL using -h-1 so no header get printed

C:\>isql -E -S -Q"select status,CONVERT(CHAR(35),name)+CONVERT
(char(10),crdate,103) from sysobjects where type='S'" -h-1

-2147483645 sysobjects 13/11/1998
-2147483643 sysindexes 13/11/1998
-2147483645 syscolumns 13/11/1998
-2147483645 systypes 13/11/1998
-2147483647 syscomments 13/11/1998
-2147483648 sysfiles1 13/11/1998
-2147483647 syspermissions 13/11/1998

Substitue the SELECT with your stored procedure. Or even better use BCP.

formating values in chart

hello to every bodu. well i am truing to create a line chart in sql server reporting services and when in the data field i put the division of 2 values. i want to have a % represerntation

does anybody knows how i can achieve that?

than u in advance

Moving to Reporting Services forum.|||

Steps:

* open the chart properties dialog by right-clicking on the chart
* go to the Y-axis tab
* set the Format code property to e.g. P1 (which results in percentage value formatting with precision of 1)

-- Robert

Friday, March 9, 2012

Formating a box??

Hi everyone, Im using SSRS 2000 and I was wondering is there a way to
create a click button? I have 2 reports linked with hyperlinks but I
wanted to make it look more presentable. So, instead of just clicking
on the words, if I had a box that looked like a click button would be
more presentable.
Thanks in advance,
AbnerOn Oct 15, 3:51 pm, abz <abz81s...@.gmail.com> wrote:
> Hi everyone, Im using SSRS 2000 and I was wondering is there a way to
> create a click button? I have 2 reports linked with hyperlinks but I
> wanted to make it look more presentable. So, instead of just clicking
> on the words, if I had a box that looked like a click button would be
> more presentable.
> Thanks in advance,
> Abner
No, I'm afraid not. The best way to create this functionality is to
create an ASP.NET application that interacts w/SSRS. Sorry that I
could not be of greater assistance.
Regards,
Enrique Martinez
Sr. Software Consultant|||On Oct 15, 5:40 pm, EMartinez <emartinez...@.gmail.com> wrote:
> On Oct 15, 3:51 pm, abz <abz81s...@.gmail.com> wrote:
> > Hi everyone, Im using SSRS 2000 and I was wondering is there a way to
> > create a click button? I have 2 reports linked with hyperlinks but I
> > wanted to make it look more presentable. So, instead of just clicking
> > on the words, if I had a box that looked like a click button would be
> > more presentable.
> > Thanks in advance,
> > Abner
> No, I'm afraid not. The best way to create this functionality is to
> create an ASP.NET application that interacts w/SSRS. Sorry that I
> could not be of greater assistance.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
oh ok, thanks any way.

Format_String Currency lost by division

Hello!

I use AS 2005 SP1.

If I create a calculated measure "C" with a currency measure ("A") and a non-currency measeasure ("B") like
C=A/B
and define the format_string for the calculated measure as currency. The result is still a non-currency value. Why?

Thanks in advance!
Ole JepsenIf you explicitly specified FORMAT_STRING='Currency' for the calculated measure C, then it will be formatted as currency.

Wednesday, March 7, 2012

Format result of sp_helpdb

Hello.

How to format field "create" (Jan 12 2005) in sp_helpdb
procedure to sth like yyyy-mm-dd (2005-01-12) in SQL?

bye...

--
__ __
|__\\ | || |_// / \\ \_// FreeBSD: The Power To Serve
|__// |__|| | \\ \__// / \\ +----------+
+[ http://bukox.prv.pl ][ http://total.bukox.dmkproject.pl ]+[BuKoX] (bukoxSPAMEROM_MOWIMY_NIE@.tlen.pl) writes:
> How to format field "create" (Jan 12 2005) in sp_helpdb
> procedure to sth like yyyy-mm-dd (2005-01-12) in SQL?

You would have to write your own version of sp_helpdb to that end. While
the source code is in master, I don't think it's worth the effort for
such a little change.

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

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

Sunday, February 19, 2012

Format and devise

Hello,
I have create 2 reports on the same server.
One of these report have format(fieldsX,"c") and the output is $4,00 (it's ok)
But the seconde one, who have de same format, the output is 4,00E (euro)
I don't find this configuration anywhere. Do you know where is it ?Yann,
Have you checked you Regional and Language options in the Control Panel?
There by the currency setting you'll find the way how Windows is using the
'c'-format string.
Jan Pieter Posthuma
"Yann Dupuis" wrote:
> Hello,
> I have create 2 reports on the same server.
> One of these report have format(fieldsX,"c") and the output is $4,00 (it's ok)
> But the seconde one, who have de same format, the output is 4,00E (euro)
> I don't find this configuration anywhere. Do you know where is it ?

Form type reports... Possible?

I need to create data reporting forms that does not necesserily have
repeating rows, but are composed of field names (test labels) and values
(read/calculated from database fields) scattered on page (similar to a manual
data entry form). I can do this with Cristal Reports but is this possible
with the SQL Server Reportsing Services? Thank you very much for your
opinions.
DDAbsolutely - just set up you dataset (or datasets) and drag the fields from
the field browser directly onto the page. Add labels and you're done!
"Dursun" wrote:
> I need to create data reporting forms that does not necesserily have
> repeating rows, but are composed of field names (test labels) and values
> (read/calculated from database fields) scattered on page (similar to a manual
> data entry form). I can do this with Cristal Reports but is this possible
> with the SQL Server Reportsing Services? Thank you very much for your
> opinions.
> DD