Showing posts with label fields. Show all posts
Showing posts with label fields. Show all posts

Friday, March 30, 2012

Is it possible to modify Report Builder template ?

Hi

I would like to be able to modify the basic report template offered by Report Builder , so as to be able to include custom fields that I would like to be present in every report (Company name , Logo , Date , etc) to achieve consistency in the presentation of the reports created with Report Builder

In Bob's Blog he explained how to include RDL expressions in Report Builder
http://blogs.msdn.com/bobmeyers/archive/2006/03/26/561147.aspx

What I would like to do is to use that technique (if possible) to modify the original template or templates offered by Report Builder to include my own fields.

============================================

I will appreciate some comments or suggestions about other approaches that can be used to address the issue mentioned in the first paragraph .

Thanks in advance ,

George

Just create a report as a template, with all your controls on it, and copy the rdl to this directory:

RS 2005:

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject

It will show up in your add new item window. I named my report templates Portrait.rdl and Landscape.rdl with the margins set in each. plus i added a table and changed the cell padding and fonts.

For 2000, I think the location is in \program files\sql server... But i can't remember where. You could search your PC for *.rdl

Anyway, there is a file called report.rdl; that is the default one from MS. One caveat, you will have to do this on every machine as the template is on your local PC.

|||Hi Steve ,

Thank you for your answer . I am refering to the Report Builder (ad-hoc reporting tool), not the Report Designer of Visual Studio .

Have you managed to do something similar with the Report Builder Tool ?

Regards ,

George
|||

My mistake. I have never used the report builder. here are a couple of threads I found, and it doesn't look to promising:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=303097&SiteID=1

and here:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=285749&SiteID=1

|||I see what you mean . Thank you very much for your help

George
|||

Hi,

I am truying to acheive the same. Please let me know if you found the solution.

Regards,

Prakash

|||

Hi
At moment support for templates, styles, and images are not available with report builder. For more information please see: http://www.microsoft.com/sql/technologies/reporting/faq.mspx, http://msdn2.microsoft.com/en-gb/library/aa964121.aspx (Understanding the Product Limitations)

The workaround for this is to have a report (just format) that will be served as template. User will required to open this report (template) then after making the required changes they make copy of the same by doing "Save As" instead of "Save"

Please let me know if you need some more information in this regard.

Regards;
Rakesh

Is it possible to modify Report Builder template ?

Hi

I would like to be able to modify the basic report template offered by Report Builder , so as to be able to include custom fields that I would like to be present in every report (Company name , Logo , Date , etc) to achieve consistency in the presentation of the reports created with Report Builder

In Bob's Blog he explained how to include RDL expressions in Report Builder
http://blogs.msdn.com/bobmeyers/archive/2006/03/26/561147.aspx

What I would like to do is to use that technique (if possible) to modify the original template or templates offered by Report Builder to include my own fields.

============================================

I will appreciate some comments or suggestions about other approaches that can be used to address the issue mentioned in the first paragraph .

Thanks in advance ,

George

Just create a report as a template, with all your controls on it, and copy the rdl to this directory:

RS 2005:

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject

It will show up in your add new item window. I named my report templates Portrait.rdl and Landscape.rdl with the margins set in each. plus i added a table and changed the cell padding and fonts.

For 2000, I think the location is in \program files\sql server... But i can't remember where. You could search your PC for *.rdl

Anyway, there is a file called report.rdl; that is the default one from MS. One caveat, you will have to do this on every machine as the template is on your local PC.

|||Hi Steve ,

Thank you for your answer . I am refering to the Report Builder (ad-hoc reporting tool), not the Report Designer of Visual Studio .

Have you managed to do something similar with the Report Builder Tool ?

Regards ,

George|||

My mistake. I have never used the report builder. here are a couple of threads I found, and it doesn't look to promising:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=303097&SiteID=1

and here:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=285749&SiteID=1

|||I see what you mean . Thank you very much for your help

George|||

Hi,

I am truying to acheive the same. Please let me know if you found the solution.

Regards,

Prakash

|||

Hi
At moment support for templates, styles, and images are not available with report builder. For more information please see: http://www.microsoft.com/sql/technologies/reporting/faq.mspx, http://msdn2.microsoft.com/en-gb/library/aa964121.aspx (Understanding the Product Limitations)

The workaround for this is to have a report (just format) that will be served as template. User will required to open this report (template) then after making the required changes they make copy of the same by doing "Save As" instead of "Save"

Please let me know if you need some more information in this regard.

Regards;
Rakesh

Is it possible to modify Report Builder template ?

Hi

I would like to be able to modify the basic report template offered by Report Builder , so as to be able to include custom fields that I would like to be present in every report (Company name , Logo , Date , etc) to achieve consistency in the presentation of the reports created with Report Builder

In Bob's Blog he explained how to include RDL expressions in Report Builder
http://blogs.msdn.com/bobmeyers/archive/2006/03/26/561147.aspx

What I would like to do is to use that technique (if possible) to modify the original template or templates offered by Report Builder to include my own fields.

============================================

I will appreciate some comments or suggestions about other approaches that can be used to address the issue mentioned in the first paragraph .

Thanks in advance ,

George

Just create a report as a template, with all your controls on it, and copy the rdl to this directory:

RS 2005:

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject

It will show up in your add new item window. I named my report templates Portrait.rdl and Landscape.rdl with the margins set in each. plus i added a table and changed the cell padding and fonts.

For 2000, I think the location is in \program files\sql server... But i can't remember where. You could search your PC for *.rdl

Anyway, there is a file called report.rdl; that is the default one from MS. One caveat, you will have to do this on every machine as the template is on your local PC.

|||Hi Steve ,

Thank you for your answer . I am refering to the Report Builder (ad-hoc reporting tool), not the Report Designer of Visual Studio .

Have you managed to do something similar with the Report Builder Tool ?

Regards ,

George|||

My mistake. I have never used the report builder. here are a couple of threads I found, and it doesn't look to promising:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=303097&SiteID=1

and here:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=285749&SiteID=1

|||I see what you mean . Thank you very much for your help

George|||

Hi,

I am truying to acheive the same. Please let me know if you found the solution.

Regards,

Prakash

|||

Hi
At moment support for templates, styles, and images are not available with report builder. For more information please see: http://www.microsoft.com/sql/technologies/reporting/faq.mspx, http://msdn2.microsoft.com/en-gb/library/aa964121.aspx (Understanding the Product Limitations)

The workaround for this is to have a report (just format) that will be served as template. User will required to open this report (template) then after making the required changes they make copy of the same by doing "Save As" instead of "Save"

Please let me know if you need some more information in this regard.

Regards;
Rakesh

Wednesday, March 28, 2012

Is it possible to join the fields value together?

I am new in crystal report. I have a dataset which like this:

FieldA
---
name1
name2
name3

Now, i want to join them together like this : "name1, name2, name3". I try to use the function join(list, delimiter) but fail. It seem that i should get all the data in place them in a array.
How can I do this? Thanks!!!!!check if this is possible

{database.name1}+{database.name2}+{database.name3}|||Thanks for your reply

However, in my case, all the data which is inside the same field.
For example:

Table1.field1
------
Record 1) A
Record 2) B
Record 3) C

I want to join them to "A, B, C" and display in the report
Anyone know how to do? Thanks!!!|||What groups these 3 records together, so that you know they are related? e.g. so that "A, B, C" comes out on a separate line to "D, E, F".
Group on this, and create 3 formulas:

@.init (in the suppressed group header)
whileprintingrecords;
stringvar group_list := "";

@.add (in the suppressed details)
whileprintingrecords;
stringvar group_list;
if group_list <> "" then group_list := group_list + ", ";
group_list := group_list + {table.field};

@.display (in the group footer)
whileprintingrecords;
stringvar group_list

Monday, March 26, 2012

Is it possible to hide a field or fields based on User Groups?

RS 2000

I have a report that has a few sensitive fields and would only like to show them to a certain AD group.

Is this possible?
Hi,

sure this is possible through custom .NET code. Implement your own Active Driectory checking class and use that within reporting Services. Based on this class you can make the textbox Visible or Hidden.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Friday, March 23, 2012

Is it possible to do this?

In an OLAP data source view I added ten additional fields to it based on certain conditions and it is used for the aggregation for a report. It is only stored as a number '0' or '1' so that I can sum it up for the report as a measure. It is working fine in the report. However I want to reperesent this ten additional fields on the X axis on a graph and I am not sure how to achieve this. It sounds like the reverse of the "pivot table", creating multiple rows (10 in my case) from a single rows of record. I have created a dimension with this ten fields. My question is how to merge this with another two new field, one to capture the column heading and the other to capture the value of it in an OLAP dataset. Thanks.Actually the MDX function I am looking for is "UNPIVOT" like in T-Sql.

Wednesday, March 7, 2012

Is is a good practice to use autoincrement in access

Hi just new here in the forum i have a question

is it a good practice to use autoincrement fields in an access database for master and detail? and for unique record identification. if not please tell why..
im currently using access and with autoincrement for unique record identification and for master and detail.. then there is a possibilities to transfer from access to mssql. will i encounter problems when migrating since i am using an autoincrement fields

in mssql is there an autoincrement fields like access?

dont be harsh ok.. just anoob trying to learn. :eek:The equivalent of autoincrement in SQL server is the IDENTITY property.
It is possible to port existing ID values into a SQL Server table with an identity property set, but to do so you will need to temporarily turn off the identity property, and then reset it when the data load is complete.
The upsizing wizard for Access -> SQL Server may handle this for you.|||The equivalent of autoincrement in SQL server is the IDENTITY property.
It is possible to port existing ID values into a SQL Server table with an identity property set, but to do so you will need to temporarily turn off the identity property, and then reset it when the data load is complete.
The upsizing wizard for Access -> SQL Server may handle this for you.

thanks for the fast reply blindman.. but, is it a good practice to use autoincrement in a master detail ?? my master table will have an autoincrement fields, my detail will have a longint field to accomodate for the master's autoincrement field.
i will be using this method on a library program ..|||What is going to be the primary key of the detail table? A natural composite key including the master ID, or are you going to create a new surrogate key (possibly autoincremented)?|||What is going to be the primary key of the detail table? A natural composite key including the master ID, or are you going to create a new surrogate key (possibly autoincremented)?

the primary key of the detail table will be another autoincrement fields but with no relation whatsoever on the master field.|||An surrogate key on a detail table is not required, though it may facilitate SQL coding and programming the interface. You can leave it off and still have functional database design using the natural key of the detail table. Note that the natural key of the detail table is usually a composite of the surrogate key of the master table and some detail element that is unique within each master record.
One other thing; you keep asking whether it is good practice to use an autoincrementing column for a key. In SQL Server you basically have two choices for surrogate keys, and those are auto-incrementing identity values and GUIDs (Globally Unique Identifiers). Stick to using either of these. By definition surrogate keys should bear no relation to the underlying data, so you shouldn't be spending time mucking arround with methods of generating them. Hence, auto-generated surrogate keys such as Idenity columns and GUIDs are preferred.|||An surrogate key on a detail table is not required, though it may facilitate SQL coding and programming the interface. You can leave it off and still have functional database design using the natural key of the detail table. Note that the natural key of the detail table is usually a composite of the surrogate key of the master table and some detail element that is unique within each master record.
One other thing; you keep asking whether it is good practice to use an autoincrementing column for a key. In SQL Server you basically have two choices for surrogate keys, and those are auto-incrementing identity values and GUIDs (Globally Unique Identifiers). Stick to using either of these. By definition surrogate keys should bear no relation to the underlying data, so you shouldn't be spending time mucking arround with methods of generating them. Hence, auto-generated surrogate keys such as Idenity columns and GUIDs are preferred.

thanks.. i thought that i am at a lost.. thanks for clarifying those things. at least now i can sleep well coz i wont change the autoincrement fields into my own generated nos.. thanks again blindman. your a great help..

Monday, February 20, 2012

Is Count(*) faster than Count(Field)?

So I know not to do a Select * unless I need all the fields, but what about
Count(*)? Is that somehow (internally) slower than Count(FieldName)?First, is the column in question allow NULLs, then the two options doesn't e
ven do this same thing.
COUNT(*) counts all rows, where COUNT(colname) count rows where value for th
e column isn't NULL.
Assuming the column is defined as NOT NULL, then there is a possibly perform
ance advantage of using
COUNT(*), as SQL server can use a non-clustered index on *any* column in the
table to count the
rows. Hopefully, SQL Server will pick a non-clustered index on the smallest
column, where you fit
most rows on a data page, meaning the least amount of I/O. If you specify a
certain column, then SQL
Server *might* be smart enough to realize in simple cases that using any ind
ex is the same as using
an index over that particular column, but I wouldn't trust it.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"D. Patrick" <replywithinthegroup@.thenotreal.com> wrote in message
news:5_1ag.2874$9W5.1637@.tornado.socal.rr.com...
> So I know not to do a Select * unless I need all the fields, but what abou
t Count(*)? Is that
> somehow (internally) slower than Count(FieldName)?
>|||I saw someone suggested using count(1) and said that is the fastest to count
rows. Just like gurus to confirm.
James
"D. Patrick" wrote:

> So I know not to do a Select * unless I need all the fields, but what abou
t
> Count(*)? Is that somehow (internally) slower than Count(FieldName)?
>
>|||You can theoretically find a *slightly* faster initial parse time for that q
uery compared COUNT(*)
(at least this holds for EXISTS, I take it the same is for COUNT()). But the
execution plan should
be the same, and we are talking about a few clock-cycles here, nothing you w
orry about in an RDBMS.
It is unlikely that you will be able to even measure such a difference with
any significance (unless
you have some 1000 columns in the table, and I still don't think you'll see
a significant
difference). And, remember this is parse time for the query, not something t
hat happens for every
row, or even every execution (assuming your plans are re-used).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"James Ma" <JamesMa@.discussions.microsoft.com> wrote in message
news:0850C483-D5D2-4614-8C74-6770B5162836@.microsoft.com...[vbcol=seagreen]
>I saw someone suggested using count(1) and said that is the fastest to coun
t
> rows. Just like gurus to confirm.
> James
> "D. Patrick" wrote:
>|||It has been said about Oracle that this makes a difference. I don't know
about Oracle, but on SQL Server it makes zero difference. "SELECT
COUNT(1) FROM ..." is no faster than "SELECT COUNT(*) FROM ..." (it is
equally fast).
Gert-Jan
James Ma wrote:[vbcol=seagreen]
> I saw someone suggested using count(1) and said that is the fastest to cou
nt
> rows. Just like gurus to confirm.
> James
> "D. Patrick" wrote:
>|||why dont you use the report on the query to see the time expend in such
query?
Bruno Alexandre
(a Portuguese in Denmark)
"D. Patrick" <replywithinthegroup@.thenotreal.com> escreveu na mensagem
news:5_1ag.2874$9W5.1637@.tornado.socal.rr.com...
> So I know not to do a Select * unless I need all the fields, but what
> about Count(*)? Is that somehow (internally) slower than
> Count(FieldName)?
>

Is Count(*) faster than Count(Field)?

So I know not to do a Select * unless I need all the fields, but what about
Count(*)? Is that somehow (internally) slower than Count(FieldName)?First, is the column in question allow NULLs, then the two options doesn't even do this same thing.
COUNT(*) counts all rows, where COUNT(colname) count rows where value for the column isn't NULL.
Assuming the column is defined as NOT NULL, then there is a possibly performance advantage of using
COUNT(*), as SQL server can use a non-clustered index on *any* column in the table to count the
rows. Hopefully, SQL Server will pick a non-clustered index on the smallest column, where you fit
most rows on a data page, meaning the least amount of I/O. If you specify a certain column, then SQL
Server *might* be smart enough to realize in simple cases that using any index is the same as using
an index over that particular column, but I wouldn't trust it.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"D. Patrick" <replywithinthegroup@.thenotreal.com> wrote in message
news:5_1ag.2874$9W5.1637@.tornado.socal.rr.com...
> So I know not to do a Select * unless I need all the fields, but what about Count(*)? Is that
> somehow (internally) slower than Count(FieldName)?
>|||I saw someone suggested using count(1) and said that is the fastest to count
rows. Just like gurus to confirm.
James
"D. Patrick" wrote:
> So I know not to do a Select * unless I need all the fields, but what about
> Count(*)? Is that somehow (internally) slower than Count(FieldName)?
>
>|||You can theoretically find a *slightly* faster initial parse time for that query compared COUNT(*)
(at least this holds for EXISTS, I take it the same is for COUNT()). But the execution plan should
be the same, and we are talking about a few clock-cycles here, nothing you worry about in an RDBMS.
It is unlikely that you will be able to even measure such a difference with any significance (unless
you have some 1000 columns in the table, and I still don't think you'll see a significant
difference). And, remember this is parse time for the query, not something that happens for every
row, or even every execution (assuming your plans are re-used).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"James Ma" <JamesMa@.discussions.microsoft.com> wrote in message
news:0850C483-D5D2-4614-8C74-6770B5162836@.microsoft.com...
>I saw someone suggested using count(1) and said that is the fastest to count
> rows. Just like gurus to confirm.
> James
> "D. Patrick" wrote:
>> So I know not to do a Select * unless I need all the fields, but what about
>> Count(*)? Is that somehow (internally) slower than Count(FieldName)?
>>|||It has been said about Oracle that this makes a difference. I don't know
about Oracle, but on SQL Server it makes zero difference. "SELECT
COUNT(1) FROM ..." is no faster than "SELECT COUNT(*) FROM ..." (it is
equally fast).
Gert-Jan
James Ma wrote:
> I saw someone suggested using count(1) and said that is the fastest to count
> rows. Just like gurus to confirm.
> James
> "D. Patrick" wrote:
> > So I know not to do a Select * unless I need all the fields, but what about
> > Count(*)? Is that somehow (internally) slower than Count(FieldName)?
> >
> >
> >|||why dont you use the report on the query to see the time expend in such
query?
--
Bruno Alexandre
(a Portuguese in Denmark)
"D. Patrick" <replywithinthegroup@.thenotreal.com> escreveu na mensagem
news:5_1ag.2874$9W5.1637@.tornado.socal.rr.com...
> So I know not to do a Select * unless I need all the fields, but what
> about Count(*)? Is that somehow (internally) slower than
> Count(FieldName)?
>