Sunday, March 25, 2012
adding various fonts/weights to values in a string
I am creating a form that needs to have strings of text in the text box.
The strings have numbers included and the numbers need to be a different
font. The form is built in a table, so splitting the row will not work.
Example:
Textbox 10 has the following value:
8. Fax Number
The number 8 needs to be arial narrow bold 6.96 and the fax number needs to
be arrial narrow 6.96
Any help would be appreciated.
Thank youHi Susan,
One of the ways to do what you need is to place a rectangle object right in
the textbox of the table. Then place two (or more) individual textboxed
inside of the rectangle that is inside of the table cell. You can set the
font weights on the individual textboxes at that point so:
"8" will be in its own textbox and the Fax Number data field in the other,
but they can be together within a single cell. This might add a little more
work, but it should solve the problem.
Rodney Landrum
"Susan R" <SusanR@.discussions.microsoft.com> wrote in message
news:B55B1631-A886-45A0-AFA5-5533CB87C0BE@.microsoft.com...
> HI
> I am creating a form that needs to have strings of text in the text box.
> The strings have numbers included and the numbers need to be a different
> font. The form is built in a table, so splitting the row will not work.
> Example:
> Textbox 10 has the following value:
> 8. Fax Number
> The number 8 needs to be arial narrow bold 6.96 and the fax number needs
> to
> be arrial narrow 6.96
> Any help would be appreciated.
> Thank you
>sql
Thursday, March 22, 2012
Adding totals to matrix report columns
Hi,
I'm creating a martix report that must have overall averages at the end of each row and column. I've added a list with a textbox to cater for the row totals but this doesn't work for the columns (unless there's some way of displaying the list horizontally...?) Adding a new item within the matrix doesn't work as it won't accept aggregate functions. There must be a way of doing this quite easily but I can't figure it out.
Any ideas or suggestions would be much appreciated.
Thanks,
Aidan
Turns out the solution is very simple - all you have to do is right click on the group header cell and select 'subtotal' from the pop-up menu. You can change the properties of the subtotal cell by clicking on the green triangle in the corner of the cell when viewing the properties window. It made more sense when I realised that the pivot cell must have an aggregate value - I was aggregating in my stored procedure so it took a while to figure it out...
Hope this helps someone at some point.
Aidan
|||Thanks for pointing out the "SubTotal" setting for the column totals. However my question is regarding the Row Totals.
My report format is roughly like so
Category1 Category2 Category3 ... CTotal
Day1 10 20 30 60
Day2 11 22 33 66
Day3
...
RTotal 21 42 63 X
Basically I'm querying for rows by Day and have a GROUP BY for Category for certain type of records and am displaying the COUNT() on each day (e.g. 10, 20, 30)
So theCTotal is easily accomplished using the "SubTotal" setting. The problem is I cannot get RTotal to work. I at a point where I'm thinking of doing theRTotal in my query itself using a temp table for the original data, then doing a SUM of all Category COUNTS vertically and then doing a UNION to give me the bottom row. Needless to say, this would so lame of me I will not able to show my face to anyone.
So if you can set me straight on how you managed to do the Row Totals using a List Region, I would sure appreciate it. For the life of me, I cannot get it to work.
Best.
You should be able to use the same subtotal function by right-clicking the the cell with your (Day1, Day2, Day3) Date Value (usually the second cell from the top in the leftmost column).
Tuesday, March 20, 2012
adding the vc express bundled sql server to odbc
budled SQL Server. After creating a C++ Forms prototype, with some
tables into a database file named Test1.mdb, now I want to make ODBC
available this local database.
What are the steps required to add and ODBC entry so any ODBC-capable
program may access my prototype?
I know in advance the location of the database file and log file, know
it is local (so the server is localhost or just (local) ) and also the
driver name and the port number.
What is unknown to me is the user id and password as the installlation
was done to auth with OS credentials.
Could be "sa" without password?
Thanks in advance, CarlosChuck (carlos.crosetti@.gmail.com) writes:
Quote:
Originally Posted by
Hi, I have installed a trial version of VC++ Express 2005 with the
budled SQL Server. After creating a C++ Forms prototype, with some
tables into a database file named Test1.mdb, now I want to make ODBC
available this local database.
>
What are the steps required to add and ODBC entry so any ODBC-capable
program may access my prototype?
>
I know in advance the location of the database file and log file, know
it is local (so the server is localhost or just (local) ) and also the
driver name and the port number.
>
What is unknown to me is the user id and password as the installlation
was done to auth with OS credentials.
Could be "sa" without password?
Why can't use Windows authentication? Why would the ODBC application
log in as sa?
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspxsql
Thursday, March 8, 2012
Adding 'Other' segment/slice in a pie chart
Hi guys,
I am creating a pie chart report from a cube. This report may contain unknown number of segments. Here is the thing; if more than 1 data slice is generated with a value less than 5% of the total, then a segment labelled 'other' will be generated, and data from all slices with value < 5% will be added to this 'Other' segment.
Is it possible to implement this functionality in the report layout level with out writing a complex MDX query? If this is not possible, can anybody give me a sample MDX query which implements similar issue(i.e. 'Other-ing' rule.)
For your information, this feature can be easily implemented using a third pary software such as 'Dundas chart for Reporting Service'. However, my client don't want to buy this third party software.
Please let me know if anybody has came accross with similar scenario?
Sincerely,
--Amde
Please help!!!!!!!!!!
Do you have to use MDX or can you use T-SQL? I once used a derived table to get this type of data. Not pretty and not the quickest thing if you have huge datasets, but it works.
SELECT grouper, sum(total_charge), sum(pct)
FROM (
select
dx1_num "Diag", -- Item to list in pie slice
sum(charge_amount) "total_charge", --
(sum(charge_amount)/(SELECT SUM(charge_amount) FROM ar_billtrans_charge)) "pct", -- Percent of Everything
case
when (sum(charge_amount)/(SELECT SUM(charge_amount) FROM ar_billtrans_charge)) < .05 then 'Misc' -- Interim Group
else CAST(dx1_num AS VARCHAR(15))
end "grouper" -- what kind of name do you want for free?
from ar_billtrans_charge
group by dx1_num
) Y GROUP BY grouper;
I am sure some T-SQL gods out there can do much better.
R
|||Hi,
Appreciate your response. Basically, I am using MDX query. Do you have any idea how to do the same thing using MDX?
Thank you for your cooperation.
--Amde
|||Please read my response with a sample report in this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=638700&SiteID=1&mode=1
-- Robert
Adding 'Other' segment/slice in a pie chart
Hi guys,
I am creating a pie chart report from a cube. This report may contain unknown number of segments. Here is the thing; if more than 1 data slice is generated with a value less than 5% of the total, then a segment labelled 'other' will be generated, and data from all slices with value < 5% will be added to this 'Other' segment.
Is it possible to implement this functionality in the report layout level with out writing a complex MDX query? If this is not possible, can anybody give me a sample MDX query which implements similar issue(i.e. 'Other-ing' rule.)
For your information, this feature can be easily implemented using a third pary software such as 'Dundas chart for Reporting Service'. However, my client don't want to buy this third party software.
Please let me know if anybody has came accross with similar scenario?
Sincerely,
--Amde
Please help!!!!!!!!!!
Do you have to use MDX or can you use T-SQL? I once used a derived table to get this type of data. Not pretty and not the quickest thing if you have huge datasets, but it works.
SELECT grouper, sum(total_charge), sum(pct)
FROM (
select
dx1_num "Diag", -- Item to list in pie slice
sum(charge_amount) "total_charge", --
(sum(charge_amount)/(SELECT SUM(charge_amount) FROM ar_billtrans_charge)) "pct", -- Percent of Everything
case
when (sum(charge_amount)/(SELECT SUM(charge_amount) FROM ar_billtrans_charge)) < .05 then 'Misc' -- Interim Group
else CAST(dx1_num AS VARCHAR(15))
end "grouper" -- what kind of name do you want for free?
from ar_billtrans_charge
group by dx1_num
) Y GROUP BY grouper;
I am sure some T-SQL gods out there can do much better.
R
|||Hi,
Appreciate your response. Basically, I am using MDX query. Do you have any idea how to do the same thing using MDX?
Thank you for your cooperation.
--Amde
|||Please read my response with a sample report in this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=638700&SiteID=1&mode=1
-- Robert
Adding new index to existing table in Merge Replication
updating/creating indexes. It isn't clear to me if I can use Enterprise
Manager to go into the table on the publisher and add additional indexes on
a table and then have the added indexes automatically populate to the
subscribers.
Additionally, BOL says that an index can contain upto 16 fields but they
recommend upto three. Does that mean I should create many indexes with only
upto three fields in each index? Help or references on this matter would
be greatly appreciated.
WB
The index can be added at the publisher as per usual. It won't get
automatically propagated to the subscribers and that is what
sp_addscriptexec is for. If I just have one or two subscribers then I tend
to create the index by hand, but if you have lots, then it is a way or being
sure they all receive the changes, especially if they are pull
subscriptions.
As for the size, this seems a general question to do with indexes. Have a
look for clustered, nonclustered and covering in BOL. Indexes are sorthed on
the first column, then for duplicates of the first column they are sorted on
the second and so on, so 2 indexes with 3 columns is not the same as one
index with 6 columns. An index with 6 columns will be 'wide' and therefore
slow, but on the other hand it might have been created as a covering index
for a particluar long-running query. This is a really big subject and I'm
sure there are loads of resources on it apart from BOL.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com/default.asp
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Tuesday, March 6, 2012
Adding multiple textboxes to PageHeader
for (int i = 0; i < Items.Count; i++)
{
reportItems.Items = new object[] { CreateTextBox(Items.ItemName, Items
.ItemMessage, Items
.ItemStyle) };
}
This is the line of code that I am hitting the problem. This works fine, however only inserts the last textbox in the Items Array.
If I change the code to
for (int i = 0; i < Items.Count; i++)
{
reportItems.Items = new object[] { CreateTextBox(Items
.ItemName, Items
.ItemMessage, Items
.ItemStyle) };
}
It executes, but fails when trying to render it into XML.
Has anyone managed to get multiple textboxes programatically into the pageheader?In the first approach you are overwriting the Items array with each iteration of the for loop. And in the second approach you are setting each entry in the Items array to a new object array, so you end up with an array of arrays. Instead what you should do is just add the object to the array. Try using the following code.
// create a new array for the text boxes in the header
reportItems.Items = new object[Items.Count];
// iterate though all the Items creating a textbox, which is added to the report items object array
for (int i = 0; i < Items.Count; i++)
{
reportItems.Items = CreateTextBox(Items
.ItemName, Items
.ItemMessage, Items
.ItemStyle);
}
Ian
Adding Multiple column items for a total.
I need to have one column show up in my RS 2000 report that I am creating.
The SQL table the information is coming out of is:
Column1 Column2 Column3 Column4 Column5 Column6
Name Tuition BookFee MaterialsFee OtherFee1 OtherFee2
In my report, I only want to show a column called Total Cost (For each Field
Name)which consists of Tuition+BookFee+MaterialsFee+OtherFee1+OtherFee2. In
other words, I want to add columns 2 - 6 together and only show that total in
my final report. Obviously I can do this in Excel, but I can't seem to do
this in SQL.
I can't alter my SQL tables, but I can alter the RS query if need be or sum
them up on my report layout. My only problem is I don't know how.
Any help would be greatly appreciated
Thanks.Solution I used
In the SELECT portion of my query after selecting approriate items I included
StudentProgram.BookFee+StudentProgram.MaterialFee+StudentProgram.OtherFee1+
StudentProgram.OtherFee2+StudentProgram.TuitionFee AS TotalCost
"TTU" wrote:
> Rookie question here -
> I need to have one column show up in my RS 2000 report that I am creating.
> The SQL table the information is coming out of is:
> Column1 Column2 Column3 Column4 Column5 Column6
> Name Tuition BookFee MaterialsFee OtherFee1 OtherFee2
> In my report, I only want to show a column called Total Cost (For each Field
> Name)which consists of Tuition+BookFee+MaterialsFee+OtherFee1+OtherFee2. In
> other words, I want to add columns 2 - 6 together and only show that total in
> my final report. Obviously I can do this in Excel, but I can't seem to do
> this in SQL.
> I can't alter my SQL tables, but I can alter the RS query if need be or sum
> them up on my report layout. My only problem is I don't know how.
> Any help would be greatly appreciated
> Thanks.
>
Friday, February 24, 2012
Adding extra rows to Matrix
extra lines at the end, so the user can print and add in info as needed. Is
there any way to do this? thanks
ChrisOn Jan 18, 9:55 am, Chris <Ch...@.discussions.microsoft.com> wrote:
> Hello, I am creating a report with a matrix in it, and I need to add a couple
> extra lines at the end, so the user can print and add in info as needed. Is
> there any way to do this? thanks
> Chris
The easiest way to do this is to either add a couple textbox controls
below the matrix control -or- add a table control below the matrix
control. Make sure to not overlap the controls and place the matrix
control and textbox controls/etc inside a rectangle. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Thanks Enrique, the problem with that is the matrix is Dynamic, so I don't
know how many columns it is going to be until runtime. If I add textboxes or
a table underneath, the columns will not match up. Any other ideas? Is there
a way to tie the table columns to the columns in the matrix'
"EMartinez" wrote:
> On Jan 18, 9:55 am, Chris <Ch...@.discussions.microsoft.com> wrote:
> > Hello, I am creating a report with a matrix in it, and I need to add a couple
> > extra lines at the end, so the user can print and add in info as needed. Is
> > there any way to do this? thanks
> >
> > Chris
> The easiest way to do this is to either add a couple textbox controls
> below the matrix control -or- add a table control below the matrix
> control. Make sure to not overlap the controls and place the matrix
> control and textbox controls/etc inside a rectangle. Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>|||On Jan 21, 8:10 am, Chris <Ch...@.discussions.microsoft.com> wrote:
> Thanks Enrique, the problem with that is the matrix is Dynamic, so I don't
> know how many columns it is going to be until runtime. If I add textboxes or
> a table underneath, the columns will not match up. Any other ideas? Is there
> a way to tie the table columns to the columns in the matrix'
> "EMartinez" wrote:
> > On Jan 18, 9:55 am, Chris <Ch...@.discussions.microsoft.com> wrote:
> > > Hello, I am creating a report with a matrix in it, and I need to add a couple
> > > extra lines at the end, so the user can print and add in info as needed. Is
> > > there any way to do this? thanks
> > > Chris
> > The easiest way to do this is to either add a couple textbox controls
> > below the matrix control -or- add a table control below the matrix
> > control. Make sure to not overlap the controls and place the matrix
> > control and textbox controls/etc inside a rectangle. Hope this helps.
> > Regards,
> > Enrique Martinez
> > Sr. Software Consultant
You're welcome. Not unless you use a second matrix control below the
first one that is tied to the same dataset and hide the data. Hope
this helps further.
Regards,
Enrique Martinez
Sr. Software Consultant
Sunday, February 19, 2012
Adding DataSet as DataSource to Report Published on Report Server from ClientSide
Hi
I am Creating Click Once Windows Application with Reporting Services 2005.I have created Report and Published on Report Server.In my windows application I am successfully able to view my published report through report viewer control.
Now in my application I am getting a dataset from my custom webservice. I want this dataset data to be added to my report as datasource at runtime on Client Side ,as my report is on Report Server.
waiting for help!!
Thanks in Advance
Pankaj
The report server does not support passing in data sets for reports to run with. You could use the Viewer control in local mode and have the viewer show the report with that data set. Of course by doing this you would loose all of the server add ons (client print for the web control, subscriptions, security, etc).
-Daniel
|||Hi
Thanks for suggession. But will you please tell me which functions/class I have to use to set my new dataset as datasource to my report at client side.as you have mentioned to use reportviewer as localmode.will you please clearly specify.
Thanks
Pankaj
|||Hi Daniel
Or is it possible to get report from reportserver at client side and make it as local report and use it as local report and add datasources to it.?
-Pankaj
|||You can dynamically set the data set using .LocalReport.DataSources.Add. If you look on http://www.gotreportviewer.com/ you will find examples to go by.
You may also want to look into writing a custom Data Processing Extension. By doing this, any report on the server could use your data extension to populate it's data. You can find more information here http://msdn2.microsoft.com/en-us/library/ms154655.aspx.
I'm not sure exactly what you are trying to accomplish so it's hard to say which is the best approach for your problem.
-Daniel
|||The following article may help you to find the most appropriate solution.Monday, February 13, 2012
Adding column to sp_helpuser
<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
<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 CLR stored procedure in ASP.Net website
Hi all,
I am creating a ASP.Net 2.0 website and in it I had to create a CLR stored procedure to do a complex sql procedure. Coming to the problem I created the CLR stored procedure as a different database project . I wanted to know whether its possible to add the CLR managed code into my exisiting ASP.Net project in which case I should get the dll for this stored procedure in order to deploy the stored proc in the SQL Server.Or is there some simplified approach to using clr stored procedures in an ASP.Net project.
I would not recommend mixing ASP and CLR stored procedures in one solution but you probably can do this. CLR stored procedures are deployed different way then T-SQL stored procedures or ASP web pages and they are very sensitive to server configuration (not all users can do this, server admin have to allow you to do this and server have to be setup to use CLR, and in most cases you need very high security right to deploy them) . If it is possible try to not use CLR and USE T-SQL, and from my experience it is almost always possible if you only access data on the server in your logic.
Anyway Good luck
Sunday, February 12, 2012
adding and viewing comments in a backup file.
I'm using SQL Server 2000 Standard edition on Windows 2000 server.
It is possible to add comments when creating a backup file. If so, how do I
later view those comments
Thanks
AviYou can enter a description when you perform the backup
using the DESCRIPTION argument. You can view the description
of a backup file, device using RESTORE HEADERONLY.
You can find more information in books online under backup
and restore headeronly.
-Sue
On Thu, 4 Dec 2003 16:22:12 +0200, "Avi"
<rememberoti@.yahoo.com> wrote:
>Hi all,
>I'm using SQL Server 2000 Standard edition on Windows 2000 server.
>It is possible to add comments when creating a backup file. If so, how do I
>later view those comments
>Thanks
>Avi
>
Adding an SQL Server database to a Websolution
Dear Forum
I really hope someone can help me with the following - it's eating me up.
I'm creating a website in VS2005 and want to add an SQL Server database to the Solution, og I've created a subfolder to the App_Data folder called Database. Now when I click Add New Item and choose SQL database in the Add New Item dialog box I get the following error message
Connections to SQL Server files (*.mdf) require SQL Server Express to function properly. Please verify installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId49251
Now at some point in the past I installed Visual Basic, Visual Web developer and SQL Server express edition, but when I got hold of VS2005 Professional Edition I carefully made sure that all Express version of any VS software was uninstalled beforehand. So now I have only VS2005 Professional Edition and SQL Server 2005 Developer Edition (32 bit) installed on my computer.
I have checked all the environment settings, and can't find a single thing that should point to SQL Server Express Edition.
I would really appriciate if you could give me a helping hand before I loose my sanity.
Thanks a hole bunch.
Tina
My guess is that is because the purpose of placing mdf files in the app_data folder is to attach them to a SQL Server instance and out of the box you cannot attach mdf files to SQL Server except for the Express edition but it is possible to attach mdf files to any edition of SQL Server but it is not recommended to enable this feature on Servers.
There is an article on the MSDN Library I know of that explains how to enable this feature but I cannot seem to find it, as I recall it, you had to start the mssqlserver with the -express argument, but I am not sure about this.
|||Also I have the same problem and I have resolve it installing sql express 2005 (your link dont work correctly)
you can download sql 2005 form the following link
http://go.microsoft.com/fwlink/?LinkId=49251
Microsoft SQL Server 2005 Express Edition
http://www.microsoft.com/downloads/details.aspx?familyid=220549b5-0b07-4448-8848-dcc397514b41&displaylang=en
|||If I am not mistaken the developer edition of SQL Server 2005 does not support hosting a database.
You can download SQL Server 2005 express and create an instance of a database using that application.
Once the database has been created inside SQL Server 2005 (IF Developer works all the more power to you). You can then establish a connection within Visual Studio 2005 to that database in order to use in your projects.
Hope this helps.
Chris McNear
Adding an SQL Server database to a Websolution
Dear Forum
I really hope someone can help me with the following - it's eating me up.
I'm creating a website in VS2005 and want to add an SQL Server database to the Solution, og I've created a subfolder to the App_Data folder called Database. Now when I click Add New Item and choose SQL database in the Add New Item dialog box I get the following error message
Connections to SQL Server files (*.mdf) require SQL Server Express to function properly. Please verify installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId49251
Now at some point in the past I installed Visual Basic, Visual Web developer and SQL Server express edition, but when I got hold of VS2005 Professional Edition I carefully made sure that all Express version of any VS software was uninstalled beforehand. So now I have only VS2005 Professional Edition and SQL Server 2005 Developer Edition (32 bit) installed on my computer.
I have checked all the environment settings, and can't find a single thing that should point to SQL Server Express Edition.
I would really appriciate if you could give me a helping hand before I loose my sanity.
Thanks a hole bunch.
Tina
My guess is that is because the purpose of placing mdf files in the app_data folder is to attach them to a SQL Server instance and out of the box you cannot attach mdf files to SQL Server except for the Express edition but it is possible to attach mdf files to any edition of SQL Server but it is not recommended to enable this feature on Servers.
There is an article on the MSDN Library I know of that explains how to enable this feature but I cannot seem to find it, as I recall it, you had to start the mssqlserver with the -express argument, but I am not sure about this.
|||Also I have the same problem and I have resolve it installing sql express 2005 (your link dont work correctly)
you can download sql 2005 form the following link
http://go.microsoft.com/fwlink/?LinkId=49251
Microsoft SQL Server 2005 Express Edition
http://www.microsoft.com/downloads/details.aspx?familyid=220549b5-0b07-4448-8848-dcc397514b41&displaylang=en
|||If I am not mistaken the developer edition of SQL Server 2005 does not support hosting a database.
You can download SQL Server 2005 express and create an instance of a database using that application.
Once the database has been created inside SQL Server 2005 (IF Developer works all the more power to you). You can then establish a connection within Visual Studio 2005 to that database in order to use in your projects.
Hope this helps.
Chris McNear