Showing posts with label save. Show all posts
Showing posts with label save. Show all posts

Wednesday, March 21, 2012

Please Assist... Report Templates to save time in designing

In RS 2000 I was able to create a template report and put it in the Project
Items directory, then when I would select New Report Item, I could choose my
template report instead of redesigning everything from scratch.
Where is this folder, or to better phrase this question:
Where do I put my template reports that I want to show up when I choose "Add
new report item" in the designer in SQL 2005 RS?
I have checked the folders - but obviously I am missing something.
Thanks in advance!
=-ChrisI had to search through my computer for *.rdl files. Finally I think I found
the templates at
C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject
Kaisa M. Lindahl Lervik
"Chris Conner" <Chris.Conner@.NOSPAMPolarisLibrary.com> wrote in message
news:uOtrsue%23GHA.1220@.TK2MSFTNGP05.phx.gbl...
> In RS 2000 I was able to create a template report and put it in the
> Project
> Items directory, then when I would select New Report Item, I could choose
> my
> template report instead of redesigning everything from scratch.
> Where is this folder, or to better phrase this question:
> Where do I put my template reports that I want to show up when I choose
> "Add
> new report item" in the designer in SQL 2005 RS?
> I have checked the folders - but obviously I am missing something.
> Thanks in advance!
> =-Chris
>

Monday, March 12, 2012

Placing Comments In Views

Is it possible to add comment lines to views? I tried using -- and /* . . .
but these lines were removed upon save. I tried using the property window,
but that cleared out my query.
Yes, make sure you have the comment inside the CREATE VIEW, such as
CREATE VIEW v
AS
--MyComment
SELECT 1 AS a
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jim" <Jim@.discussions.microsoft.com> wrote in message
news:53FCF340-8E7A-495C-BD84-0C8A7882B001@.microsoft.com...
> Is it possible to add comment lines to views? I tried using -- and /* . . .
> but these lines were removed upon save. I tried using the property window,
> but that cleared out my query.
|||I did what you suggested, but it still didn't do what I expected. So, I used
a query as simple as yours . . . and it did do what I expected. Could it be
that the comments in the property window don't work on views with UNION
queries?
Just to be clear: If I access the property window within DESIGN mode, the
comments do not appear. But if I access the property box from the list of
all views window, I do see my comment after the CREATE VIEW statement.
"Tibor Karaszi" wrote:

> Yes, make sure you have the comment inside the CREATE VIEW, such as
> CREATE VIEW v
> AS
> --MyComment
> SELECT 1 AS a
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Jim" <Jim@.discussions.microsoft.com> wrote in message
> news:53FCF340-8E7A-495C-BD84-0C8A7882B001@.microsoft.com...
>
|||Probably some GUI problem with Enterprise Manager. I did a simple test with below view:
CREATE VIEW v2
AS
--MyComment
SELECT 1 AS a
UNION ALL
SELECT 1 AS a
And the comment does not show, as you say. I don't use EM for view design myself. My guess is that
with a more complex query, the parsing that EM does of the view isn't smart enough to extract the
comment. I guess you could call it a bug and open a case with MS for it. I prefer writing the views
from Query analyzer...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jim" <Jim@.discussions.microsoft.com> wrote in message
news:04C89683-D9BF-482A-AFBF-7915F0621F85@.microsoft.com...[vbcol=seagreen]
>I did what you suggested, but it still didn't do what I expected. So, I used
> a query as simple as yours . . . and it did do what I expected. Could it be
> that the comments in the property window don't work on views with UNION
> queries?
> Just to be clear: If I access the property window within DESIGN mode, the
> comments do not appear. But if I access the property box from the list of
> all views window, I do see my comment after the CREATE VIEW statement.
> "Tibor Karaszi" wrote:
|||Just one more note: if I add the comments via script, but then make a change
via EM and/or Visual Studio - saving the changes loses the comment lines.
But thanks, I got what I need . . . I'll just make sure the comments are in
the scripts we deliver to our customers.
"Tibor Karaszi" wrote:

> Probably some GUI problem with Enterprise Manager. I did a simple test with below view:
> CREATE VIEW v2
> AS
> --MyComment
> SELECT 1 AS a
> UNION ALL
> SELECT 1 AS a
> And the comment does not show, as you say. I don't use EM for view design myself. My guess is that
> with a more complex query, the parsing that EM does of the view isn't smart enough to extract the
> comment. I guess you could call it a bug and open a case with MS for it. I prefer writing the views
> from Query analyzer...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Jim" <Jim@.discussions.microsoft.com> wrote in message
> news:04C89683-D9BF-482A-AFBF-7915F0621F85@.microsoft.com...
>

Placing Comments In Views

Is it possible to add comment lines to views? I tried using -- and /* . . .
but these lines were removed upon save. I tried using the property window,
but that cleared out my query.Yes, make sure you have the comment inside the CREATE VIEW, such as
CREATE VIEW v
AS
--MyComment
SELECT 1 AS a
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jim" <Jim@.discussions.microsoft.com> wrote in message
news:53FCF340-8E7A-495C-BD84-0C8A7882B001@.microsoft.com...
> Is it possible to add comment lines to views? I tried using -- and /* . . .
> but these lines were removed upon save. I tried using the property window,
> but that cleared out my query.|||I did what you suggested, but it still didn't do what I expected. So, I used
a query as simple as yours . . . and it did do what I expected. Could it be
that the comments in the property window don't work on views with UNION
queries?
Just to be clear: If I access the property window within DESIGN mode, the
comments do not appear. But if I access the property box from the list of
all views window, I do see my comment after the CREATE VIEW statement.
"Tibor Karaszi" wrote:
> Yes, make sure you have the comment inside the CREATE VIEW, such as
> CREATE VIEW v
> AS
> --MyComment
> SELECT 1 AS a
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Jim" <Jim@.discussions.microsoft.com> wrote in message
> news:53FCF340-8E7A-495C-BD84-0C8A7882B001@.microsoft.com...
> > Is it possible to add comment lines to views? I tried using -- and /* . . .
> > but these lines were removed upon save. I tried using the property window,
> > but that cleared out my query.
>|||Probably some GUI problem with Enterprise Manager. I did a simple test with below view:
CREATE VIEW v2
AS
--MyComment
SELECT 1 AS a
UNION ALL
SELECT 1 AS a
And the comment does not show, as you say. I don't use EM for view design myself. My guess is that
with a more complex query, the parsing that EM does of the view isn't smart enough to extract the
comment. I guess you could call it a bug and open a case with MS for it. I prefer writing the views
from Query analyzer...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jim" <Jim@.discussions.microsoft.com> wrote in message
news:04C89683-D9BF-482A-AFBF-7915F0621F85@.microsoft.com...
>I did what you suggested, but it still didn't do what I expected. So, I used
> a query as simple as yours . . . and it did do what I expected. Could it be
> that the comments in the property window don't work on views with UNION
> queries?
> Just to be clear: If I access the property window within DESIGN mode, the
> comments do not appear. But if I access the property box from the list of
> all views window, I do see my comment after the CREATE VIEW statement.
> "Tibor Karaszi" wrote:
>> Yes, make sure you have the comment inside the CREATE VIEW, such as
>> CREATE VIEW v
>> AS
>> --MyComment
>> SELECT 1 AS a
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Jim" <Jim@.discussions.microsoft.com> wrote in message
>> news:53FCF340-8E7A-495C-BD84-0C8A7882B001@.microsoft.com...
>> > Is it possible to add comment lines to views? I tried using -- and /* . . .
>> > but these lines were removed upon save. I tried using the property window,
>> > but that cleared out my query.
>>|||Just one more note: if I add the comments via script, but then make a change
via EM and/or Visual Studio - saving the changes loses the comment lines.
But thanks, I got what I need . . . I'll just make sure the comments are in
the scripts we deliver to our customers.
"Tibor Karaszi" wrote:
> Probably some GUI problem with Enterprise Manager. I did a simple test with below view:
> CREATE VIEW v2
> AS
> --MyComment
> SELECT 1 AS a
> UNION ALL
> SELECT 1 AS a
> And the comment does not show, as you say. I don't use EM for view design myself. My guess is that
> with a more complex query, the parsing that EM does of the view isn't smart enough to extract the
> comment. I guess you could call it a bug and open a case with MS for it. I prefer writing the views
> from Query analyzer...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Jim" <Jim@.discussions.microsoft.com> wrote in message
> news:04C89683-D9BF-482A-AFBF-7915F0621F85@.microsoft.com...
> >I did what you suggested, but it still didn't do what I expected. So, I used
> > a query as simple as yours . . . and it did do what I expected. Could it be
> > that the comments in the property window don't work on views with UNION
> > queries?
> >
> > Just to be clear: If I access the property window within DESIGN mode, the
> > comments do not appear. But if I access the property box from the list of
> > all views window, I do see my comment after the CREATE VIEW statement.
> >
> > "Tibor Karaszi" wrote:
> >
> >> Yes, make sure you have the comment inside the CREATE VIEW, such as
> >>
> >> CREATE VIEW v
> >> AS
> >> --MyComment
> >> SELECT 1 AS a
> >>
> >>
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >> Blog: http://solidqualitylearning.com/blogs/tibor/
> >>
> >>
> >> "Jim" <Jim@.discussions.microsoft.com> wrote in message
> >> news:53FCF340-8E7A-495C-BD84-0C8A7882B001@.microsoft.com...
> >> > Is it possible to add comment lines to views? I tried using -- and /* . . .
> >> > but these lines were removed upon save. I tried using the property window,
> >> > but that cleared out my query.
> >>
> >>
>

Placing Comments In Views

Is it possible to add comment lines to views? I tried using -- and /* . . .
but these lines were removed upon save. I tried using the property window,
but that cleared out my query.Yes, make sure you have the comment inside the CREATE VIEW, such as
CREATE VIEW v
AS
--MyComment
SELECT 1 AS a
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jim" <Jim@.discussions.microsoft.com> wrote in message
news:53FCF340-8E7A-495C-BD84-0C8A7882B001@.microsoft.com...
> Is it possible to add comment lines to views? I tried using -- and /* . .
.
> but these lines were removed upon save. I tried using the property window
,
> but that cleared out my query.|||I did what you suggested, but it still didn't do what I expected. So, I use
d
a query as simple as yours . . . and it did do what I expected. Could it be
that the comments in the property window don't work on views with UNION
queries?
Just to be clear: If I access the property window within DESIGN mode, the
comments do not appear. But if I access the property box from the list of
all views window, I do see my comment after the CREATE VIEW statement.
"Tibor Karaszi" wrote:

> Yes, make sure you have the comment inside the CREATE VIEW, such as
> CREATE VIEW v
> AS
> --MyComment
> SELECT 1 AS a
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Jim" <Jim@.discussions.microsoft.com> wrote in message
> news:53FCF340-8E7A-495C-BD84-0C8A7882B001@.microsoft.com...
>|||Probably some GUI problem with Enterprise Manager. I did a simple test with
below view:
CREATE VIEW v2
AS
--MyComment
SELECT 1 AS a
UNION ALL
SELECT 1 AS a
And the comment does not show, as you say. I don't use EM for view design my
self. My guess is that
with a more complex query, the parsing that EM does of the view isn't smart
enough to extract the
comment. I guess you could call it a bug and open a case with MS for it. I p
refer writing the views
from Query analyzer...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jim" <Jim@.discussions.microsoft.com> wrote in message
news:04C89683-D9BF-482A-AFBF-7915F0621F85@.microsoft.com...[vbcol=seagreen]
>I did what you suggested, but it still didn't do what I expected. So, I us
ed
> a query as simple as yours . . . and it did do what I expected. Could it
be
> that the comments in the property window don't work on views with UNION
> queries?
> Just to be clear: If I access the property window within DESIGN mode, the
> comments do not appear. But if I access the property box from the list of
> all views window, I do see my comment after the CREATE VIEW statement.
> "Tibor Karaszi" wrote:
>|||Just one more note: if I add the comments via script, but then make a change
via EM and/or Visual Studio - saving the changes loses the comment lines.
But thanks, I got what I need . . . I'll just make sure the comments are in
the scripts we deliver to our customers.
"Tibor Karaszi" wrote:

> Probably some GUI problem with Enterprise Manager. I did a simple test wit
h below view:
> CREATE VIEW v2
> AS
> --MyComment
> SELECT 1 AS a
> UNION ALL
> SELECT 1 AS a
> And the comment does not show, as you say. I don't use EM for view design
myself. My guess is that
> with a more complex query, the parsing that EM does of the view isn't smar
t enough to extract the
> comment. I guess you could call it a bug and open a case with MS for it. I
prefer writing the views
> from Query analyzer...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Jim" <Jim@.discussions.microsoft.com> wrote in message
> news:04C89683-D9BF-482A-AFBF-7915F0621F85@.microsoft.com...
>