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

Tuesday, March 27, 2012

Diplaying Values from fields on the Same Textbox

Hi,
Is it possible to display values from different fields in the same textbox.I
have a field that returns system generated IDs and a field that returns ID
values that have been manually input by the user.
I want values from these fields to display on the same textbox as they act
Product Id for Products that shown on the invoice report.
Does anyone know how I can achieve this?
Regards,
--
Noels
"The Best thing in life is life"You can do this either with the textbox or the query. Let's say you have a
field called sys_id and manual_id.
With a query:
select convert(varchar(15), sys_id) + ' ' + manual_id as product_id from
sometable where ...
That would be my preferred way of handling this.
The other way is to set the textbox to an expression and in the expression
concatenate the two fields.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Noels" <noels@.gmail.com> wrote in message
news:7528B73A-5EF9-4449-A85E-2F816282A148@.microsoft.com...
> Hi,
> Is it possible to display values from different fields in the same
> textbox.I
> have a field that returns system generated IDs and a field that returns ID
> values that have been manually input by the user.
> I want values from these fields to display on the same textbox as they act
> Product Id for Products that shown on the invoice report.
> Does anyone know how I can achieve this?
> Regards,
> --
> Noels
> "The Best thing in life is life"|||Thank you so much,why didnt I think of that!
Noels
"The Best thing in life is life"
"Bruce L-C [MVP]" wrote:
> You can do this either with the textbox or the query. Let's say you have a
> field called sys_id and manual_id.
> With a query:
> select convert(varchar(15), sys_id) + ' ' + manual_id as product_id from
> sometable where ...
> That would be my preferred way of handling this.
> The other way is to set the textbox to an expression and in the expression
> concatenate the two fields.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Noels" <noels@.gmail.com> wrote in message
> news:7528B73A-5EF9-4449-A85E-2F816282A148@.microsoft.com...
> > Hi,
> >
> > Is it possible to display values from different fields in the same
> > textbox.I
> > have a field that returns system generated IDs and a field that returns ID
> > values that have been manually input by the user.
> >
> > I want values from these fields to display on the same textbox as they act
> > Product Id for Products that shown on the invoice report.
> >
> > Does anyone know how I can achieve this?
> >
> > Regards,
> > --
> > Noels
> > "The Best thing in life is life"
>
>

Dimensions with Startdate / Enddate fields

Hi,

I would like to know what is the best practice to manage Dimensions with StartDate / EndDate fields, in SSAS.

Regards

Ayzan

Well first, is it possible to build dimensions with time dependance ?

Regards

Ayzan

Sunday, March 25, 2012

Dimension in Analysis Services 2005

Hello,
How must I make if I want concat two fields of a database in a level of a
dimension in Analysis Services 2005?
Sample : id_Collaborator(10) and Name(Gates) give 10_Gates
Thanks for your help!!
Nico
I generally create a view on the table which concatinates the fields, so
there is nothing to do in Analysis Services... HOwever you may go to
properties at the bottom left of the dimension editor and use a SQL
Expression to concatinate the fields there as well.. Take a look at some of
the data fields in the time dimension, and you should see an example..
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"pralnico" <pralnico@.discussions.microsoft.com> wrote in message
news:79D4B243-2294-47DB-82F1-9B7833BDB867@.microsoft.com...
> Hello,
> How must I make if I want concat two fields of a database in a level of a
> dimension in Analysis Services 2005?
> Sample : id_Collaborator(10) and Name(Gates) give 10_Gates
> Thanks for your help!!
> Nico
>
>
|||You might get more specialized help if you post in the SQL Server 2005
newsgroups.
http://www.aspfaq.com/sql2005/show.asp?id=1
http://www.aspfaq.com/
(Reverse address to reply.)
"pralnico" <pralnico@.discussions.microsoft.com> wrote in message
news:79D4B243-2294-47DB-82F1-9B7833BDB867@.microsoft.com...
> Hello,
> How must I make if I want concat two fields of a database in a level of a
> dimension in Analysis Services 2005?
> Sample : id_Collaborator(10) and Name(Gates) give 10_Gates
> Thanks for your help!!
> Nico
>
>

Dimension in Analysis Services 2005

Hello,
How must I make if I want concat two fields of a database in a level of a
dimension in Analysis Services 2005'
Sample : id_Collaborator(10) and Name(Gates) give 10_Gates
Thanks for your help!!
NicoI generally create a view on the table which concatinates the fields, so
there is nothing to do in Analysis Services... HOwever you may go to
properties at the bottom left of the dimension editor and use a SQL
Expression to concatinate the fields there as well.. Take a look at some of
the data fields in the time dimension, and you should see an example..
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"pralnico" <pralnico@.discussions.microsoft.com> wrote in message
news:79D4B243-2294-47DB-82F1-9B7833BDB867@.microsoft.com...
> Hello,
> How must I make if I want concat two fields of a database in a level of a
> dimension in Analysis Services 2005'
> Sample : id_Collaborator(10) and Name(Gates) give 10_Gates
> Thanks for your help!!
> Nico
>
>|||You might get more specialized help if you post in the SQL Server 2005
newsgroups.
http://www.aspfaq.com/sql2005/show.asp?id=1
--
http://www.aspfaq.com/
(Reverse address to reply.)
"pralnico" <pralnico@.discussions.microsoft.com> wrote in message
news:79D4B243-2294-47DB-82F1-9B7833BDB867@.microsoft.com...
> Hello,
> How must I make if I want concat two fields of a database in a level of a
> dimension in Analysis Services 2005'
> Sample : id_Collaborator(10) and Name(Gates) give 10_Gates
> Thanks for your help!!
> Nico
>
>

Dimension in Analysis Services 2005

Hello,
How must I make if I want concat two fields of a database in a level of a
dimension in Analysis Services 2005'
Sample : id_Collaborator(10) and Name(Gates) give 10_Gates
Thanks for your help!!
NicoI generally create a view on the table which concatinates the fields, so
there is nothing to do in Analysis Services... HOwever you may go to
properties at the bottom left of the dimension editor and use a SQL
Expression to concatinate the fields there as well.. Take a look at some of
the data fields in the time dimension, and you should see an example..
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"pralnico" <pralnico@.discussions.microsoft.com> wrote in message
news:79D4B243-2294-47DB-82F1-9B7833BDB867@.microsoft.com...
> Hello,
> How must I make if I want concat two fields of a database in a level of a
> dimension in Analysis Services 2005'
> Sample : id_Collaborator(10) and Name(Gates) give 10_Gates
> Thanks for your help!!
> Nico
>
>|||You might get more specialized help if you post in the SQL Server 2005
newsgroups.
http://www.aspfaq.com/sql2005/show.asp?id=1
http://www.aspfaq.com/
(Reverse address to reply.)
"pralnico" <pralnico@.discussions.microsoft.com> wrote in message
news:79D4B243-2294-47DB-82F1-9B7833BDB867@.microsoft.com...
> Hello,
> How must I make if I want concat two fields of a database in a level of a
> dimension in Analysis Services 2005'
> Sample : id_Collaborator(10) and Name(Gates) give 10_Gates
> Thanks for your help!!
> Nico
>
>

Monday, March 19, 2012

Differentiate between fields of TWO Datasets in a single report

Dear ppl,

I have got 2 datasets D1 & D2 in a Report. How can i differentiate between the fields of these two.

e.g. I got Name field in both the datasets. So when i do =Fields!Name.Value in a textbox the report gives me error

How can i tell the report from which dataset to pick up the field ?

Regards

Nabeel

Is your textbox inside a Data Region (List, or Table), Or is it placed independently on the form?If is placed independently on the form you would have to reference it using an aggregate expression, using the following format.

=First(Fields!Name.Value, “Scope”)

Scope being then name of the Dataset.

Hope this helps!!!

Roberto Hernández-Pou
http://community.rhphconsulting.net

|||

Normally the text box will be nested in a list control which has a dataset property (when dataset has multiple rows).

Alterantively if you just put the textbox directly into the body of the report, you can use an aggregation function which takes the dataset name as the second parameter e.g.

=First(Fields!Name.Value, "DataSetName")

|||

Hello Nabeel,

Try the following syntax: =(Fields!Name.Value, "Put the name of your dataset here including the quotes")

Regards,
Worf
|||

cheers guys..thanx for the help

||| why the aggregate function is required for the differentiation. cant it just differentiate with the name?|||

It's all to do with context.

Usually, you have an expression such as =Fields!x.Value or =Sum(Fields!x.Value) in a textbox of a matrix, table, or list. Each of these controls needs a dataset property to be specified. This sets the context and hence the dataset from which the field is sourced. This can be overridden within an aggregate function by explicitly specifying the scope of the aggregate. This can either be the name of a group (within the current table or matrix) or an entirely separate dataset.

So in answer to your queation, an aggregate function is not in fact required just to specify the dataset. The dataset is normally inherited from a parent control. If no aggregate function is specified for a cell that is aggregated (groupped) then the First function is applied by default.

Differentiate between fields of TWO Datasets in a single report

Dear ppl,

I have got 2 datasets D1 & D2 in a Report. How can i differentiate between the fields of these two.

e.g. I got Name field in both the datasets. So when i do =Fields!Name.Value in a textbox the report gives me error

How can i tell the report from which dataset to pick up the field ?

Regards

Nabeel

Is your textbox inside a Data Region (List, or Table), Or is it placed independently on the form?If is placed independently on the form you would have to reference it using an aggregate expression, using the following format.

=First(Fields!Name.Value, “Scope”)

Scope being then name of the Dataset.

Hope this helps!!!

Roberto Hernández-Pou
http://community.rhphconsulting.net

|||

Normally the text box will be nested in a list control which has a dataset property (when dataset has multiple rows).

Alterantively if you just put the textbox directly into the body of the report, you can use an aggregation function which takes the dataset name as the second parameter e.g.

=First(Fields!Name.Value, "DataSetName")

|||

Hello Nabeel,

Try the following syntax: =(Fields!Name.Value, "Put the name of your dataset here including the quotes")

Regards,
Worf|||

cheers guys..thanx for the help

||| why the aggregate function is required for the differentiation. cant it just differentiate with the name?|||

It's all to do with context.

Usually, you have an expression such as =Fields!x.Value or =Sum(Fields!x.Value) in a textbox of a matrix, table, or list. Each of these controls needs a dataset property to be specified. This sets the context and hence the dataset from which the field is sourced. This can be overridden within an aggregate function by explicitly specifying the scope of the aggregate. This can either be the name of a group (within the current table or matrix) or an entirely separate dataset.

So in answer to your queation, an aggregate function is not in fact required just to specify the dataset. The dataset is normally inherited from a parent control. If no aggregate function is specified for a cell that is aggregated (groupped) then the First function is applied by default.

Wednesday, March 7, 2012

different results with select count(*)

Hi,
Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
quad processor...
Table with (4) indexes: fields a,b,c,d
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
generates different results (!)
We have dropped and rebuilt the indexes.
The table in question has approx. 2 million rows. The
count(id) query is treturning 11 million rows.
Thoughts?
Thanks in advance,
DanHi,
The count will change based on the number of null values inside the table.
Select count(colmn) will count only the not null values inside the table.
To have the full record count use
select count(*) from table_name
Thanks
Hari
MCDBA
"dan" <djlucarelli@.pa1call.org> wrote in message
news:43e001c4732c$1a133c40$a301280a@.phx.gbl...
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan|||> Thoughts?
Yes, don't allow NULLs, or use SELECT COUNT(*)
http://www.aspfaq.com/
(Reverse address to reply.)|||In addition to the other responses, you may have misconceptions about
how SQL-Server processes a query.
If NULLs are disallowed in the columns id, a, b, c and d, then the
queries
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
will probably all be satisfied with the same query plan. The smallest
index will be used to count the total number of rows. It is highly
unlikely that the query "select count(a) from table" will use the index
on a, and the query "select count(b) from table" the index on b...
If the columns allow and contain NULLs: see the other responses.
Gert-Jan
dan wrote:
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan
(Please reply only to the newsgroup)

different results with select count(*)

Hi,
Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
quad processor...
Table with (4) indexes: fields a,b,c,d
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
generates different results (!)
We have dropped and rebuilt the indexes.
The table in question has approx. 2 million rows. The
count(id) query is treturning 11 million rows.
Thoughts?
Thanks in advance,
DanHi,
The count will change based on the number of null values inside the table.
Select count(colmn) will count only the not null values inside the table.
To have the full record count use
select count(*) from table_name
Thanks
Hari
MCDBA
"dan" <djlucarelli@.pa1call.org> wrote in message
news:43e001c4732c$1a133c40$a301280a@.phx.gbl...
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan|||> Thoughts?
Yes, don't allow NULLs, or use SELECT COUNT(*)
--
http://www.aspfaq.com/
(Reverse address to reply.)|||In addition to the other responses, you may have misconceptions about
how SQL-Server processes a query.
If NULLs are disallowed in the columns id, a, b, c and d, then the
queries
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
will probably all be satisfied with the same query plan. The smallest
index will be used to count the total number of rows. It is highly
unlikely that the query "select count(a) from table" will use the index
on a, and the query "select count(b) from table" the index on b...
If the columns allow and contain NULLs: see the other responses.
Gert-Jan
dan wrote:
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan
--
(Please reply only to the newsgroup)

different results with select count(*)

Hi,
Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
quad processor...
Table with (4) indexes: fields a,b,c,d
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
generates different results (!)
We have dropped and rebuilt the indexes.
The table in question has approx. 2 million rows. The
count(id) query is treturning 11 million rows.
Thoughts?
Thanks in advance,
Dan
Hi,
The count will change based on the number of null values inside the table.
Select count(colmn) will count only the not null values inside the table.
To have the full record count use
select count(*) from table_name
Thanks
Hari
MCDBA
"dan" <djlucarelli@.pa1call.org> wrote in message
news:43e001c4732c$1a133c40$a301280a@.phx.gbl...
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan
|||> Thoughts?
Yes, don't allow NULLs, or use SELECT COUNT(*)
http://www.aspfaq.com/
(Reverse address to reply.)
|||In addition to the other responses, you may have misconceptions about
how SQL-Server processes a query.
If NULLs are disallowed in the columns id, a, b, c and d, then the
queries
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
will probably all be satisfied with the same query plan. The smallest
index will be used to count the total number of rows. It is highly
unlikely that the query "select count(a) from table" will use the index
on a, and the query "select count(b) from table" the index on b...
If the columns allow and contain NULLs: see the other responses.
Gert-Jan
dan wrote:
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan
(Please reply only to the newsgroup)

Friday, February 24, 2012

Different font sizes

If I have two fields in the same cell within a table, is it possible to have
the two fields different font sizes?I don't believe so if they are in the same text box, but if they are in
different text boxes you could.
"David" wrote:
> If I have two fields in the same cell within a table, is it possible to have
> the two fields different font sizes?
>|||Hi David,
Just checking in to see if the suggestions were helpful. Please let us
know if you would like further assistance.
Have a great day!
Sincerely yours,
Wei Lu
Microsoft Online Partner Support
======================================================When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.

Different font size and style in the same table cell

I have a table cell that contains two things:

well code and well type (two different data fields concatenated)

for example:

4WA53102 Verticall Well

I want the code to be 12 pt arial regular

I want the well type to be 8 point italic arial

4WA53102 Vertical Well

How do I do this? Thanks

Why not put well code and well type in adjacent table cells and then you can change the formatting on the cell well code is in and the formatting on the cell well type is in to be different from each other. I don't see how it would be different from what you want to do.

It isn't possible to do what you want the way you want to do it.

Different Fields

I am using Crystal 10 and Access

I am going to try my best to explain what it is I would like to do.

I would like to find away to have data from different fields to display on a crystal report vertically/across from each other.

For Example:

Field1 Field2
PRD 300
LST 200
MET 205
MIS 650
TTP 745

What I would like is for the information to display on the crystal report like this:

PRD 745 200

As you can see from the fields above, the numbers 745 & 200 are not associated with PRD. I cannot seem to find a way to associate one field information from another field information.

Please let me know if I need to try to clear this up.are field1 and field2 of the same table? If so I'm not sure if that's possible. Even if it was I definately wouldn't recomend it. If not then you have another problem - grabbing 2 different records of the same field at the same time. Why is it that you want it to work like that? A little more information about it would certainly help :)