Showing posts with label own. Show all posts
Showing posts with label own. Show all posts

Wednesday, March 7, 2012

Can I use my own Stored Procedure template with SQL2005?

When I go to create a new stored procedure, function, etc. I get a default template... is there anyway to replace this template with one of my own? One that will already have the important information pre-populated (the stuff I always end up having to type in, like company name, etc.).

Hi,

in SQL Server Management Studio, choose View -> Template Explorer. (Or Ctrl + Alt + T). There you can manage templates. Edit them whatsoever.

Friday, February 24, 2012

Can I specify SubReport name at runtime?

I want to combine a bunch of reports (which are stand alone reports on there own) as subreports in a parent or master report. We have done this in Crystal Reprots in order to get a group of reports out in one file.

The issue with Reporting Services is the header and footers of the subreports are not rendered, so I have to repeat the logo information for each subreport in the body of the parent report. I can do this in a table or list or rectangle, but I have to do this for each subreport. Is there any way that I can specify the name of the subreport at runtime? That way I can put everything into a List and drive it from the database. I noticed that the dropdown to select the report name does not allow you to create an expression for this field.

Hi Chaps

I am also attempting to change a SubReport at runtime.
Could you advise if this is possible ? and possibly some sample code.

Regards

JohnJames|||

hey,

I haven't looked at this for a while...... I built a small report to refresh my memory.
I do not think you can do this - you are basically trying to change the report definition at runtime and you can't because it tries to run the report while you are changing it - kind of a chicken-and-the-egg thing.

In my sample I used a server side report - you may be able to do this if it were a local report where you can get the definition (rdl), change the report name in your code, then run the report. This won't help if you are trying to change the report based on data or flags you pass in.

If you are trying to set the subreport name from a database or parameters, you could put all subreports in and hide/show them based on the input parameters/data. This may cause side affects as you can't disable them so all subreports may run anyways (it's been a while - not sure if they run if they are hidden?) and they will still consume some space in the main report unless you put them in a table row or another control that you can hide or show as well....

sorry I couldn't have helped

ESTUMP

|||Thanks for your reply ESTUMP
As you suggest I found that hiding/displaying subreports is a possible solution.
Although rather clunky.

JohnJames

Can I specify SubReport name at runtime?

I want to combine a bunch of reports (which are stand alone reports on there own) as subreports in a parent or master report. We have done this in Crystal Reprots in order to get a group of reports out in one file.

The issue with Reporting Services is the header and footers of the subreports are not rendered, so I have to repeat the logo information for each subreport in the body of the parent report. I can do this in a table or list or rectangle, but I have to do this for each subreport. Is there any way that I can specify the name of the subreport at runtime? That way I can put everything into a List and drive it from the database. I noticed that the dropdown to select the report name does not allow you to create an expression for this field.

Hi Chaps

I am also attempting to change a SubReport at runtime.
Could you advise if this is possible ? and possibly some sample code.

Regards

JohnJames|||

hey,

I haven't looked at this for a while...... I built a small report to refresh my memory.
I do not think you can do this - you are basically trying to change the report definition at runtime and you can't because it tries to run the report while you are changing it - kind of a chicken-and-the-egg thing.

In my sample I used a server side report - you may be able to do this if it were a local report where you can get the definition (rdl), change the report name in your code, then run the report. This won't help if you are trying to change the report based on data or flags you pass in.

If you are trying to set the subreport name from a database or parameters, you could put all subreports in and hide/show them based on the input parameters/data. This may cause side affects as you can't disable them so all subreports may run anyways (it's been a while - not sure if they run if they are hidden?) and they will still consume some space in the main report unless you put them in a table row or another control that you can hide or show as well....

sorry I couldn't have helped

ESTUMP

|||Thanks for your reply ESTUMP
As you suggest I found that hiding/displaying subreports is a possible solution.
Although rather clunky.

JohnJames

Thursday, February 16, 2012

Can I run both a SQL 2000 instance and SQL 2005 Instance on same two node cluster?

I'd like to run a SQL 2000 instance and a SQL2005 instance on the same
two node windows cluster.
Each would have it's own disk groups.
Basically mixed versions of instances on a cluster.
Does anyone know where I can get Microsoft's official statement on
this?
Has anyone done this before?
Yes. This is allowed and supported under most scenarios, but there are some
limitations.
The Microsoft SQL Server support policy for Microsoft Clustering
http://support.microsoft.com/kb/327518
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Sanctus" <mchi55@.hotmail.com> wrote in message
news:1174503282.467053.80730@.l77g2000hsb.googlegro ups.com...
> I'd like to run a SQL 2000 instance and a SQL2005 instance on the same
> two node windows cluster.
> Each would have it's own disk groups.
> Basically mixed versions of instances on a cluster.
> Does anyone know where I can get Microsoft's official statement on
> this?
> Has anyone done this before?
>