Monday, March 26, 2012
How to alter the table with delete/update cascade without recreating the table
Thanks
************************************************** ******
Contract table DDL is
create table contract(
contractNum int identity(1,1) primary key,
contractDate smalldatetime not null,
tuition money not null,
studentId char(4) not null foreign key references student (studentId),
contactId int not null foreign key references contact (contactId)
);http://www.schemamania.org/jkl/booksonline/SQLBOL70/html/7_design_41.htm for detailed explanation.
Also refer to books online for additional information.|||guys,
the earlier response was not helping. Does anyone have better help?
I tryed the new DDL but not working either. How can I alter my table or create new one to make the cascading working.
thanks in advance!
************************************************** *
My original contract table DDL is
create table contract(
contractNum int identity(1,1) primary key,
contractDate smalldatetime not null,
tuition money not null,
studentId char(4) not null foreign key references student (studentId)
contactId int not null foreign key references contact (contactId)
);
************************************************** ***
My modified contract table DDL is
create table contract(
contractNum int identity(1,1) primary key,
contractDate smalldatetime not null,
tuition money not null,
studentId char(4) not null foreign key
references student (studentId)
on update cascade
on delete cascade,
contactId int not null foreign key
references contact (contactId)
on update cascade
on delete cascade
);|||set nocount on
begin tran
if object_id('dbo.t1') is not null drop table dbo.t1
go
if object_id('dbo.t2') is not null drop table dbo.t2
go
create table dbo.t1 (f1 int not null primary key, f2 char(1) null)
go
create table dbo.t2 (f0 int not null primary key, f1 int not null constraint fk_t2 foreign key references dbo.t1(f1))
go
insert t1 select 1, 'A'
go
insert t2 select 1, f1 from t1
go
select * from t2
go
alter table t2 drop constraint fk_t2
go
alter table t2 add constraint fk_t2 foreign key (f1) references t1(f1) on update cascade
go
update t1 set f1 = 2
go
select * from t2
go
rollback tran
go
set nocount off
Monday, March 19, 2012
how to add Reportviewer Control to webform in VS2003
Hi,
I serached in MSDN.I didn't get how to get REPORTVIEWER control in webform.I don't see any built in reportviewer in VS2003.Can you please guide me how to add that control to my webpage (TOOLBOX).Thank you
HI,srijyothi :
Microsoft Visual Studio 2005 includes report design functionality and ReportViewer controls so that you can add full-featured reports to custom applications. Reports may contain tabular, aggregated, and multidimensional data. ReportViewer controls are provided so that you can process and display the report in your application. There are two versions of the control. TheReportViewer Web server control is used to host reports in ASP.NET projects. TheReportViewer Windows Forms control is used to host reports in Windows application projects.
So i believe the Reportviewer Control is only supported in the Microsoft Visual Studio 2005 and the later version.
You can check out the MSND article for more information:
http://msdn2.microsoft.com/en-us/library/ms251671(VS.80).aspx
http://msdn2.microsoft.com/en-us/library/microsoft.reporting.winforms.reportviewer(VS.80).aspx
If i misunderstand you about your question, please feel free to correct me and i will try to help you with more information.
I hope the above information will be helpful. If you have any issues or concerns, please let me know. It's my pleasure to be of assistance
|||HI,srijyothi :
We are marking this issue as "Answered". If you have any new findings or concerns, please feel free to unmark the issue.
Thank you for your understanding!
Friday, February 24, 2012
How to Add a Calculated Column in Report Builder using a Model Based on a SSAS Cube
I am trying to add a calculated field / column in Report Builder when working with a Report Model built from anAnalysis Services Cube. I can create the calculated Field/Columns, but I get an error whenever I try to use it in a report.
Is there a way to create a report builder calculated column on report models built from a SSAS cube? Is this supported?
Thanks,
Some functions are not supported for calculated fields when running against an SSAS cube, in particular the aggregate functions like Sum, Count, Average, etc. The error message should provide some details on this.
Hope that helps!
|||The support for calculated fields in an SSAS model is better than Bob lets on. Most functions work. The trick is that you need to install Excel 2003 on the Analysis Services server. (Not sure if other versions like Excel 2007 work, but I know Excel 2003 does the trick.)
Report Builder builds MDX that use Excel functions, and for those functions to succeed, Excel has to be installed on the server.
If you agree with me that this is a terrible architecture, vote for this issue:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=124864
|||Are there any online documentation about this? Our IT policy is not to install office or office application on SQL Server boxes.|||Common policy. Vote for that issue at connect.microsoft.com and maybe MS will change this in Katmai.
As for documentation:
http://msdn2.microsoft.com/en-us/library/ms145486.aspx
And documentation of the excel functions that are supported. (Don't know if there's a 2005 version of this page, but they're the same):
http://msdn2.microsoft.com/en-us/library/aa178231(SQL.80).aspx
I suppose one workaround is to code the Excel functions yourself and register them as specified here:
http://geekswithblogs.net/darrengosbell/archive/2006/12/13/100998.aspx
If you have interest in going that route, let me know because there are some gotchas.
How to Add a Calculated Column in Report Builder using a Model Based on a SSAS Cube
I am trying to add a calculated field / column in Report Builder when working with a Report Model built from anAnalysis Services Cube. I can create the calculated Field/Columns, but I get an error whenever I try to use it in a report.
Is there a way to create a report builder calculated column on report models built from a SSAS cube? Is this supported?
Thanks,
Some functions are not supported for calculated fields when running against an SSAS cube, in particular the aggregate functions like Sum, Count, Average, etc. The error message should provide some details on this.
Hope that helps!
|||The support for calculated fields in an SSAS model is better than Bob lets on. Most functions work. The trick is that you need to install Excel 2003 on the Analysis Services server. (Not sure if other versions like Excel 2007 work, but I know Excel 2003 does the trick.)
Report Builder builds MDX that use Excel functions, and for those functions to succeed, Excel has to be installed on the server.
If you agree with me that this is a terrible architecture, vote for this issue:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=124864
|||Are there any online documentation about this? Our IT policy is not to install office or office application on SQL Server boxes.|||Common policy. Vote for that issue at connect.microsoft.com and maybe MS will change this in Katmai.
As for documentation:
http://msdn2.microsoft.com/en-us/library/ms145486.aspx
And documentation of the excel functions that are supported. (Don't know if there's a 2005 version of this page, but they're the same):
http://msdn2.microsoft.com/en-us/library/aa178231(SQL.80).aspx
I suppose one workaround is to code the Excel functions yourself and register them as specified here:
http://geekswithblogs.net/darrengosbell/archive/2006/12/13/100998.aspx
If you have interest in going that route, let me know because there are some gotchas.