Showing posts with label depending. Show all posts
Showing posts with label depending. Show all posts

Friday, March 23, 2012

Multipurpose Foreign Key

I've got a field [user.unitID] that can be a foreign key on the table
[Base] *OR* the table [Command] depending on the value of [User.role]
(see "Structure," below).

Question 1: Is this poor DB design?
Question2: If this is okay DB design (or, if I can't change this DB),
how do I perform a join?

I started writing a sproc (see "Beginnings of sproc," below), which
will definitely work, once I get it set up, but when I do these sorts
of things, I later come to find that there was a straight SQL way to
do it. So, is there a straight SQL way to do this, building joins with
CASEs, or something like that?

Thanks,
Jamie

## Structure (simplified) ##

[USER]
userID
unitID
role -- values can be 'B' or 'C' referring to [base] or [command] tbl

[BASE]
ID
NAME

[COMMAND]
ID
NAME

## Beginnings of a sproc ##

GO
USE myDB
IF EXISTS (SELECT name FROM sysobjects
WHERE name = 'getSessionInfo' AND type = 'P')
DROP PROCEDURE getSessionInfo
GO
USE myDB
GO
CREATE PROCEDURE getSessionInfo
@.userID varchar(50),
@.password varchar(50)
AS

DECLARE @.myUnitType varchar(2);

SELECT @.myUnitType = unitType
FROM
[user]
WHERE userID = @.userID
AND [password] = @.password

... blah blah blahJamie Jackson (wasteNOSPAMbasket@.bigfoot.com) writes:
> I've got a field [user.unitID] that can be a foreign key on the table
> [Base] *OR* the table [Command] depending on the value of [User.role]
> (see "Structure," below).
> Question 1: Is this poor DB design?

It is certainly not the plain standard design. And the method has the
apparent advantage that you can use FOREIGN-KEY constraint to enforce
the integrity, but you need to rely on triggers.

But since I know very little of your business problem, I am hesitant
to label the design as outright bad, or even poor. What I can say, is
that had I had the problem, I would definitely have looked into a solution
that would have permitted me to use DRI, but that would definitely have
been a case of fitting the solution to the tool.

> Question2: If this is okay DB design (or, if I can't change this DB),
> how do I perform a join?

Depends a little on the output, but say you want user and name of
base or command:

SELECT u.name, u.role, rolename = coalece(b.name, c.name)
FROM users u
LEFT JOIN base b ON u.role = 'B'
AND u.unitid = b.unitid
LEFT JOIN command c ON u.role = 'C'
AND u.unitid = c.unitid

An alternative is to introduce a basecommand table, to gather common
information, but I don't know enough about your business problem to
say whether this is a good idea or not.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Jamie Jackson wrote:
> I've got a field [user.unitID] that can be a foreign key on the table
> [Base] *OR* the table [Command] depending on the value of [User.role]
> (see "Structure," below).
> Question 1: Is this poor DB design?
<snip
Yes. A table represents something. In your case a User, a Base or a
Command. In your design you specify whether a User can have a relation
with a Base or not. If it can have a relation, then this means there is
a foreign key column (or a relation table) for this specific relation.
For Command you make the same decision.

So in your case, User should have one column with a foreign key
constraint to Base, and another column with a foreign key constraint to
Command. You make the relations optional by allowing NULL values in the
foreign key columns.

If this is an Object Oriented design (for example, when Command extends
from Base), then you are in trouble, because OO and RDBMS don't map very
well.

Hope this helps,
Gert-Jan|||Thanks, Erland, that SQL was a nice tutorial on filtered joins and the
coalesce function, neither of which I've ever used.

Thanks,
Jamie

On Wed, 16 Jul 2003 21:54:51 +0000 (UTC), Erland Sommarskog
<sommar@.algonet.se> wrote:

>Jamie Jackson (wasteNOSPAMbasket@.bigfoot.com) writes:
>> I've got a field [user.unitID] that can be a foreign key on the table
>> [Base] *OR* the table [Command] depending on the value of [User.role]
>> (see "Structure," below).
>>
>> Question 1: Is this poor DB design?
>It is certainly not the plain standard design. And the method has the
>apparent advantage that you can use FOREIGN-KEY constraint to enforce
>the integrity, but you need to rely on triggers.
>But since I know very little of your business problem, I am hesitant
>to label the design as outright bad, or even poor. What I can say, is
>that had I had the problem, I would definitely have looked into a solution
>that would have permitted me to use DRI, but that would definitely have
>been a case of fitting the solution to the tool.
>> Question2: If this is okay DB design (or, if I can't change this DB),
>> how do I perform a join?
>Depends a little on the output, but say you want user and name of
>base or command:
>
> SELECT u.name, u.role, rolename = coalece(b.name, c.name)
> FROM users u
> LEFT JOIN base b ON u.role = 'B'
> AND u.unitid = b.unitid
> LEFT JOIN command c ON u.role = 'C'
> AND u.unitid = c.unitid
>An alternative is to introduce a basecommand table, to gather common
>information, but I don't know enough about your business problem to
>say whether this is a good idea or not.

Wednesday, March 21, 2012

Multiple view from a single select statement

Hi,
I want to write an SQL query which should return me 2 kinds of outputs depending on which condition is true. i.e.

the query should be something like

select someview if (condition1 = true)
else select someotherview if (condition2 = true)

where someview is a set of columns from one table only, and someotherview is a set of columns which is a superset of someview (& is generated from two tables, which have no common field)

Let me explain this further --
I want to select data from one table and a single field from other table, however if I the first table does not return any data, I still want data from the other table to be returned.
Can I write a SQL query to do this?

-- Amitdo a union query.

select * from table1
union
select 'ed' from table2;

if table 1 is return not rows table2 will still return data.

Does this answer your question?|||Originally posted by edwinjames
do a union query.

select * from table1
union
select 'ed' from table2;

if table 1 is return not rows table2 will still return data.

Does this answer your question?

I know, that I can use a union, however I want to support TimesTen & Oracle using thsame query...TT does not allow union while oracle does, can I write another query which emulates union?|||I am sorry I am not farmiliar with TT.

Does it support outer joins?|||Originally posted by edwinjames
I am sorry I am not farmiliar with TT.

Does it support outer joins?

Yes it dows, hence I am now using outer joins|||Glad to be of help

:)

Saturday, February 25, 2012

Multiple sections in report?

Perhaps I'm only overlooking something very simple?
I want to display different columns from my resultset, depending of the data
in one column. I also want to apply different styles depending on that
"controlling" column. I understand that I in a Table can define attributes
for the whole row (same as when you select the "left" portion of a row),
which can be based of the value of that row. But what if I want to display
different columns, based on the data?
Example:
* A dataset with a datetime column. We want to sort by this in the report.
Earliest event at the top.
* Each row represent different activities over the day. One column define
type of activity.
* Depending of the type of activity, I want to display different columns
from the dataset. Ideally, I want to control horizontal position depending
on the type of activity.
I believe that Crystal is using the term "Multiple Sections" for this, but
I'm not sure about the terminology.
Thanks
TiborTibor,
You can base the column field on a expression,e.g.
=Iif(Fields!A.Value=<expression>, Fields!B.Value, Fields!C.Value).
<expression> can reference to a field value or call to an embedded or
external function.
In addition, you can implement conditional formatting, e.g. identity the
column value based on the condition, coloring cells, etc.
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com : http://tinyurl.com/3l49j
Home page and blog: http://www.prologika.com/
----
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uCjSU4CjEHA.3664@.TK2MSFTNGP12.phx.gbl...
> Perhaps I'm only overlooking something very simple?
> I want to display different columns from my resultset, depending of the
data
> in one column. I also want to apply different styles depending on that
> "controlling" column. I understand that I in a Table can define attributes
> for the whole row (same as when you select the "left" portion of a row),
> which can be based of the value of that row. But what if I want to display
> different columns, based on the data?
> Example:
> * A dataset with a datetime column. We want to sort by this in the report.
> Earliest event at the top.
> * Each row represent different activities over the day. One column define
> type of activity.
> * Depending of the type of activity, I want to display different columns
> from the dataset. Ideally, I want to control horizontal position depending
> on the type of activity.
> I believe that Crystal is using the term "Multiple Sections" for this, but
> I'm not sure about the terminology.
> Thanks
> Tibor
>|||Thanks Teo,
I understand those options, but it will become too much of a mess as you want to do more changes.
I had problems understanding what the customer wanted until he showed me this in Crystal. Imagine that you
have several sections (like page header/body/footer). In effect, you have several bodies, and position the
columns freely into each section. In section A I want column x and z, with this formatting. In section B I
want columns z and y and g, having the desired formatting. Etc. Then you say a condition which determines
which section is to be used for the row data. For example, if the value for column A is this, use section A
for the row. If the value is B, use section F.
I very much doubt this can be done using the table control, as you cannot align columns conditionally (column
width etc based on a value in the row). Methinks.
Possibly by just positioning out text boxes etc, but I can't really see how you can define several "sections",
and control which section is to be used for the row data.
I have a feeling this cannot be done using current version of RS. This is fine, considering it is a 1.0
product after all. The customer understand this as well. I just wanted to see whether I missed something.
(None of the three books I have mention anything along this line. I recall asking for your book as well, but
the store didn't have it. Looking forward to go through that too when I get my hands on it. :-) ).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message news:OF$jESEjEHA.3232@.TK2MSFTNGP10.phx.gbl...
> Tibor,
> You can base the column field on a expression,e.g.
> =Iif(Fields!A.Value=<expression>, Fields!B.Value, Fields!C.Value).
> <expression> can reference to a field value or call to an embedded or
> external function.
> In addition, you can implement conditional formatting, e.g. identity the
> column value based on the condition, coloring cells, etc.
> --
> Hope this helps.
> ----
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website: http://www.manning.com/lachev
> Buy it from Amazon.com : http://tinyurl.com/3l49j
> Home page and blog: http://www.prologika.com/
> ----
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:uCjSU4CjEHA.3664@.TK2MSFTNGP12.phx.gbl...
> > Perhaps I'm only overlooking something very simple?
> >
> > I want to display different columns from my resultset, depending of the
> data
> > in one column. I also want to apply different styles depending on that
> > "controlling" column. I understand that I in a Table can define attributes
> > for the whole row (same as when you select the "left" portion of a row),
> > which can be based of the value of that row. But what if I want to display
> > different columns, based on the data?
> >
> > Example:
> > * A dataset with a datetime column. We want to sort by this in the report.
> > Earliest event at the top.
> > * Each row represent different activities over the day. One column define
> > type of activity.
> > * Depending of the type of activity, I want to display different columns
> > from the dataset. Ideally, I want to control horizontal position depending
> > on the type of activity.
> >
> > I believe that Crystal is using the term "Multiple Sections" for this, but
> > I'm not sure about the terminology.
> >
> > Thanks
> > Tibor
> >
> >
>|||Tibor,
Looks like nested list regions may do the trick for you, where the outermost
list region will display the dataset rows, while the inner list regions are
the sections which visibility could be changed conditionally. Have you
explored this opton?
BTW, my book is shipping... see the report footer.
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com : http://tinyurl.com/3l49j
Home page and blog: http://www.prologika.com/
----
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eymIZXFjEHA.2524@.TK2MSFTNGP11.phx.gbl...
> Thanks Teo,
> I understand those options, but it will become too much of a mess as you
want to do more changes.
> I had problems understanding what the customer wanted until he showed me
this in Crystal. Imagine that you
> have several sections (like page header/body/footer). In effect, you have
several bodies, and position the
> columns freely into each section. In section A I want column x and z, with
this formatting. In section B I
> want columns z and y and g, having the desired formatting. Etc. Then you
say a condition which determines
> which section is to be used for the row data. For example, if the value
for column A is this, use section A
> for the row. If the value is B, use section F.
> I very much doubt this can be done using the table control, as you cannot
align columns conditionally (column
> width etc based on a value in the row). Methinks.
> Possibly by just positioning out text boxes etc, but I can't really see
how you can define several "sections",
> and control which section is to be used for the row data.
> I have a feeling this cannot be done using current version of RS. This is
fine, considering it is a 1.0
> product after all. The customer understand this as well. I just wanted to
see whether I missed something.
> (None of the three books I have mention anything along this line. I recall
asking for your book as well, but
> the store didn't have it. Looking forward to go through that too when I
get my hands on it. :-) ).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message
news:OF$jESEjEHA.3232@.TK2MSFTNGP10.phx.gbl...
> > Tibor,
> >
> > You can base the column field on a expression,e.g.
> > =Iif(Fields!A.Value=<expression>, Fields!B.Value, Fields!C.Value).
> > <expression> can reference to a field value or call to an embedded or
> > external function.
> >
> > In addition, you can implement conditional formatting, e.g. identity the
> > column value based on the condition, coloring cells, etc.
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com : http://tinyurl.com/3l49j
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> > message news:uCjSU4CjEHA.3664@.TK2MSFTNGP12.phx.gbl...
> > > Perhaps I'm only overlooking something very simple?
> > >
> > > I want to display different columns from my resultset, depending of
the
> > data
> > > in one column. I also want to apply different styles depending on that
> > > "controlling" column. I understand that I in a Table can define
attributes
> > > for the whole row (same as when you select the "left" portion of a
row),
> > > which can be based of the value of that row. But what if I want to
display
> > > different columns, based on the data?
> > >
> > > Example:
> > > * A dataset with a datetime column. We want to sort by this in the
report.
> > > Earliest event at the top.
> > > * Each row represent different activities over the day. One column
define
> > > type of activity.
> > > * Depending of the type of activity, I want to display different
columns
> > > from the dataset. Ideally, I want to control horizontal position
depending
> > > on the type of activity.
> > >
> > > I believe that Crystal is using the term "Multiple Sections" for this,
but
> > > I'm not sure about the terminology.
> > >
> > > Thanks
> > > Tibor
> > >
> > >
> >
> >
>|||The report object model collections (e.g. Fields, Parameters) allow you to
perform dynamic access by using field names that are determined dynamically
at runtime.
E.g.
=Fields(Fields!FieldName.Value).Value
=Fields(Parameters!P1.Value).Value
You can even use complex expressions to generate field names.
Is this what you are looking for?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uCjSU4CjEHA.3664@.TK2MSFTNGP12.phx.gbl...
> Perhaps I'm only overlooking something very simple?
> I want to display different columns from my resultset, depending of the
data
> in one column. I also want to apply different styles depending on that
> "controlling" column. I understand that I in a Table can define attributes
> for the whole row (same as when you select the "left" portion of a row),
> which can be based of the value of that row. But what if I want to display
> different columns, based on the data?
> Example:
> * A dataset with a datetime column. We want to sort by this in the report.
> Earliest event at the top.
> * Each row represent different activities over the day. One column define
> type of activity.
> * Depending of the type of activity, I want to display different columns
> from the dataset. Ideally, I want to control horizontal position depending
> on the type of activity.
> I believe that Crystal is using the term "Multiple Sections" for this, but
> I'm not sure about the terminology.
> Thanks
> Tibor
>|||> Is this what you are looking for?
Not really, I'm afraid. Thing is you have to "program" all this (using expressions). Compare that to having
several sections (several bodies) where you *visually* layout the elements (text-boxes, possibly data-bound,
defining font style etc). Then you just state that if col1 = a then use section z for the row, if col1 = b
then use section y for the row, etc.
You might want to check out how Crystal is doing it. I had a hard time understand until my customer showed me.
After that I clearly understood. A really neat feature.
Thanks for the reply.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
news:u0bze$KjEHA.3696@.TK2MSFTNGP15.phx.gbl...
> The report object model collections (e.g. Fields, Parameters) allow you to
> perform dynamic access by using field names that are determined dynamically
> at runtime.
> E.g.
> =Fields(Fields!FieldName.Value).Value
> =Fields(Parameters!P1.Value).Value
> You can even use complex expressions to generate field names.
> Is this what you are looking for?
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:uCjSU4CjEHA.3664@.TK2MSFTNGP12.phx.gbl...
> > Perhaps I'm only overlooking something very simple?
> >
> > I want to display different columns from my resultset, depending of the
> data
> > in one column. I also want to apply different styles depending on that
> > "controlling" column. I understand that I in a Table can define attributes
> > for the whole row (same as when you select the "left" portion of a row),
> > which can be based of the value of that row. But what if I want to display
> > different columns, based on the data?
> >
> > Example:
> > * A dataset with a datetime column. We want to sort by this in the report.
> > Earliest event at the top.
> > * Each row represent different activities over the day. One column define
> > type of activity.
> > * Depending of the type of activity, I want to display different columns
> > from the dataset. Ideally, I want to control horizontal position depending
> > on the type of activity.
> >
> > I believe that Crystal is using the term "Multiple Sections" for this, but
> > I'm not sure about the terminology.
> >
> > Thanks
> > Tibor
> >
> >
>|||Interesting. I'll check it out. I guess I have to look into whether a list region can display rows like a
table does it. Seems I have some reading up to do. Any pointers where I can find some basic steps for how to
accomplish nested list regions?
Judging by the publishers website, seems your book is one notch up from the basic books? (I prefer to buy
books from a physical book store, to support them. I'd hate to see all them go out of business. But where I
can't find a book, yes, I do buy it off the net. Yours is on the list. :-) )
Thanks!
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message news:el71IoFjEHA.384@.TK2MSFTNGP10.phx.gbl...
> Tibor,
> Looks like nested list regions may do the trick for you, where the outermost
> list region will display the dataset rows, while the inner list regions are
> the sections which visibility could be changed conditionally. Have you
> explored this opton?
> BTW, my book is shipping... see the report footer.
> --
> Hope this helps.
> ----
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website: http://www.manning.com/lachev
> Buy it from Amazon.com : http://tinyurl.com/3l49j
> Home page and blog: http://www.prologika.com/
> ----
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:eymIZXFjEHA.2524@.TK2MSFTNGP11.phx.gbl...
> > Thanks Teo,
> >
> > I understand those options, but it will become too much of a mess as you
> want to do more changes.
> >
> > I had problems understanding what the customer wanted until he showed me
> this in Crystal. Imagine that you
> > have several sections (like page header/body/footer). In effect, you have
> several bodies, and position the
> > columns freely into each section. In section A I want column x and z, with
> this formatting. In section B I
> > want columns z and y and g, having the desired formatting. Etc. Then you
> say a condition which determines
> > which section is to be used for the row data. For example, if the value
> for column A is this, use section A
> > for the row. If the value is B, use section F.
> >
> > I very much doubt this can be done using the table control, as you cannot
> align columns conditionally (column
> > width etc based on a value in the row). Methinks.
> >
> > Possibly by just positioning out text boxes etc, but I can't really see
> how you can define several "sections",
> > and control which section is to be used for the row data.
> >
> > I have a feeling this cannot be done using current version of RS. This is
> fine, considering it is a 1.0
> > product after all. The customer understand this as well. I just wanted to
> see whether I missed something.
> > (None of the three books I have mention anything along this line. I recall
> asking for your book as well, but
> > the store didn't have it. Looking forward to go through that too when I
> get my hands on it. :-) ).
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> >
> >
> > "Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message
> news:OF$jESEjEHA.3232@.TK2MSFTNGP10.phx.gbl...
> > > Tibor,
> > >
> > > You can base the column field on a expression,e.g.
> > > =Iif(Fields!A.Value=<expression>, Fields!B.Value, Fields!C.Value).
> > > <expression> can reference to a field value or call to an embedded or
> > > external function.
> > >
> > > In addition, you can implement conditional formatting, e.g. identity the
> > > column value based on the condition, coloring cells, etc.
> > >
> > > --
> > > Hope this helps.
> > >
> > > ----
> > > Teo Lachev, MCSD, MCT
> > > Author: "Microsoft Reporting Services in Action"
> > > Publisher website: http://www.manning.com/lachev
> > > Buy it from Amazon.com : http://tinyurl.com/3l49j
> > > Home page and blog: http://www.prologika.com/
> > > ----
> > >
> > > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in
> > > message news:uCjSU4CjEHA.3664@.TK2MSFTNGP12.phx.gbl...
> > > > Perhaps I'm only overlooking something very simple?
> > > >
> > > > I want to display different columns from my resultset, depending of
> the
> > > data
> > > > in one column. I also want to apply different styles depending on that
> > > > "controlling" column. I understand that I in a Table can define
> attributes
> > > > for the whole row (same as when you select the "left" portion of a
> row),
> > > > which can be based of the value of that row. But what if I want to
> display
> > > > different columns, based on the data?
> > > >
> > > > Example:
> > > > * A dataset with a datetime column. We want to sort by this in the
> report.
> > > > Earliest event at the top.
> > > > * Each row represent different activities over the day. One column
> define
> > > > type of activity.
> > > > * Depending of the type of activity, I want to display different
> columns
> > > > from the dataset. Ideally, I want to control horizontal position
> depending
> > > > on the type of activity.
> > > >
> > > > I believe that Crystal is using the term "Multiple Sections" for this,
> but
> > > > I'm not sure about the terminology.
> > > >
> > > > Thanks
> > > > Tibor
> > > >
> > > >
> > >
> > >
> >
> >
>|||Tibor,
I attached a sample report that demonstrates nested lists. The Adventure
Works database has two types of customers: stores and individuals. The idea
here is that if the customer is individual the report will show his first
and last name. If the customer is store, store-specific details are shown.
This is accomplished by having two overlapping lists lstIndividual and
lstStore nested inside lstCustomer.
Not sure I get the idea of the book support that the brick-and-mortar stores
have but online don't. Please educate me on this subject some more so I
could pass it along to the publisher. Do you mean to return the book?
Hopefully, you won't have to. And yes, I tried my best to keep it above
basic :-)
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OaaxQZQjEHA.3476@.tk2msftngp13.phx.gbl...
> Interesting. I'll check it out. I guess I have to look into whether a list
region can display rows like a
> table does it. Seems I have some reading up to do. Any pointers where I
can find some basic steps for how to
> accomplish nested list regions?
> Judging by the publishers website, seems your book is one notch up from
the basic books? (I prefer to buy
> books from a physical book store, to support them. I'd hate to see all
them go out of business. But where I
> can't find a book, yes, I do buy it off the net. Yours is on the list.
:-) )
> Thanks!
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message
news:el71IoFjEHA.384@.TK2MSFTNGP10.phx.gbl...
> > Tibor,
> >
> > Looks like nested list regions may do the trick for you, where the
outermost
> > list region will display the dataset rows, while the inner list regions
are
> > the sections which visibility could be changed conditionally. Have you
> > explored this opton?
> >
> > BTW, my book is shipping... see the report footer.
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com : http://tinyurl.com/3l49j
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> > message news:eymIZXFjEHA.2524@.TK2MSFTNGP11.phx.gbl...
> > > Thanks Teo,
> > >
> > > I understand those options, but it will become too much of a mess as
you
> > want to do more changes.
> > >
> > > I had problems understanding what the customer wanted until he showed
me
> > this in Crystal. Imagine that you
> > > have several sections (like page header/body/footer). In effect, you
have
> > several bodies, and position the
> > > columns freely into each section. In section A I want column x and z,
with
> > this formatting. In section B I
> > > want columns z and y and g, having the desired formatting. Etc. Then
you
> > say a condition which determines
> > > which section is to be used for the row data. For example, if the
value
> > for column A is this, use section A
> > > for the row. If the value is B, use section F.
> > >
> > > I very much doubt this can be done using the table control, as you
cannot
> > align columns conditionally (column
> > > width etc based on a value in the row). Methinks.
> > >
> > > Possibly by just positioning out text boxes etc, but I can't really
see
> > how you can define several "sections",
> > > and control which section is to be used for the row data.
> > >
> > > I have a feeling this cannot be done using current version of RS. This
is
> > fine, considering it is a 1.0
> > > product after all. The customer understand this as well. I just wanted
to
> > see whether I missed something.
> > > (None of the three books I have mention anything along this line. I
recall
> > asking for your book as well, but
> > > the store didn't have it. Looking forward to go through that too when
I
> > get my hands on it. :-) ).
> > > --
> > > Tibor Karaszi, SQL Server MVP
> > > http://www.karaszi.com/sqlserver/default.asp
> > > http://www.solidqualitylearning.com/
> > >
> > >
> > > "Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message
> > news:OF$jESEjEHA.3232@.TK2MSFTNGP10.phx.gbl...
> > > > Tibor,
> > > >
> > > > You can base the column field on a expression,e.g.
> > > > =Iif(Fields!A.Value=<expression>, Fields!B.Value, Fields!C.Value).
> > > > <expression> can reference to a field value or call to an embedded
or
> > > > external function.
> > > >
> > > > In addition, you can implement conditional formatting, e.g. identity
the
> > > > column value based on the condition, coloring cells, etc.
> > > >
> > > > --
> > > > Hope this helps.
> > > >
> > > > ----
> > > > Teo Lachev, MCSD, MCT
> > > > Author: "Microsoft Reporting Services in Action"
> > > > Publisher website: http://www.manning.com/lachev
> > > > Buy it from Amazon.com : http://tinyurl.com/3l49j
> > > > Home page and blog: http://www.prologika.com/
> > > > ----
> > > >
> > > > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
wrote
> > in
> > > > message news:uCjSU4CjEHA.3664@.TK2MSFTNGP12.phx.gbl...
> > > > > Perhaps I'm only overlooking something very simple?
> > > > >
> > > > > I want to display different columns from my resultset, depending
of
> > the
> > > > data
> > > > > in one column. I also want to apply different styles depending on
that
> > > > > "controlling" column. I understand that I in a Table can define
> > attributes
> > > > > for the whole row (same as when you select the "left" portion of a
> > row),
> > > > > which can be based of the value of that row. But what if I want to
> > display
> > > > > different columns, based on the data?
> > > > >
> > > > > Example:
> > > > > * A dataset with a datetime column. We want to sort by this in the
> > report.
> > > > > Earliest event at the top.
> > > > > * Each row represent different activities over the day. One column
> > define
> > > > > type of activity.
> > > > > * Depending of the type of activity, I want to display different
> > columns
> > > > > from the dataset. Ideally, I want to control horizontal position
> > depending
> > > > > on the type of activity.
> > > > >
> > > > > I believe that Crystal is using the term "Multiple Sections" for
this,
> > but
> > > > > I'm not sure about the terminology.
> > > > >
> > > > > Thanks
> > > > > Tibor
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
begin 666 ListDemo.rdl
M/#]X;6P@.=F5R<VEO;CTB,2XP(B!E;F-O9&EN9STB=71F+3@.B/SX-"CQ297!O
M<G0@.>&UL;G,](FAT=' Z+R]S8VAE;6%S+FUI8W)O<V]F="YC;VTO<W%L<V5R
M=F5R+W)E<&]R=&EN9R\R,# S+S$P+W)E<&]R=&1E9FEN:71I;VXB('AM;&YS
M.G)D/2)H='1P.B\O<V-H96UA<RYM:6-R;W-O9G0N8V]M+U-13%-E<G9E<B]R
M97!O<G1I;F<O<F5P;W)T9&5S:6=N97(B/@.T*(" \4FEG:'1-87)G:6X^,6EN
M/"]2:6=H=$UA<F=I;CX-"B @./$)O9'D^#0H@.(" @./%)E<&]R=$ET96US/@.T*
M(" @.(" @./$QI<W0@.3F%M93TB;&ES=$]U=&5R(CX-"B @.(" @.(" @./%-T>6QE
M("\^#0H@.(" @.(" @.(#Q(96EG:'0^,"XR-6EN/"](96EG:'0^#0H@.(" @.(" @.
M(#Q4;W ^,"XQ,C5I;CPO5&]P/@.T*(" @.(" @.(" \1W)O=7!I;F<@.3F%M93TB
M;&ES=$]U=&5R7T1E=&%I;'-?1W)O=7 B/@.T*(" @.(" @.(" @.(#Q'<F]U<$5X
M<')E<W-I;VYS/@.T*(" @.(" @.(" @.(" @./$=R;W5P17AP<F5S<VEO;CX]1FEE
M;&1S(4-U<W1O;65R240N5F%L=64\+T=R;W5P17AP<F5S<VEO;CX-"B @.(" @.
M(" @.(" \+T=R;W5P17AP<F5S<VEO;G,^#0H@.(" @.(" @.(#PO1W)O=7!I;F<^
M#0H@.(" @.(" @.(#Q:26YD97@.^,3PO6DEN9&5X/@.T*(" @.(" @.(" \1&%T85-E
M=$YA;64^9'-#=7-T;VUE<CPO1&%T85-E=$YA;64^#0H@.(" @.(" @.(#Q297!O
M<G1)=&5M<SX-"B @.(" @.(" @.(" \5&5X=&)O>"!.86UE/2)#=7-T;VUE<E1Y
M<&4B/@.T*(" @.(" @.(" @.(" @./%-T>6QE/@.T*(" @.(" @.(" @.(" @.(" \4&%D
M9&EN9TQE9G0^,G!T/"]0861D:6YG3&5F=#X-"B @.(" @.(" @.(" @.(" @./%!A
M9&1I;F=";W1T;VT^,G!T/"]0861D:6YG0F]T=&]M/@.T*(" @.(" @.(" @.(" @.
M(" \4&%D9&EN9U1O<#XR<'0\+U!A9&1I;F=4;W ^#0H@.(" @.(" @.(" @.(" @.
M(#Q0861D:6YG4FEG:'0^,G!T/"]0861D:6YG4FEG:'0^#0H@.(" @.(" @.(" @.
M(" \+U-T>6QE/@.T*(" @.(" @.(" @.(" @./%I);F1E>#XR/"]:26YD97@.^#0H@.
M(" @.(" @.(" @.(" \<F0Z1&5F875L=$YA;64^0W5S=&]M97)4>7!E/"]R9#I$
M969A=6QT3F%M93X-"B @.(" @.(" @.(" @.(#Q7:61T:#XR+C$R-6EN/"]7:61T
M:#X-"B @.(" @.(" @.(" @.(#Q#86Y'<F]W/G1R=64\+T-A;D=R;W<^#0H@.(" @.
M(" @.(" @.(" \5F%L=64^/49I<G-T*$9I96QD<R%#=7-T;VUE<E1Y<&4N5F%L
M=64I/"]686QU93X-"B @.(" @.(" @.(" @.(#Q,969T/C%I;CPO3&5F=#X-"B @.
M(" @.(" @.(" \+U1E>'1B;W@.^#0H@.(" @.(" @.(" @./$QI<W0@.3F%M93TB;'-T
M0W5S=&]M97(B/@.T*(" @.(" @.(" @.(" @./%-T>6QE("\^#0H@.(" @.(" @.(" @.
M(" \6DEN9&5X/C$\+UI);F1E>#X-"B @.(" @.(" @.(" @.(#Q297!O<G1)=&5M
M<SX-"B @.(" @.(" @.(" @.(" @./%1E>'1B;W@.@.3F%M93TB3&%S=$YA;64B/@.T*
M(" @.(" @.(" @.(" @.(" @.(#Q3='EL93X-"B @.(" @.(" @.(" @.(" @.(" @.(#Q0
M861D:6YG3&5F=#XR<'0\+U!A9&1I;F=,969T/@.T*(" @.(" @.(" @.(" @.(" @.
M(" @./%!A9&1I;F=";W1T;VT^,G!T/"]0861D:6YG0F]T=&]M/@.T*(" @.(" @.
M(" @.(" @.(" @.(" @./%!A9&1I;F=4;W ^,G!T/"]0861D:6YG5&]P/@.T*(" @.
M(" @.(" @.(" @.(" @.(" @./%!A9&1I;F=2:6=H=#XR<'0\+U!A9&1I;F=2:6=H
M=#X-"B @.(" @.(" @.(" @.(" @.(" \+U-T>6QE/@.T*(" @.(" @.(" @.(" @.(" @.
M(#Q:26YD97@.^,3PO6DEN9&5X/@.T*(" @.(" @.(" @.(" @.(" @.(#QR9#I$969A
M=6QT3F%M93Y,87-T3F%M93PO<F0Z1&5F875L=$YA;64^#0H@.(" @.(" @.(" @.
M(" @.(" @./%=I9'1H/C$N-S5I;CPO5VED=&@.^#0H@.(" @.(" @.(" @.(" @.(" @.
M/$-A;D=R;W<^=')U93PO0V%N1W)O=SX-"B @.(" @.(" @.(" @.(" @.(" \5F%L
M=64^/49I96QD<R%,87-T3F%M92Y686QU93PO5F%L=64^#0H@.(" @.(" @.(" @.
M(" @.(" @./$QE9G0^,2XS-S5I;CPO3&5F=#X-"B @.(" @.(" @.(" @.(" @./"]4
M97AT8F]X/@.T*(" @.(" @.(" @.(" @.(" \5&5X=&)O>"!.86UE/2)&:7)S=$YA
M;64B/@.T*(" @.(" @.(" @.(" @.(" @.(#Q3='EL93X-"B @.(" @.(" @.(" @.(" @.
M(" @.(#Q0861D:6YG3&5F=#XR<'0\+U!A9&1I;F=,969T/@.T*(" @.(" @.(" @.
M(" @.(" @.(" @./%!A9&1I;F=";W1T;VT^,G!T/"]0861D:6YG0F]T=&]M/@.T*
M(" @.(" @.(" @.(" @.(" @.(" @./%!A9&1I;F=4;W ^,G!T/"]0861D:6YG5&]P
M/@.T*(" @.(" @.(" @.(" @.(" @.(" @./%!A9&1I;F=2:6=H=#XR<'0\+U!A9&1I
M;F=2:6=H=#X-"B @.(" @.(" @.(" @.(" @.(" \+U-T>6QE/@.T*(" @.(" @.(" @.
M(" @.(" @.(#QR9#I$969A=6QT3F%M93Y&:7)S=$YA;64\+W)D.D1E9F%U;'1.
M86UE/@.T*(" @.(" @.(" @.(" @.(" @.(#Q7:61T:#XQ+C,W-6EN/"]7:61T:#X-
M"B @.(" @.(" @.(" @.(" @.(" \0V%N1W)O=SYT<G5E/"]#86Y'<F]W/@.T*(" @.
M(" @.(" @.(" @.(" @.(#Q686QU93X]1FEE;&1S(49I<G-T3F%M92Y686QU93PO
M5F%L=64^#0H@.(" @.(" @.(" @.(" @.(#PO5&5X=&)O>#X-"B @.(" @.(" @.(" @.
M(#PO4F5P;W)T271E;7,^#0H@.(" @.(" @.(" @.(" \3&5F=#XS+C(U:6X\+TQE
M9G0^#0H@.(" @.(" @.(" @.(" \5FES:6)I;&ET>3X-"B @.(" @.(" @.(" @.(" @.
M/$AI9&1E;CX]("A&:65L9',A0W5S=&]M97)4>7!E+E9A;'5E+E1O3&]W97(H
M*29L=#LF9W0[)W,G*3PO2&ED9&5N/@.T*(" @.(" @.(" @.(" @./"]6:7-I8FEL
M:71Y/@.T*(" @.(" @.(" @.(#PO3&ES=#X-"B @.(" @.(" @.(" \5&5X=&)O>"!.
M86UE/2)#=7-T;VUE<DE$(CX-"B @.(" @.(" @.(" @.(#Q3='EL93X-"B @.(" @.
M(" @.(" @.(" @./%!A9&1I;F=,969T/C)P=#PO4&%D9&EN9TQE9G0^#0H@.(" @.
M(" @.(" @.(" @.(#Q497AT06QI9VX^4FEG:'0\+U1E>'1!;&EG;CX-"B @.(" @.
M(" @.(" @.(" @./%!A9&1I;F=";W1T;VT^,G!T/"]0861D:6YG0F]T=&]M/@.T*
M(" @.(" @.(" @.(" @.(" \4&%D9&EN9U1O<#XR<'0\+U!A9&1I;F=4;W ^#0H@.
M(" @.(" @.(" @.(" @.(#Q0861D:6YG4FEG:'0^,G!T/"]0861D:6YG4FEG:'0^
M#0H@.(" @.(" @.(" @.(" \+U-T>6QE/@.T*(" @.(" @.(" @.(" @./')D.D1E9F%U
M;'1.86UE/D-U<W1O;65R240\+W)D.D1E9F%U;'1.86UE/@.T*(" @.(" @.(" @.
M(" @./%=I9'1H/C%I;CPO5VED=&@.^#0H@.(" @.(" @.(" @.(" \0V%N1W)O=SYT
M<G5E/"]#86Y'<F]W/@.T*(" @.(" @.(" @.(" @./%9A;'5E/CU&:65L9',A0W5S
M=&]M97))1"Y686QU93PO5F%L=64^#0H@.(" @.(" @.(" @./"]497AT8F]X/@.T*
M(" @.(" @.(" \+U)E<&]R=$ET96US/@.T*(" @.(" @./"],:7-T/@.T*(" @.(" @.
M/$QI<W0@.3F%M93TB;'-T4W1O<F4B/@.T*(" @.(" @.(" \4W1Y;&4@.+SX-"B @.
M(" @.(" @./$AE:6=H=#XP+C(U:6X\+TAE:6=H=#X-"B @.(" @.(" @./%1O<#XP
M+C<U:6X\+U1O<#X-"B @.(" @.(" @./%=I9'1H/C(N,3(U:6X\+U=I9'1H/@.T*
M(" @.(" @.(" \3&5F=#XS+C8R-6EN/"],969T/@.T*(" @.(" @./"],:7-T/@.T*
M(" @.(#PO4F5P;W)T271E;7,^#0H@.(" @./%-T>6QE("\^#0H@.(" @./$AE:6=H
M=#XR:6X\+TAE:6=H=#X-"B @./"]";V1Y/@.T*(" \5&]P36%R9VEN/C%I;CPO
M5&]P36%R9VEN/@.T*(" \1&%T85-O=7)C97,^#0H@.(" @./$1A=&%3;W5R8V4@.
M3F%M93TB061V96YT=7)E5V]R:W,B/@.T*(" @.(" @./')D.D1A=&%3;W5R8V5)
M1#XP.3=E-6)B,RUF-#(V+30W93(M.38V,"UD-35B-3(Y93,V96,\+W)D.D1A
M=&%3;W5R8V5)1#X-"B @.(" @.(#Q$871A4V]U<F-E4F5F97)E;F-E/D%D=F5N
M='5R95=O<FMS/"]$871A4V]U<F-E4F5F97)E;F-E/@.T*(" @.(#PO1&%T85-O
M=7)C93X-"B @./"]$871A4V]U<F-E<SX-"B @./%=I9'1H/C<N-S5I;CPO5VED
M=&@.^#0H@.(#Q$871A4V5T<SX-"B @.(" \1&%T85-E="!.86UE/2)D<T-U<W1O
M;65R(CX-"B @.(" @.(#Q&:65L9',^#0H@.(" @.(" @.(#Q&:65L9"!.86UE/2)#
M=7-T;VUE<DE$(CX-"B @.(" @.(" @.(" \1&%T849I96QD/D-U<W1O;65R240\
M+T1A=&%&:65L9#X-"B @.(" @.(" @.(" \<F0Z5'EP94YA;64^4WES=&5M+DEN
M=#,R/"]R9#I4>7!E3F%M93X-"B @.(" @.(" @./"]&:65L9#X-"B @.(" @.(" @.
M/$9I96QD($YA;64](D-U<W1O;65R5'EP92(^#0H@.(" @.(" @.(" @./$1A=&%&
M:65L9#Y#=7-T;VUE<E1Y<&4\+T1A=&%&:65L9#X-"B @.(" @.(" @.(" \<F0Z
M5'EP94YA;64^4WES=&5M+E-T<FEN9SPO<F0Z5'EP94YA;64^#0H@.(" @.(" @.
M(#PO1FEE;&0^#0H@.(" @.(" @.(#Q&:65L9"!.86UE/2)!8V-O=6YT3G5M8F5R
M(CX-"B @.(" @.(" @.(" \1&%T849I96QD/D%C8V]U;G1.=6UB97(\+T1A=&%&
M:65L9#X-"B @.(" @.(" @.(" \<F0Z5'EP94YA;64^4WES=&5M+DEN=#,R/"]R
M9#I4>7!E3F%M93X-"B @.(" @.(" @./"]&:65L9#X-"B @.(" @.(" @./$9I96QD
M($YA;64](D9I<G-T3F%M92(^#0H@.(" @.(" @.(" @./$1A=&%&:65L9#Y&:7)S
M=$YA;64\+T1A=&%&:65L9#X-"B @.(" @.(" @.(" \<F0Z5'EP94YA;64^4WES
M=&5M+E-T<FEN9SPO<F0Z5'EP94YA;64^#0H@.(" @.(" @.(#PO1FEE;&0^#0H@.
M(" @.(" @.(#Q&:65L9"!.86UE/2),87-T3F%M92(^#0H@.(" @.(" @.(" @./$1A
M=&%&:65L9#Y,87-T3F%M93PO1&%T849I96QD/@.T*(" @.(" @.(" @.(#QR9#I4
M>7!E3F%M93Y3>7-T96TN4W1R:6YG/"]R9#I4>7!E3F%M93X-"B @.(" @.(" @.
M/"]&:65L9#X-"B @.(" @.(" @./$9I96QD($YA;64](D5M86EL061D<F5S<R(^
M#0H@.(" @.(" @.(" @./$1A=&%&:65L9#Y%;6%I;$%D9')E<W,\+T1A=&%&:65L
M9#X-"B @.(" @.(" @.(" \<F0Z5'EP94YA;64^4WES=&5M+E-T<FEN9SPO<F0Z
M5'EP94YA;64^#0H@.(" @.(" @.(#PO1FEE;&0^#0H@.(" @.(" @.(#Q&:65L9"!.
M86UE/2).86UE(CX-"B @.(" @.(" @.(" \1&%T849I96QD/DYA;64\+T1A=&%&
M:65L9#X-"B @.(" @.(" @.(" \<F0Z5'EP94YA;64^4WES=&5M+E-T<FEN9SPO
M<F0Z5'EP94YA;64^#0H@.(" @.(" @.(#PO1FEE;&0^#0H@.(" @.(" @.(#Q&:65L
M9"!.86UE/2).=6UB97)%;7!L;WEE97,B/@.T*(" @.(" @.(" @.(#Q$871A1FEE
M;&0^3G5M8F5R16UP;&]Y965S/"]$871A1FEE;&0^#0H@.(" @.(" @.(" @./')D
M.E1Y<&5.86UE/E-Y<W1E;2Y);G0S,CPO<F0Z5'EP94YA;64^#0H@.(" @.(" @.
M(#PO1FEE;&0^#0H@.(" @.(" \+T9I96QD<SX-"B @.(" @.(#Q1=65R>3X-"B @.
M(" @.(" @./$1A=&%3;W5R8V5.86UE/D%D=F5N='5R95=O<FMS/"]$871A4V]U
M<F-E3F%M93X-"B @.(" @.(" @./$-O;6UA;F1497AT/E-%3$5#5" @.(" @.5$]0
M(#$P,"!#=7-T;VUE<BY#=7-T;VUE<DE$+"!#=7-T;VUE<BY#=7-T;VUE<E1Y
M<&4L($-U<W1O;65R+D%C8V]U;G1.=6UB97(L($EN9&EV:61U86PN1FER<W1.
M86UE+"!);F1I=FED=6%L+DQA<W1.86UE+" -"B @.(" @.(" @.(" @.(" @.(" @.
M(" @.("!);F1I=FED=6%L+D5M86EL061D<F5S<RP@.4W1O<F4N3F%M92P@.4W1O
M<F4N3G5M8F5R16UP;&]Y965S#0I&4D]-(" @.(" @.(" @.0W5S=&]M97(@.3$5&
M5"!/551%4B!*3TE.#0H@.(" @.(" @.(" @.(" @.(" @.(" @.(" @.26YD:79I9'5A
M;"!/3B!#=7-T;VUE<BY#=7-T;VUE<DE$(#T@.26YD:79I9'5A;"Y#=7-T;VUE
M<DE$($Q%1E0@.3U5415(@.2D])3@.T*(" @.(" @.(" @.(" @.(" @.(" @.(" @.(%-T
M;W)E($].($-U<W1O;65R+D-U<W1O;65R240@./2!3=&]R92Y#=7-T;VUE<DE$
M/"]#;VUM86YD5&5X=#X-"B @.(" @.(#PO475E<GD^#0H@.(" @./"]$871A4V5T
M/@.T*(" \+T1A=&%3971S/@.T*(" \3&5F=$UA<F=I;CXQ:6X\+TQE9G1-87)G
M:6X^#0H@.(#QR9#I3;F%P5&]'<FED/G1R=64\+W)D.E-N87!4;T=R:60^#0H@.
M(#QR9#I$<F%W1W)I9#YT<G5E/"]R9#I$<F%W1W)I9#X-"B @./')D.E)E<&]R
M=$E$/C X-#5F-#=E+39D-F4M-#=B82TY-38R+3=F.65E,C0S-#-F9#PO<F0Z
M4F5P;W)T240^#0H@.(#Q";W1T;VU-87)G:6X^,6EN/"]";W1T;VU-87)G:6X^
I#0H@.(#Q,86YG=6%G93YE;BU54SPO3&%N9W5A9V4^#0H\+U)E<&]R=#X`
`
end|||Hi Teo!
What you are describing sound very much what I try to do. Unfortunately, I couldn't run your code. I
modified the connection information so the query ran fine (I get both "I" and "S" in the
CustomerType column, for different rows).
However, when I run the query, I get compilation error:
"C:\Projects\MutipleLists\ListDemo.rdl The hidden expression for the list 'lstCustomer' contains an
error: [BC30201] Expression expected."
Sorry to be a pain here, seems like I'm very close to what I want to achieve... :-)
What I mean by the book store, is that I enjoy walking around in a physical book store, flipping the
pages. Mainly for "ordinary" books, but as well for computer books. I'd just hate to see that option
go away in some far future, due to online book stores has driven physical stores bust.
I'm no fanatic, though. I do buy online as well, especially when there are hard to get books, I'm
tight on time to go shopping etc.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message
news:ulTGY9RjEHA.2652@.TK2MSFTNGP15.phx.gbl...
> Tibor,
> I attached a sample report that demonstrates nested lists. The Adventure
> Works database has two types of customers: stores and individuals. The idea
> here is that if the customer is individual the report will show his first
> and last name. If the customer is store, store-specific details are shown.
> This is accomplished by having two overlapping lists lstIndividual and
> lstStore nested inside lstCustomer.
> Not sure I get the idea of the book support that the brick-and-mortar stores
> have but online don't. Please educate me on this subject some more so I
> could pass it along to the publisher. Do you mean to return the book?
> Hopefully, you won't have to. And yes, I tried my best to keep it above
> basic :-)
> --
> Hope this helps.
> ----
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website: http://www.manning.com/lachev
> Buy it from Amazon.com: http://shrinkster.com/eq
> Home page and blog: http://www.prologika.com/
> ----
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:OaaxQZQjEHA.3476@.tk2msftngp13.phx.gbl...
> > Interesting. I'll check it out. I guess I have to look into whether a list
> region can display rows like a
> > table does it. Seems I have some reading up to do. Any pointers where I
> can find some basic steps for how to
> > accomplish nested list regions?
> >
> > Judging by the publishers website, seems your book is one notch up from
> the basic books? (I prefer to buy
> > books from a physical book store, to support them. I'd hate to see all
> them go out of business. But where I
> > can't find a book, yes, I do buy it off the net. Yours is on the list.
> :-) )
> >
> > Thanks!
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> >
> >
> > "Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message
> news:el71IoFjEHA.384@.TK2MSFTNGP10.phx.gbl...
> > > Tibor,
> > >
> > > Looks like nested list regions may do the trick for you, where the
> outermost
> > > list region will display the dataset rows, while the inner list regions
> are
> > > the sections which visibility could be changed conditionally. Have you
> > > explored this opton?
> > >
> > > BTW, my book is shipping... see the report footer.
> > >
> > > --
> > > Hope this helps.
> > >
> > > ----
> > > Teo Lachev, MCSD, MCT
> > > Author: "Microsoft Reporting Services in Action"
> > > Publisher website: http://www.manning.com/lachev
> > > Buy it from Amazon.com : http://tinyurl.com/3l49j
> > > Home page and blog: http://www.prologika.com/
> > > ----
> > >
> > > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in
> > > message news:eymIZXFjEHA.2524@.TK2MSFTNGP11.phx.gbl...
> > > > Thanks Teo,
> > > >
> > > > I understand those options, but it will become too much of a mess as
> you
> > > want to do more changes.
> > > >
> > > > I had problems understanding what the customer wanted until he showed
> me
> > > this in Crystal. Imagine that you
> > > > have several sections (like page header/body/footer). In effect, you
> have
> > > several bodies, and position the
> > > > columns freely into each section. In section A I want column x and z,
> with
> > > this formatting. In section B I
> > > > want columns z and y and g, having the desired formatting. Etc. Then
> you
> > > say a condition which determines
> > > > which section is to be used for the row data. For example, if the
> value
> > > for column A is this, use section A
> > > > for the row. If the value is B, use section F.
> > > >
> > > > I very much doubt this can be done using the table control, as you
> cannot
> > > align columns conditionally (column
> > > > width etc based on a value in the row). Methinks.
> > > >
> > > > Possibly by just positioning out text boxes etc, but I can't really
> see
> > > how you can define several "sections",
> > > > and control which section is to be used for the row data.
> > > >
> > > > I have a feeling this cannot be done using current version of RS. This
> is
> > > fine, considering it is a 1.0
> > > > product after all. The customer understand this as well. I just wanted
> to
> > > see whether I missed something.
> > > > (None of the three books I have mention anything along this line. I
> recall
> > > asking for your book as well, but
> > > > the store didn't have it. Looking forward to go through that too when
> I
> > > get my hands on it. :-) ).
> > > > --
> > > > Tibor Karaszi, SQL Server MVP
> > > > http://www.karaszi.com/sqlserver/default.asp
> > > > http://www.solidqualitylearning.com/
> > > >
> > > >
> > > > "Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message
> > > news:OF$jESEjEHA.3232@.TK2MSFTNGP10.phx.gbl...
> > > > > Tibor,
> > > > >
> > > > > You can base the column field on a expression,e.g.
> > > > > =Iif(Fields!A.Value=<expression>, Fields!B.Value, Fields!C.Value).
> > > > > <expression> can reference to a field value or call to an embedded
> or
> > > > > external function.
> > > > >
> > > > > In addition, you can implement conditional formatting, e.g. identity
> the
> > > > > column value based on the condition, coloring cells, etc.
> > > > >
> > > > > --
> > > > > Hope this helps.
> > > > >
> > > > > ----
> > > > > Teo Lachev, MCSD, MCT
> > > > > Author: "Microsoft Reporting Services in Action"
> > > > > Publisher website: http://www.manning.com/lachev
> > > > > Buy it from Amazon.com : http://tinyurl.com/3l49j
> > > > > Home page and blog: http://www.prologika.com/
> > > > > ----
> > > > >
> > > > > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
> wrote
> > > in
> > > > > message news:uCjSU4CjEHA.3664@.TK2MSFTNGP12.phx.gbl...
> > > > > > Perhaps I'm only overlooking something very simple?
> > > > > >
> > > > > > I want to display different columns from my resultset, depending
> of
> > > the
> > > > > data
> > > > > > in one column. I also want to apply different styles depending on
> that
> > > > > > "controlling" column. I understand that I in a Table can define
> > > attributes
> > > > > > for the whole row (same as when you select the "left" portion of a
> > > row),
> > > > > > which can be based of the value of that row. But what if I want to
> > > display
> > > > > > different columns, based on the data?
> > > > > >
> > > > > > Example:
> > > > > > * A dataset with a datetime column. We want to sort by this in the
> > > report.
> > > > > > Earliest event at the top.
> > > > > > * Each row represent different activities over the day. One column
> > > define
> > > > > > type of activity.
> > > > > > * Depending of the type of activity, I want to display different
> > > columns
> > > > > > from the dataset. Ideally, I want to control horizontal position
> > > depending
> > > > > > on the type of activity.
> > > > > >
> > > > > > I believe that Crystal is using the term "Multiple Sections" for
> this,
> > > but
> > > > > > I'm not sure about the terminology.
> > > > > >
> > > > > > Thanks
> > > > > > Tibor
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>|||Tibor,
Strangely, I encountered this error myself. I am almost positive that it is
related to a bug with RS. For some reason, RS thinks that
=Fields!CustomerType.Value = "i" is not a valid expression. I tried several
alterations and I don't recall exactly what I did to get rid off the error
message. The expression on the list visibility is perfectly fine and runs
fine on my computer :-(. Try to close your report or restart VS.NET to see
if it will help. Or, change to another expression and then replace it again.
Got your point about brick-and-mortar stores. Hopefully, the samples
chapters will boost your confidence level...
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23lYA18ojEHA.2812@.tk2msftngp13.phx.gbl...
> Hi Teo!
> What you are describing sound very much what I try to do. Unfortunately, I
couldn't run your code. I
> modified the connection information so the query ran fine (I get both "I"
and "S" in the
> CustomerType column, for different rows).
> However, when I run the query, I get compilation error:
> "C:\Projects\MutipleLists\ListDemo.rdl The hidden expression for the list
'lstCustomer' contains an
> error: [BC30201] Expression expected."
> Sorry to be a pain here, seems like I'm very close to what I want to
achieve... :-)
>
> What I mean by the book store, is that I enjoy walking around in a
physical book store, flipping the
> pages. Mainly for "ordinary" books, but as well for computer books. I'd
just hate to see that option
> go away in some far future, due to online book stores has driven physical
stores bust.
> I'm no fanatic, though. I do buy online as well, especially when there are
hard to get books, I'm
> tight on time to go shopping etc.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message
> news:ulTGY9RjEHA.2652@.TK2MSFTNGP15.phx.gbl...
> > Tibor,
> >
> > I attached a sample report that demonstrates nested lists. The Adventure
> > Works database has two types of customers: stores and individuals. The
idea
> > here is that if the customer is individual the report will show his
first
> > and last name. If the customer is store, store-specific details are
shown.
> >
> > This is accomplished by having two overlapping lists lstIndividual and
> > lstStore nested inside lstCustomer.
> >
> > Not sure I get the idea of the book support that the brick-and-mortar
stores
> > have but online don't. Please educate me on this subject some more so I
> > could pass it along to the publisher. Do you mean to return the book?
> > Hopefully, you won't have to. And yes, I tried my best to keep it above
> > basic :-)
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> > message news:OaaxQZQjEHA.3476@.tk2msftngp13.phx.gbl...
> > > Interesting. I'll check it out. I guess I have to look into whether a
list
> > region can display rows like a
> > > table does it. Seems I have some reading up to do. Any pointers where
I
> > can find some basic steps for how to
> > > accomplish nested list regions?
> > >
> > > Judging by the publishers website, seems your book is one notch up
from
> > the basic books? (I prefer to buy
> > > books from a physical book store, to support them. I'd hate to see all
> > them go out of business. But where I
> > > can't find a book, yes, I do buy it off the net. Yours is on the list.
> > :-) )
> > >
> > > Thanks!
> > > --
> > > Tibor Karaszi, SQL Server MVP
> > > http://www.karaszi.com/sqlserver/default.asp
> > > http://www.solidqualitylearning.com/
> > >
> > >
> > > "Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message
> > news:el71IoFjEHA.384@.TK2MSFTNGP10.phx.gbl...
> > > > Tibor,
> > > >
> > > > Looks like nested list regions may do the trick for you, where the
> > outermost
> > > > list region will display the dataset rows, while the inner list
regions
> > are
> > > > the sections which visibility could be changed conditionally. Have
you
> > > > explored this opton?
> > > >
> > > > BTW, my book is shipping... see the report footer.
> > > >
> > > > --
> > > > Hope this helps.
> > > >
> > > > ----
> > > > Teo Lachev, MCSD, MCT
> > > > Author: "Microsoft Reporting Services in Action"
> > > > Publisher website: http://www.manning.com/lachev
> > > > Buy it from Amazon.com : http://tinyurl.com/3l49j
> > > > Home page and blog: http://www.prologika.com/
> > > > ----
> > > >
> > > > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
wrote
> > in
> > > > message news:eymIZXFjEHA.2524@.TK2MSFTNGP11.phx.gbl...
> > > > > Thanks Teo,
> > > > >
> > > > > I understand those options, but it will become too much of a mess
as
> > you
> > > > want to do more changes.
> > > > >
> > > > > I had problems understanding what the customer wanted until he
showed
> > me
> > > > this in Crystal. Imagine that you
> > > > > have several sections (like page header/body/footer). In effect,
you
> > have
> > > > several bodies, and position the
> > > > > columns freely into each section. In section A I want column x and
z,
> > with
> > > > this formatting. In section B I
> > > > > want columns z and y and g, having the desired formatting. Etc.
Then
> > you
> > > > say a condition which determines
> > > > > which section is to be used for the row data. For example, if the
> > value
> > > > for column A is this, use section A
> > > > > for the row. If the value is B, use section F.
> > > > >
> > > > > I very much doubt this can be done using the table control, as you
> > cannot
> > > > align columns conditionally (column
> > > > > width etc based on a value in the row). Methinks.
> > > > >
> > > > > Possibly by just positioning out text boxes etc, but I can't
really
> > see
> > > > how you can define several "sections",
> > > > > and control which section is to be used for the row data.
> > > > >
> > > > > I have a feeling this cannot be done using current version of RS.
This
> > is
> > > > fine, considering it is a 1.0
> > > > > product after all. The customer understand this as well. I just
wanted
> > to
> > > > see whether I missed something.
> > > > > (None of the three books I have mention anything along this line.
I
> > recall
> > > > asking for your book as well, but
> > > > > the store didn't have it. Looking forward to go through that too
when
> > I
> > > > get my hands on it. :-) ).
> > > > > --
> > > > > Tibor Karaszi, SQL Server MVP
> > > > > http://www.karaszi.com/sqlserver/default.asp
> > > > > http://www.solidqualitylearning.com/
> > > > >
> > > > >
> > > > > "Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message
> > > > news:OF$jESEjEHA.3232@.TK2MSFTNGP10.phx.gbl...
> > > > > > Tibor,
> > > > > >
> > > > > > You can base the column field on a expression,e.g.
> > > > > > =Iif(Fields!A.Value=<expression>, Fields!B.Value,
Fields!C.Value).
> > > > > > <expression> can reference to a field value or call to an
embedded
> > or
> > > > > > external function.
> > > > > >
> > > > > > In addition, you can implement conditional formatting, e.g.
identity
> > the
> > > > > > column value based on the condition, coloring cells, etc.
> > > > > >
> > > > > > --
> > > > > > Hope this helps.
> > > > > >
> > > > > > ----
> > > > > > Teo Lachev, MCSD, MCT
> > > > > > Author: "Microsoft Reporting Services in Action"
> > > > > > Publisher website: http://www.manning.com/lachev
> > > > > > Buy it from Amazon.com : http://tinyurl.com/3l49j
> > > > > > Home page and blog: http://www.prologika.com/
> > > > > > ----
> > > > > >
> > > > > > "Tibor Karaszi"
<tibor_please.no.email_karaszi@.hotmail.nomail.com>
> > wrote
> > > > in
> > > > > > message news:uCjSU4CjEHA.3664@.TK2MSFTNGP12.phx.gbl...
> > > > > > > Perhaps I'm only overlooking something very simple?
> > > > > > >
> > > > > > > I want to display different columns from my resultset,
depending
> > of
> > > > the
> > > > > > data
> > > > > > > in one column. I also want to apply different styles depending
on
> > that
> > > > > > > "controlling" column. I understand that I in a Table can
define
> > > > attributes
> > > > > > > for the whole row (same as when you select the "left" portion
of a
> > > > row),
> > > > > > > which can be based of the value of that row. But what if I
want to
> > > > display
> > > > > > > different columns, based on the data?
> > > > > > >
> > > > > > > Example:
> > > > > > > * A dataset with a datetime column. We want to sort by this in
the
> > > > report.
> > > > > > > Earliest event at the top.
> > > > > > > * Each row represent different activities over the day. One
column
> > > > define
> > > > > > > type of activity.
> > > > > > > * Depending of the type of activity, I want to display
different
> > > > columns
> > > > > > > from the dataset. Ideally, I want to control horizontal
position
> > > > depending
> > > > > > > on the type of activity.
> > > > > > >
> > > > > > > I believe that Crystal is using the term "Multiple Sections"
for
> > this,
> > > > but
> > > > > > > I'm not sure about the terminology.
> > > > > > >
> > > > > > > Thanks
> > > > > > > Tibor
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
> >
>|||One more thing you can try is coexrce the expression to bool, such as:
=CBool(Fields!CustomerType.Value = "i")
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23lYA18ojEHA.2812@.tk2msftngp13.phx.gbl...
> Hi Teo!
> What you are describing sound very much what I try to do. Unfortunately, I
couldn't run your code. I
> modified the connection information so the query ran fine (I get both "I"
and "S" in the
> CustomerType column, for different rows).
> However, when I run the query, I get compilation error:
> "C:\Projects\MutipleLists\ListDemo.rdl The hidden expression for the list
'lstCustomer' contains an
> error: [BC30201] Expression expected."
> Sorry to be a pain here, seems like I'm very close to what I want to
achieve... :-)
>
> What I mean by the book store, is that I enjoy walking around in a
physical book store, flipping the
> pages. Mainly for "ordinary" books, but as well for computer books. I'd
just hate to see that option
> go away in some far future, due to online book stores has driven physical
stores bust.
> I'm no fanatic, though. I do buy online as well, especially when there are
hard to get books, I'm
> tight on time to go shopping etc.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message
> news:ulTGY9RjEHA.2652@.TK2MSFTNGP15.phx.gbl...
> > Tibor,
> >
> > I attached a sample report that demonstrates nested lists. The Adventure
> > Works database has two types of customers: stores and individuals. The
idea
> > here is that if the customer is individual the report will show his
first
> > and last name. If the customer is store, store-specific details are
shown.
> >
> > This is accomplished by having two overlapping lists lstIndividual and
> > lstStore nested inside lstCustomer.
> >
> > Not sure I get the idea of the book support that the brick-and-mortar
stores
> > have but online don't. Please educate me on this subject some more so I
> > could pass it along to the publisher. Do you mean to return the book?
> > Hopefully, you won't have to. And yes, I tried my best to keep it above
> > basic :-)
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> > message news:OaaxQZQjEHA.3476@.tk2msftngp13.phx.gbl...
> > > Interesting. I'll check it out. I guess I have to look into whether a
list
> > region can display rows like a
> > > table does it. Seems I have some reading up to do. Any pointers where
I
> > can find some basic steps for how to
> > > accomplish nested list regions?
> > >
> > > Judging by the publishers website, seems your book is one notch up
from
> > the basic books? (I prefer to buy
> > > books from a physical book store, to support them. I'd hate to see all
> > them go out of business. But where I
> > > can't find a book, yes, I do buy it off the net. Yours is on the list.
> > :-) )
> > >
> > > Thanks!
> > > --
> > > Tibor Karaszi, SQL Server MVP
> > > http://www.karaszi.com/sqlserver/default.asp
> > > http://www.solidqualitylearning.com/
> > >
> > >
> > > "Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message
> > news:el71IoFjEHA.384@.TK2MSFTNGP10.phx.gbl...
> > > > Tibor,
> > > >
> > > > Looks like nested list regions may do the trick for you, where the
> > outermost
> > > > list region will display the dataset rows, while the inner list
regions
> > are
> > > > the sections which visibility could be changed conditionally. Have
you
> > > > explored this opton?
> > > >
> > > > BTW, my book is shipping... see the report footer.
> > > >
> > > > --
> > > > Hope this helps.
> > > >
> > > > ----
> > > > Teo Lachev, MCSD, MCT
> > > > Author: "Microsoft Reporting Services in Action"
> > > > Publisher website: http://www.manning.com/lachev
> > > > Buy it from Amazon.com : http://tinyurl.com/3l49j
> > > > Home page and blog: http://www.prologika.com/
> > > > ----
> > > >
> > > > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
wrote
> > in
> > > > message news:eymIZXFjEHA.2524@.TK2MSFTNGP11.phx.gbl...
> > > > > Thanks Teo,
> > > > >
> > > > > I understand those options, but it will become too much of a mess
as
> > you
> > > > want to do more changes.
> > > > >
> > > > > I had problems understanding what the customer wanted until he
showed
> > me
> > > > this in Crystal. Imagine that you
> > > > > have several sections (like page header/body/footer). In effect,
you
> > have
> > > > several bodies, and position the
> > > > > columns freely into each section. In section A I want column x and
z,
> > with
> > > > this formatting. In section B I
> > > > > want columns z and y and g, having the desired formatting. Etc.
Then
> > you
> > > > say a condition which determines
> > > > > which section is to be used for the row data. For example, if the
> > value
> > > > for column A is this, use section A
> > > > > for the row. If the value is B, use section F.
> > > > >
> > > > > I very much doubt this can be done using the table control, as you
> > cannot
> > > > align columns conditionally (column
> > > > > width etc based on a value in the row). Methinks.
> > > > >
> > > > > Possibly by just positioning out text boxes etc, but I can't
really
> > see
> > > > how you can define several "sections",
> > > > > and control which section is to be used for the row data.
> > > > >
> > > > > I have a feeling this cannot be done using current version of RS.
This
> > is
> > > > fine, considering it is a 1.0
> > > > > product after all. The customer understand this as well. I just
wanted
> > to
> > > > see whether I missed something.
> > > > > (None of the three books I have mention anything along this line.
I
> > recall
> > > > asking for your book as well, but
> > > > > the store didn't have it. Looking forward to go through that too
when
> > I
> > > > get my hands on it. :-) ).
> > > > > --
> > > > > Tibor Karaszi, SQL Server MVP
> > > > > http://www.karaszi.com/sqlserver/default.asp
> > > > > http://www.solidqualitylearning.com/
> > > > >
> > > > >
> > > > > "Teo Lachev" <teo.lachev@.nospam.prologika.com> wrote in message
> > > > news:OF$jESEjEHA.3232@.TK2MSFTNGP10.phx.gbl...
> > > > > > Tibor,
> > > > > >
> > > > > > You can base the column field on a expression,e.g.
> > > > > > =Iif(Fields!A.Value=<expression>, Fields!B.Value,
Fields!C.Value).
> > > > > > <expression> can reference to a field value or call to an
embedded
> > or
> > > > > > external function.
> > > > > >
> > > > > > In addition, you can implement conditional formatting, e.g.
identity
> > the
> > > > > > column value based on the condition, coloring cells, etc.
> > > > > >
> > > > > > --
> > > > > > Hope this helps.
> > > > > >
> > > > > > ----
> > > > > > Teo Lachev, MCSD, MCT
> > > > > > Author: "Microsoft Reporting Services in Action"
> > > > > > Publisher website: http://www.manning.com/lachev
> > > > > > Buy it from Amazon.com : http://tinyurl.com/3l49j
> > > > > > Home page and blog: http://www.prologika.com/
> > > > > > ----
> > > > > >
> > > > > > "Tibor Karaszi"
<tibor_please.no.email_karaszi@.hotmail.nomail.com>
> > wrote
> > > > in
> > > > > > message news:uCjSU4CjEHA.3664@.TK2MSFTNGP12.phx.gbl...
> > > > > > > Perhaps I'm only overlooking something very simple?
> > > > > > >
> > > > > > > I want to display different columns from my resultset,
depending
> > of
> > > > the
> > > > > > data
> > > > > > > in one column. I also want to apply different styles depending
on
> > that
> > > > > > > "controlling" column. I understand that I in a Table can
define
> > > > attributes
> > > > > > > for the whole row (same as when you select the "left" portion
of a
> > > > row),
> > > > > > > which can be based of the value of that row. But what if I
want to
> > > > display
> > > > > > > different columns, based on the data?
> > > > > > >
> > > > > > > Example:
> > > > > > > * A dataset with a datetime column. We want to sort by this in
the
> > > > report.
> > > > > > > Earliest event at the top.
> > > > > > > * Each row represent different activities over the day. One
column
> > > > define
> > > > > > > type of activity.
> > > > > > > * Depending of the type of activity, I want to display
different
> > > > columns
> > > > > > > from the dataset. Ideally, I want to control horizontal
position
> > > > depending
> > > > > > > on the type of activity.
> > > > > > >
> > > > > > > I believe that Crystal is using the term "Multiple Sections"
for
> > this,
> > > > but
> > > > > > > I'm not sure about the terminology.
> > > > > > >
> > > > > > > Thanks
> > > > > > > Tibor
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
> >
>