Showing posts with label working. Show all posts
Showing posts with label working. Show all posts

Tuesday, March 27, 2012

Address table structure

Is the table structure to store addresses somewhat standardized?
Address1
Address2
City
State
ZipCode
Country
I ask because I am working with international addresses for the first time
and I don't know what to expect in terms of what my users will want to enter.Not really, it varies from database to database. The best thing you can do
is make it somewhat generic and not make any assumptions about any country.
State is specific to US, in Canada they have provinces, other contries have
regions, districts, you name it. I think this structure might be more
generic and applicable to many countries:
Address1
Address2
Address3
City
PostalCode
Region
Country
Of course, address formatting varies from country to country.
Roman
--
Roman Rehak
http://sqlblog.com/blogs/roman_rehak
"Curtis" <Curtis@.discussions.microsoft.com> wrote in message
news:91008C72-8ADB-475D-A64D-7714F5A41124@.microsoft.com...
> Is the table structure to store addresses somewhat standardized?
> Address1
> Address2
> City
> State
> ZipCode
> Country
> I ask because I am working with international addresses for the first time
> and I don't know what to expect in terms of what my users will want to
> enter.|||What are some best practices for data types? Is it best practice to store a
list of countries and states in a separate table and reference the id in the
main address table?
"Roman Rehak" wrote:
> Not really, it varies from database to database. The best thing you can do
> is make it somewhat generic and not make any assumptions about any country.
> State is specific to US, in Canada they have provinces, other contries have
> regions, districts, you name it. I think this structure might be more
> generic and applicable to many countries:
> Address1
> Address2
> Address3
> City
> PostalCode
> Region
> Country
> Of course, address formatting varies from country to country.
> Roman
> --
> Roman Rehak
> http://sqlblog.com/blogs/roman_rehak
>
> "Curtis" <Curtis@.discussions.microsoft.com> wrote in message
> news:91008C72-8ADB-475D-A64D-7714F5A41124@.microsoft.com...
> > Is the table structure to store addresses somewhat standardized?
> >
> > Address1
> > Address2
> > City
> > State
> > ZipCode
> > Country
> >
> > I ask because I am working with international addresses for the first time
> > and I don't know what to expect in terms of what my users will want to
> > enter.
>
>|||Hi
> What are some best practices for data types? Is it best practice to store
> a
> list of countries and states in a separate table and reference the id in
> the
> main address table?
Sure
"Curtis" <Curtis@.discussions.microsoft.com> wrote in message
news:2F00010D-EE81-438E-A0F8-8BA573B57985@.microsoft.com...
> What are some best practices for data types? Is it best practice to store
> a
> list of countries and states in a separate table and reference the id in
> the
> main address table?
> "Roman Rehak" wrote:
>> Not really, it varies from database to database. The best thing you can
>> do
>> is make it somewhat generic and not make any assumptions about any
>> country.
>> State is specific to US, in Canada they have provinces, other contries
>> have
>> regions, districts, you name it. I think this structure might be more
>> generic and applicable to many countries:
>> Address1
>> Address2
>> Address3
>> City
>> PostalCode
>> Region
>> Country
>> Of course, address formatting varies from country to country.
>> Roman
>> --
>> Roman Rehak
>> http://sqlblog.com/blogs/roman_rehak
>>
>> "Curtis" <Curtis@.discussions.microsoft.com> wrote in message
>> news:91008C72-8ADB-475D-A64D-7714F5A41124@.microsoft.com...
>> > Is the table structure to store addresses somewhat standardized?
>> >
>> > Address1
>> > Address2
>> > City
>> > State
>> > ZipCode
>> > Country
>> >
>> > I ask because I am working with international addresses for the first
>> > time
>> > and I don't know what to expect in terms of what my users will want to
>> > enter.
>>sql

Address table structure

Is the table structure to store addresses somewhat standardized?
Address1
Address2
City
State
ZipCode
Country
I ask because I am working with international addresses for the first time
and I don't know what to expect in terms of what my users will want to enter
.Not really, it varies from database to database. The best thing you can do
is make it somewhat generic and not make any assumptions about any country.
State is specific to US, in Canada they have provinces, other contries have
regions, districts, you name it. I think this structure might be more
generic and applicable to many countries:
Address1
Address2
Address3
City
PostalCode
Region
Country
Of course, address formatting varies from country to country.
Roman
Roman Rehak
http://sqlblog.com/blogs/roman_rehak
"Curtis" <Curtis@.discussions.microsoft.com> wrote in message
news:91008C72-8ADB-475D-A64D-7714F5A41124@.microsoft.com...
> Is the table structure to store addresses somewhat standardized?
> Address1
> Address2
> City
> State
> ZipCode
> Country
> I ask because I am working with international addresses for the first time
> and I don't know what to expect in terms of what my users will want to
> enter.|||What are some best practices for data types? Is it best practice to store a
list of countries and states in a separate table and reference the id in the
main address table?
"Roman Rehak" wrote:

> Not really, it varies from database to database. The best thing you can do
> is make it somewhat generic and not make any assumptions about any country
.
> State is specific to US, in Canada they have provinces, other contries hav
e
> regions, districts, you name it. I think this structure might be more
> generic and applicable to many countries:
> Address1
> Address2
> Address3
> City
> PostalCode
> Region
> Country
> Of course, address formatting varies from country to country.
> Roman
> --
> Roman Rehak
> http://sqlblog.com/blogs/roman_rehak
>
> "Curtis" <Curtis@.discussions.microsoft.com> wrote in message
> news:91008C72-8ADB-475D-A64D-7714F5A41124@.microsoft.com...
>
>|||Hi
> What are some best practices for data types? Is it best practice to store
> a
> list of countries and states in a separate table and reference the id in
> the
> main address table?
Sure
"Curtis" <Curtis@.discussions.microsoft.com> wrote in message
news:2F00010D-EE81-438E-A0F8-8BA573B57985@.microsoft.com...[vbcol=seagreen]
> What are some best practices for data types? Is it best practice to store
> a
> list of countries and states in a separate table and reference the id in
> the
> main address table?
> "Roman Rehak" wrote:
>

Thursday, March 22, 2012

Adding Totals from SubReports

Hello...
Does anyone know why this expression is not working?
=Reports![Sub Lay Out for Approval].Controls!TotalJobs
+ Reports!Backlog!Controls!TotalJobs
Here is the error I am getting... It is asking me to declare an object
which is part of the object model right?
The value expression for the textbox â'textbox67â' contains an error:
[BC30451] Name 'Reports' is not declared.
--
Thank You, LeoAs indicated by Chris Hays in this previous related posting, returning
values from a subreport (or accessing values inside the subreport) is not
supported:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=768c8ca9-04e7-4949-8300-c7666c5a6803&sloc=en-us
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"TrussworksLeo" <Leo@.noemail.noemail> wrote in message
news:9E37EE65-4DD3-4F2B-911A-E176ADCA32FB@.microsoft.com...
> Hello...
> Does anyone know why this expression is not working?
> =Reports![Sub Lay Out for Approval].Controls!TotalJobs
> + Reports!Backlog!Controls!TotalJobs
> Here is the error I am getting... It is asking me to declare an object
> which is part of the object model right?
> The value expression for the textbox 'textbox67' contains an error:
> [BC30451] Name 'Reports' is not declared.
> --
> Thank You, Leo

Sunday, March 11, 2012

Adding Records to SQL DB

Here's my dilema. I'm using VB.Net 2003 and SQL DB

I'm having a problen adding a record to a table in my SQL DB

My previous experience has been working with Access databases.

When I try to create an SQLDataAdapter using the wizard from the toolbox the wizard will only create the Select statement. it won't create the UPDATE, DELETE or INSERT statements. I'm not sure why, I even tried using the form wizard and it still wouldn't work...

My tables all have primary keys defined.

So I decided that I would try to create everything programatically.

What I need to know is how to create the INSERT statement and which statements to use to add the record to the table.

I know that when using the OLEDataAdapter with the Acces DB I would do something like the following code.


MyNewRow = MyDatSet.Tables("MyTable").NewRow

MyDataSet.Tables("MyTable").Rows.Add(MyNewRow)
MyDataAdapter.Update(MyDataSet, "MyTable")

I'm pretty sure that for an SQL DB it is different but I don't know how to do it.

Can anyone please help ?

I should also mention that all my textbox fields on my form are databound..

thanks

tattoo

If you define no command on the dataadapter, then no command will be executed. Have a look at the commandbuilder. It will create commands for the apropiate DELETE / INSERT / UPDATE statements based on the underlying schema. If you don′t want to use the (auto)generated command, you can also assign these commands manully. But if you do not give the dataadater any information on how to proceed on the DML action, no action will be done during the udate.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Thursday, March 8, 2012

Adding node back after hardware failure.

After you have to take a node out of a SQL cluster, what is
the procedure to get it back in the cluster?
The second machine is back up and working on the cluster
with everything except the SQL resources, which makes sense
because you have to install SQL on the cluster after it is
set up.
But how should we go about getting this machine back in the
SQL cluster? Should we just reinstall SQL on the cluster,
or should we uninstall first? Is uninstalling simple on a
cluster?
Is there anything obvious that I'm leaving out that will
cause us headaches?
Thanks in advance,
Shawn
Look up 'Maintaining a Failover Cluster' in BOL. It has step-by-step
instructions on how to replace a failed node in a SQL cluster.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Shawn" <anonymous@.discussions.microsoft.com> wrote in message
news:18cfe01c44bdc$c8664390$a501280a@.phx.gbl...
> After you have to take a node out of a SQL cluster, what is
> the procedure to get it back in the cluster?
> The second machine is back up and working on the cluster
> with everything except the SQL resources, which makes sense
> because you have to install SQL on the cluster after it is
> set up.
> But how should we go about getting this machine back in the
> SQL cluster? Should we just reinstall SQL on the cluster,
> or should we uninstall first? Is uninstalling simple on a
> cluster?
> Is there anything obvious that I'm leaving out that will
> cause us headaches?
> Thanks in advance,
> Shawn
|||Awesome. Thanks.
>--Original Message--
>Look up 'Maintaining a Failover Cluster' in BOL. It has
step-by-step
>instructions on how to replace a failed node in a SQL cluster.
>
>--
>Geoff N. Hiten
>Microsoft SQL Server MVP
>Senior Database Administrator
>Careerbuilder.com
>I support the Professional Association for SQL Server
>www.sqlpass.org
>"Shawn" <anonymous@.discussions.microsoft.com> wrote in message
>news:18cfe01c44bdc$c8664390$a501280a@.phx.gbl...
>
>.
>

adding new queries to Server Management Studio

When ever I hit the CTRL+N to add a new query and then save it, why doesn't it get added to the current project I'm working on? Since it's not added, I have to open Windows Explorer, navigate to the right folder, then drag'n'drop it into the right project in my solution. A lot of work for something it should be doing by default.

What am I missing? Thanks.

This does not appear possible with SQL Server 2005 SP2. Could you file this on Microsoft Connect? http://connect.microsoft.com/SQLServer/Feedback/

Paul A. Mestemaker II

Program Manager

Microsoft SQL Server Manageability

http://blogs.msdn.com/sqlrem/

|||Done, id 275345.

adding new queries to Server Management Studio

When ever I hit the CTRL+N to add a new query and then save it, why doesn't it get added to the current project I'm working on? Since it's not added, I have to open Windows Explorer, navigate to the right folder, then drag'n'drop it into the right project in my solution. A lot of work for something it should be doing by default.

What am I missing? Thanks.

This does not appear possible with SQL Server 2005 SP2. Could you file this on Microsoft Connect? http://connect.microsoft.com/SQLServer/Feedback/

Paul A. Mestemaker II

Program Manager

Microsoft SQL Server Manageability

http://blogs.msdn.com/sqlrem/

|||Done, id 275345.

adding new objects to sql server

We have an instance of sql running on one box. We're going to be making a copy of a database on another server. I've been working on a local copy of the db and I've had to add a few new stored procedures and tables along with some fts catalogs. When we set up the copy on the production server, I figured I'd set up the new version that I've been working on so it has the latest structures in place. However, we then have to pull all the data over from the existing database to the new one. Obviously the new tables won't get any data input from the pull, but aside from creating a dtsx project to pull it all over, is there any other way to do it a little easier and faster? Thanks.you can create a backup of your test db and restore it to the production server.|||how about snapshot replication

Tuesday, March 6, 2012

adding new column

ALTER TABLE BFTITLE ADD COLUMN [RATETYPE] [NUMERIC] (10) NOT NULL ;
syntax is not working so can any one tell the right syntaxalter Table Bftitle Add [ratetype] [numeric] (10) Not Null|||Read BOL (SQL Server Books On Line) carefully. If a table already has rows in it, it isn't possible to add a NOT NULL column unless you also give the column a default value too (if you think about it, this only makes sense). I'm guessing on this, but I'd suggest trying:ALTER TABLE BFTITLE
ADD COLUMN [RATETYPE] [NUMERIC] (10) NOT NULL
DEFAULT 0-PatP|||ALTER TABLE BFTITLE
ADD COLUMN [RATETYPE] [NUMERIC] (10) NOT NULL
DEFAULT 0
-PatP

Close. This worked for me:

ALTER TABLE BFTITLE
ADD [RATETYPE] [NUMERIC] (10) NOT NULL
DEFAULT 0

I just removed "COLUMN" from your statement. Funny, I did not think it would be possible to add a non-nullable column, but you're right it can be done as long as you define a default value.

Following is proof:

create table foo (bar int)
go

insert foo (bar) values (1)
go
insert foo (bar) values (2)
go
insert foo (bar) values (3)
go
insert foo (bar) values (4)
go

ALTER TABLE foo
ADD [RATETYPE] [NUMERIC] (10) NOT NULL
DEFAULT 0

select * from foo

sp_columns foo

Adding multiple fields together

Okay hopefully this is quick and easy.

I have 3 fields (Annual Salary, Medical, Pension) and I now need to working out Cost To Company which is just adding those three together.

I tried to do that in a formula but it doesn't return me anything... This is what I had.

=(Sum(Fields!AnnualSalary.Value, "CoreEmployeeData")+Sum(Fields!AnnualMedicalAid.Value, "CoreEmployeeData")+Sum(Fields!AnnualPension.Value, "CoreEmployeeData"))

So it should add the 3 records?

While you are here :), Can you tell me how I can put a currency symbol in the front of these numbers and add the thousand comma delimiter?

ok, What is the "CoreEmployeeData" section, I would think this is affecting your calcs.

Also i would braket each individual sum too as below, I have also added in the £ and thousand delimiter too.

="£" & round(cdec((Sum(Fields!AnnualSalary.Value))+(Sum(Fields!AnnualMedicalAid.Value))+(Sum(Fields!AnnualPension.Value), 2)), 2)

I have not tested this but should provide what you are looking for.

Andy

|||CoreEmployeeData is the DataSet name.
If I leave that out I get an out of scope error.

If I leave it there I still get no response at all....?|||Okay well it's working now.
I had to paste the code in the "Format" and "Value" fields.

Not sure why it was required in both but it seems to work now. I think I need some more practice :)

Thanks,
Gavin|||

the easiest way to get aorund this issue is split out your sum to individual columns, create 3 new columns in your report, and put the Sum() in each, make sure that return the correct data in the new columns.

If so then just copy and paste each one into your total column and + them together making sure you bracket each one and wrapper the whole thing in brackets too.

((sum(A)) + (sum(B)) + (sum(B)))

Now add in my code above to format to dec and add £ and you should be ok

|||

Cool! - Its is one of those things, to be honest i dont use the format area at all but add my formatting only into the expression for each field, at least then you only have to change one area of needed.

SSRS certianly has its quirks but you get used to it.

Andy

Adding more tables than fit in the workspace

I have a report which needs 9 tables. I got the first three working but
when I went to insert the 4th - there was no "whitespace" for me to paste
into. Each of these sections will trigger a page break so maybe I just
overlap them on the screen? Is there a way to make the working space
bigger or some other solution? Thanks!Go to properties and select Body. Set the Size Height to what you desire.
"Don Parker" wrote:
> I have a report which needs 9 tables. I got the first three working but
> when I went to insert the 4th - there was no "whitespace" for me to paste
> into. Each of these sections will trigger a page break so maybe I just
> overlap them on the screen? Is there a way to make the working space
> bigger or some other solution? Thanks!
>
>
>|||Report Designer's layout surface can be resized by
* Dragging the right or bottom edge of the layout surface.
* Entering a new value for the body height or width using the properties
window.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"B. Mark McKinney" <BMarkMcKinney@.discussions.microsoft.com> wrote in
message news:1CB6C09D-BF49-4B4F-AB7C-7CA57264CAA3@.microsoft.com...
> Go to properties and select Body. Set the Size Height to what you desire.
> "Don Parker" wrote:
>> I have a report which needs 9 tables. I got the first three working but
>> when I went to insert the 4th - there was no "whitespace" for me to paste
>> into. Each of these sections will trigger a page break so maybe I just
>> overlap them on the screen? Is there a way to make the working space
>> bigger or some other solution? Thanks!
>>
>>

Saturday, February 25, 2012

Adding Linked server

Hi guys,
My linked server (from one SQL Server 2000 to another SQL Server 2000) is
not working. My settings are as follows:
Checked other data source
Provider string: DRIVER={SQL Server};SERVER=SERVER_NAME;UID=TEST;PWD=TEST;
Under Security tab:
Be made using the logins current security context is checked.
Please help!
When you say it's not working , do you mean "insufficient permissions!? or
are you getting some othe rmessage?
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
"David" <David@.discussions.microsoft.com> wrote in message
news:20B29608-CAEF-483A-ADF4-A5DA13B87D5D@.microsoft.com...
> Hi guys,
> My linked server (from one SQL Server 2000 to another SQL Server 2000) is
> not working. My settings are as follows:
> Checked other data source
> Provider string: DRIVER={SQL Server};SERVER=SERVER_NAME;UID=TEST;PWD=TEST;
> Under Security tab:
> Be made using the logins current security context is checked.
>
> Please help!
>
|||It says, SQL Server does not exist or Access denied. Thanks
"Jack Vamvas" wrote:

> When you say it's not working , do you mean "insufficient permissions!? or
> are you getting some othe rmessage?
> --
> 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
> "David" <David@.discussions.microsoft.com> wrote in message
> news:20B29608-CAEF-483A-ADF4-A5DA13B87D5D@.microsoft.com...
>
>

Adding Linked server

Hi guys,
My linked server (from one SQL Server 2000 to another SQL Server 2000) is
not working. My settings are as follows:
Checked other data source
Provider string: DRIVER={SQL Server};SERVER=SERVER_NAME;UID=TEST;PWD=
TE
ST;
Under Security tab:
Be made using the logins current security context is checked.
Please help!When you say it's not working , do you mean "insufficient permissions!? or
are you getting some othe rmessage?
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
"David" <David@.discussions.microsoft.com> wrote in message
news:20B29608-CAEF-483A-ADF4-A5DA13B87D5D@.microsoft.com...
> Hi guys,
> My linked server (from one SQL Server 2000 to another SQL Server 2000) is
> not working. My settings are as follows:
> Checked other data source
> Provider string: DRIVER={SQL Server};SERVER=SERVER_NAME;UID=TEST;PWD=
TEST;
> Under Security tab:
> Be made using the logins current security context is checked.
>
> Please help!
>|||It says, SQL Server does not exist or Access denied. Thanks
"Jack Vamvas" wrote:

> When you say it's not working , do you mean "insufficient permissions!? or
> are you getting some othe rmessage?
> --
> 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
> "David" <David@.discussions.microsoft.com> wrote in message
> news:20B29608-CAEF-483A-ADF4-A5DA13B87D5D@.microsoft.com...
>
>

Adding Linked server

Hi guys,
My linked server (from one SQL Server 2000 to another SQL Server 2000) is
not working. My settings are as follows:
Checked other data source
Provider string: DRIVER={SQL Server};SERVER=SERVER_NAME;UID=TEST;PWD=TEST;
Under Security tab:
Be made using the logins current security context is checked.
Please help!When you say it's not working , do you mean "insufficient permissions!? or
are you getting some othe rmessage?
--
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
"David" <David@.discussions.microsoft.com> wrote in message
news:20B29608-CAEF-483A-ADF4-A5DA13B87D5D@.microsoft.com...
> Hi guys,
> My linked server (from one SQL Server 2000 to another SQL Server 2000) is
> not working. My settings are as follows:
> Checked other data source
> Provider string: DRIVER={SQL Server};SERVER=SERVER_NAME;UID=TEST;PWD=TEST;
> Under Security tab:
> Be made using the logins current security context is checked.
>
> Please help!
>|||It says, SQL Server does not exist or Access denied. Thanks
"Jack Vamvas" wrote:
> When you say it's not working , do you mean "insufficient permissions!? or
> are you getting some othe rmessage?
> --
> 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
> "David" <David@.discussions.microsoft.com> wrote in message
> news:20B29608-CAEF-483A-ADF4-A5DA13B87D5D@.microsoft.com...
> > Hi guys,
> >
> > My linked server (from one SQL Server 2000 to another SQL Server 2000) is
> > not working. My settings are as follows:
> >
> > Checked other data source
> > Provider string: DRIVER={SQL Server};SERVER=SERVER_NAME;UID=TEST;PWD=TEST;
> >
> > Under Security tab:
> > Be made using the logins current security context is checked.
> >
> >
> > Please help!
> >
>
>

Friday, February 24, 2012

Adding Grand Total to a Column Group in a Matrix. Please Help!

Hello Guys,

I am working on a matrix report which has several row groups and 1 column group. After execution, the column group wil end up with several columns containg numeric counts. I would like to have the grand total for each "column group" column as a last row on this report.

For row groups you can just right click "Subtotal", but that is not possible for column group. Could someone please help me to find a clever way of accomplishing this, please. Thank you so much for your help!

For column groups, you can also just right click "Subtotal". Maybe you are clicking the wrong box or it isn't truly a column group or you just aren't seeing it.

Look around a bit more.

http://i55.photobucket.com/albums/g121/Farsight38/untitled-1.jpg

|||

You're right, however that will just give me totals on the right side of the matrix (row totals). What I would like to have is a grand total column(s) at the bottom of the matrix (basically a grand total for all values in each of the "column grouping" columns). Is there a way to accomplish that? Thank you for your expertise.

|||

I'm not sure I understand what you're asking for.

In order to get row totals on the right side of the matrix, you right click a column and select subtotal.

In order to get column totals at the bottom of the matrix, you right click a row and select subtotal.

|||

You should be able to achieve this is you add a subtotal on the outermost (leftmost) row group.

The reason you sometimes cannot add a subtotal is to do with static groups which don't support subtotals. These are created when you drag more than one column (measure) from your dataset to the details portion of the matrix (rows or columns).

It would help if you put together some sample data and what you would like to achieve as output. Do this in Excel and copy paste it into a post. That way we'll be able to help more affectively.

|||

Adam, you're the greatest!

Adding a subtotal to the leftmost row group did the trick. Thank you so much.

??€?§Q? , matrix wouldn't let me add the subtotal to the bottom right cell (Data), where I needed the totals to show. Adam's suggestion worked. I thought doing that would just add the total for the values of that rowgroup - but now I know better Smile

Thank you for your help, guys.

Adding empty space

I want to add some spaces on the starting feild value. Please see the below example

" " & Fields!Name.Value

This is working on my BIDS. But the spaces are removed automatically when I deployed the report to the report manager. What should be the problem.

Rather than inserting spaces, can you adjust the padding property on the textbox? If you goal is to have the field indented, that should work.|||

Try using StrDup(3, Chr(32)) & Fields!Name.Value or Space(3) & Fields!Name.Value

Shyam

|||

I used padding property to indent the field. its working fine.

Thanks jwelch.

|||

Hi Folks,

I'm attempting to add empty spaces to format my report. I have one subreport that's a part of my report. I used the "Space()" function and it worked nicely within VS2005, however when I moved my report to the Report Server all my heading and detail data had one space in between them. I also tried "strDUP(3, " ")" and it too worked fine in VS2005 but not on the Report Server. Below is a sample of my code in what I trying to accomplish.

="DIR #" & StrDup(5, " ") & "ST" & StrDup(4, " ") &

"DIR NAME" & StrDup(20, " ") & "PUBCO" &

StrDup(7, " ") & "CLOSE" & StrDup(10, " ") & "ISSUE"

|||Spaces don't work very well when you are rendering as HTML, as browsers tend to ignore repeated white space. Any reason you couldn't use a table instead?|||

Hi John,

I'm currently using a table and it consist of one large column because my subreport is a part of it.

Best regards

|||How about using seperate columns for displaying this info, and merging the cells for the subreport?|||

John - I followed your advice and added a table within my table and it works fine now.

Thanks for your help.

Sunday, February 19, 2012

Adding empty space

I want to add some spaces on the starting feild value. Please see the below example

" " & Fields!Name.Value

This is working on my BIDS. But the spaces are removed automatically when I deployed the report to the report manager. What should be the problem.

Rather than inserting spaces, can you adjust the padding property on the textbox? If you goal is to have the field indented, that should work.|||

Try using StrDup(3, Chr(32)) & Fields!Name.Value or Space(3) & Fields!Name.Value

Shyam

|||

I used padding property to indent the field. its working fine.

Thanks jwelch.

|||

Hi Folks,

I'm attempting to add empty spaces to format my report. I have one subreport that's a part of my report. I used the "Space()" function and it worked nicely within VS2005, however when I moved my report to the Report Server all my heading and detail data had one space in between them. I also tried "strDUP(3, " ")" and it too worked fine in VS2005 but not on the Report Server. Below is a sample of my code in what I trying to accomplish.

="DIR #" & StrDup(5, " ") & "ST" & StrDup(4, " ") &

"DIR NAME" & StrDup(20, " ") & "PUBCO" &

StrDup(7, " ") & "CLOSE" & StrDup(10, " ") & "ISSUE"

|||Spaces don't work very well when you are rendering as HTML, as browsers tend to ignore repeated white space. Any reason you couldn't use a table instead?|||

Hi John,

I'm currently using a table and it consist of one large column because my subreport is a part of it.

Best regards

|||How about using seperate columns for displaying this info, and merging the cells for the subreport?|||

John - I followed your advice and added a table within my table and it works fine now.

Thanks for your help.

Monday, February 13, 2012

Adding column to sp_helpuser

I am working on creating a configuration database. This will connect to many databases on many different servers. What I would like to do is run sp_MSForEachDB then store the name of the current server and database the package is connected to. Then add both of these into a column before running sp_helpuser. I don't know how confusing this is, but I think I may have the code worked out pretty well. If you have any questions, please post them and I will try to answer as best as I can. What I would like the ending result to look like is...

<server1> <database1> <userID1> <datareader>
<server1> <database1> <userID1> <datawriter>
<server1> <database1> <userID2> <datawriter>
<server1> <database2> <userID1> <datawriter>

I am at a loss, and I can't use the sys.<table> tables because it has to be backward compatible. Thanks for any help in advance.
sp_helplogins is the answer.
-Kyle

Adding column to sp_helpuser

I am working on creating a configuration database. This will connect to many databases on many different servers. What I would like to do is run sp_MSForEachDB then store the name of the current server and database the package is connected to. Then add both of these into a column before running sp_helpuser. I don't know how confusing this is, but I think I may have the code worked out pretty well. If you have any questions, please post them and I will try to answer as best as I can. What I would like the ending result to look like is...

<server1> <database1> <userID1> <datareader>
<server1> <database1> <userID1> <datawriter>
<server1> <database1> <userID2> <datawriter>
<server1> <database2> <userID1> <datawriter>

I am at a loss, and I can't use the sys.<table> tables because it has to be backward compatible. Thanks for any help in advance.
sp_helplogins is the answer.
-Kyle

Sunday, February 12, 2012

adding an image to SQL

Looking for any help someone can offer on adding an image to SQL.

Working on what will hopefully be quite a big site and the user will be asked for some details, one of which will be an image (jpg, gif or bmp).

Rather than add the image to a folder on the server,?a?folder which could end up being quite large, I was hoping someone could give me some help, suggestions?or even point me towards a tutorial on how to store the image in an SQL database.

Any helps appreciated, thanks :)never mind, read some articles about why this isn't a good idea :)

just going to store the images in a folder|||Here is an article from msdn if someone still interests:Read and Write BLOB Data by Using ADO.NET Through ASP.NET