Showing posts with label columns. Show all posts
Showing posts with label columns. Show all posts

Wednesday, March 28, 2012

Multi-Table IDENTITY

Is there a way to associate IDENTITY columns from two different tables, so that new records created in either table will have mutually unique values?

That is, a new record in table A will be given value 1, and then a new record created in table B will be given value 2 (because value 1 was already used by the IDENTITY column in table A). Can this be done?

No, identity fields are only unique within the table.

Friday, March 23, 2012

Multiple-Parents

Can I have two different parents for the same child table in a dataset. The columns for which the relationships exist are the same:

For ex:

TABLE1

ID DATA

TABLE2

ID DATA

TABLE3

ID TABLETYPE TABLEID DATA

When TableTYPE is table1, TABLEID should be assigned ID from TAble1
and when TableTYPE is table2, TABLEID should be assigned ID from TABLE2

Is that possible. How can i get this behavior. The whole purpose of relationships is not constraint checking as much as assigning right ID values in a dataset.

HananielI think you should create a "dummy" parent table, let's call it "D", having 1-1 relationships to Table1 and Table2 and then you should link Table3 to table "D"

Something like that:

Table D: - has a field D_Id, of "autonumber" type

Table1 has a 1-1 relationship with table D on D_Id

Table2 has a 1-1 relationship with table D on D_Id

D has a 1-M relationship with Table3, on D_Id as primary key (Table3 is the "Slave" table)

Maro

Originally posted by Hananiel
Can I have two different parents for the same child table in a dataset. The columns for which the relationships exist are the same:

For ex:

TABLE1

ID DATA

TABLE2

ID DATA

TABLE3

ID TABLETYPE TABLEID DATA

When TableTYPE is table1, TABLEID should be assigned ID from TAble1
and when TableTYPE is table2, TABLEID should be assigned ID from TABLE2

Is that possible. How can i get this behavior. The whole purpose of relationships is not constraint checking as much as assigning right ID values in a dataset.

Hananiel

Wednesday, March 21, 2012

Multiple WHEREs in a query?

I want a query ro select the number of wins and the number of games played for a team. The pertinent columns are all in the same table and I was trying to get the information all in one query. Is something like this possible?
SELECT COUNT(*) AS Wins
FROM tbl_Schedule
WHERE Winner = 'IND'
SELECT COUNT(*) AS GamesPlayed
FROM tbl_Schedule
WHERE HomeID = 'IND' OR VisitorID = 'IND'
How would I merge the two, or can I even do that?SELECT
'Wins' = (SELECT COUNT(*) FROM tbl_Schedule WHERE Winner = 'IND'),
'GamesPlayed' = (SELECT COUNT(*) AS GamesPlayed FROM tbl_Schedule WHERE HomeID = 'IND' OR VisitorID = 'IND')|||Oh, very cool. I had no idea you could format them like that. Thanks for the help!

Monday, March 12, 2012

Multiple Tables

Hi,
I am using a SProc to run a report, is it possible to have 2 Tables in one
report which will display different columns from the dataset ?
ThanksYes. You can use the same dataset multiple times. For instance, you could
apply different filters to it, have a table and have a graph etc. What you
cannot do is have the sproc return two resultsets.
Also, you can have multiple datasets as well.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Vishal" <vrajput77@.hotmail.com> wrote in message
news:Od3rYTACGHA.740@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I am using a SProc to run a report, is it possible to have 2 Tables in one
> report which will display different columns from the dataset ?
> Thanks
>

Friday, March 9, 2012

Multiple Table Problem

Hi and Thanks to all in advance for help,
I have 2 tables. What we want to do is grab the columns listed and then
if the PRODUCTGROUP(int) column is larger than 4999 we only want to grab
items that have ONHAND(int) in the other table (STOCK) is greater than
0.
SELECT PRODUCTGROUPNUMBER, ITEMNO, STOCK.DESCRIPTION, KYWD,
STOCK.ITEMNUMBER, STOCK.WH, STOCK.ONHAND, STOCK.STNS FROM STOCK,
KEYWORDITEMS
WHERE
STOCK.ITEMNUMBER = PRODUCTGROUP.ITEMNO
AND
STOCK.WH = 1
AND
(Here is the confusion)
What I am trying to say is only accept the row if STOCK.ONHAND > 0 when
PRODUCTGROUP.PRODUCTGROUPNUMBER > 4999;
If PRODUCTGROUPNUMBER is below 4999 this rule should be ignored.
I attempted to use CASE statements but it was not working because it
wanted a result if the condition was false. I am sure I didn't do it
right though.
Other things I am trying to do:
CASE STOCK.STNS = "OBS" Then STOCK.STNS (don't change the column only
the returned result that is to become the new table) = "BEST DEAL" ELSE
''.
I would like to drop all STOCK columns after it is returned except
[DESCRIPTION] and [STNS]
Thanks again for your help.
Kelly"scorpion53061" <scorpion_nospamhere53061@.yahoo.com> wrote in message
news:ecLPziATFHA.3464@.tk2msftngp13.phx.gbl...
> Hi and Thanks to all in advance for help,
> I have 2 tables. What we want to do is grab the columns listed and then if
> the PRODUCTGROUP(int) column is larger than 4999 we only want to grab
> items that have ONHAND(int) in the other table (STOCK) is greater than 0.
> SELECT PRODUCTGROUPNUMBER, ITEMNO, STOCK.DESCRIPTION, KYWD,
> STOCK.ITEMNUMBER, STOCK.WH, STOCK.ONHAND, STOCK.STNS FROM STOCK,
> KEYWORDITEMS
> WHERE
> STOCK.ITEMNUMBER = PRODUCTGROUP.ITEMNO
> AND
> STOCK.WH = 1
> AND
> (Here is the confusion)
> What I am trying to say is only accept the row if STOCK.ONHAND > 0 when
> PRODUCTGROUP.PRODUCTGROUPNUMBER > 4999;
>
Try:
AND (ProductGroupNumber < 4999 OR Stock.OnHand >0)
JBK|||How are the two tables related? What does their DDL (create table) statement
s
look like?
Thomas
"scorpion53061" <scorpion_nospamhere53061@.yahoo.com> wrote in message
news:ecLPziATFHA.3464@.tk2msftngp13.phx.gbl...
> Hi and Thanks to all in advance for help,
> I have 2 tables. What we want to do is grab the columns listed and then if
the
> PRODUCTGROUP(int) column is larger than 4999 we only want to grab items th
at
> have ONHAND(int) in the other table (STOCK) is greater than 0.
> SELECT PRODUCTGROUPNUMBER, ITEMNO, STOCK.DESCRIPTION, KYWD, STOCK.ITEMNUMB
ER,
> STOCK.WH, STOCK.ONHAND, STOCK.STNS FROM STOCK, KEYWORDITEMS
> WHERE
> STOCK.ITEMNUMBER = PRODUCTGROUP.ITEMNO
> AND
> STOCK.WH = 1
> AND
> (Here is the confusion)
> What I am trying to say is only accept the row if STOCK.ONHAND > 0 when
> PRODUCTGROUP.PRODUCTGROUPNUMBER > 4999;
> If PRODUCTGROUPNUMBER is below 4999 this rule should be ignored.
> I attempted to use CASE statements but it was not working because it wante
d a
> result if the condition was false. I am sure I didn't do it right though.
> Other things I am trying to do:
> CASE STOCK.STNS = "OBS" Then STOCK.STNS (don't change the column only the
> returned result that is to become the new table) = "BEST DEAL" ELSE ''.
> I would like to drop all STOCK columns after it is returned except
> [DESCRIPTION] and [STNS]
>
> Thanks again for your help.
> Kelly
>|||I don't understand exactly what you are trying to do. Part of my confusion
is caused by your incomplete select statement. Take a look at this example
that I wrote and see if it gets you pointed in the right direction.
USE Northwind
GO
SELECT A.OrderID, A.CustomerID, A.EmployeeID,
A.OrderDate, A.RequiredDate, A.ShippedDate,
'EmployeeORShip' = CASE WHEN A.ShippedDate IS NULL THEN 'emp-' +
C.FirstName + ' ' + C.LastName ELSE 'shp-' + B.ContactName END
FROM Orders A
JOIN Customers B ON A.CustomerID = B.CustomerID
JOIN Employees C ON A.EmployeeID = C.EmployeeID
Keith
"scorpion53061" <scorpion_nospamhere53061@.yahoo.com> wrote in message
news:ecLPziATFHA.3464@.tk2msftngp13.phx.gbl...
> Hi and Thanks to all in advance for help,
> I have 2 tables. What we want to do is grab the columns listed and then if
> the PRODUCTGROUP(int) column is larger than 4999 we only want to grab
> items that have ONHAND(int) in the other table (STOCK) is greater than 0.
> SELECT PRODUCTGROUPNUMBER, ITEMNO, STOCK.DESCRIPTION, KYWD,
> STOCK.ITEMNUMBER, STOCK.WH, STOCK.ONHAND, STOCK.STNS FROM STOCK,
> KEYWORDITEMS
> WHERE
> STOCK.ITEMNUMBER = PRODUCTGROUP.ITEMNO
> AND
> STOCK.WH = 1
> AND
> (Here is the confusion)
> What I am trying to say is only accept the row if STOCK.ONHAND > 0 when
> PRODUCTGROUP.PRODUCTGROUPNUMBER > 4999;
> If PRODUCTGROUPNUMBER is below 4999 this rule should be ignored.
> I attempted to use CASE statements but it was not working because it
> wanted a result if the condition was false. I am sure I didn't do it right
> though.
> Other things I am trying to do:
> CASE STOCK.STNS = "OBS" Then STOCK.STNS (don't change the column only the
> returned result that is to become the new table) = "BEST DEAL" ELSE ''.
> I would like to drop all STOCK columns after it is returned except
> [DESCRIPTION] and [STNS]
>
> Thanks again for your help.
> Kelly
>|||Try,
SELECT
PRODUCTGROUPNUMBER,
ITEMNO,
STOCK.[DESCRIPTION],
KYWD,
STOCK.ITEMNUMBER,
STOCK.WH,
STOCK.ONHAND,
STOCK.STNS
FROM
STOCK
inner join
KEYWORDITEMS
on STOCK.ITEMNUMBER = PRODUCTGROUP.ITEMNO AND STOCK.WH = 1
WHERE
(STOCK.ONHAND > 0 and PRODUCTGROUP.PRODUCTGROUPNUMBER > 4999)
or
PRODUCTGROUP.PRODUCTGROUPNUMBER <= 4999
AMB
"scorpion53061" wrote:

> Hi and Thanks to all in advance for help,
> I have 2 tables. What we want to do is grab the columns listed and then
> if the PRODUCTGROUP(int) column is larger than 4999 we only want to grab
> items that have ONHAND(int) in the other table (STOCK) is greater than
> 0.
> SELECT PRODUCTGROUPNUMBER, ITEMNO, STOCK.DESCRIPTION, KYWD,
> STOCK.ITEMNUMBER, STOCK.WH, STOCK.ONHAND, STOCK.STNS FROM STOCK,
> KEYWORDITEMS
> WHERE
> STOCK.ITEMNUMBER = PRODUCTGROUP.ITEMNO
> AND
> STOCK.WH = 1
> AND
> (Here is the confusion)
> What I am trying to say is only accept the row if STOCK.ONHAND > 0 when
> PRODUCTGROUP.PRODUCTGROUPNUMBER > 4999;
> If PRODUCTGROUPNUMBER is below 4999 this rule should be ignored.
> I attempted to use CASE statements but it was not working because it
> wanted a result if the condition was false. I am sure I didn't do it
> right though.
> Other things I am trying to do:
> CASE STOCK.STNS = "OBS" Then STOCK.STNS (don't change the column only
> the returned result that is to become the new table) = "BEST DEAL" ELSE
> ''.
> I would like to drop all STOCK columns after it is returned except
> [DESCRIPTION] and [STNS]
>
> Thanks again for your help.
> Kelly
>
>|||I love what you did here though I have run the query for 10 minutes and
it is still running.
Here is what I have now with the corrected table names and fields....
SELECT
DISTINCT
PRODUCTGROUP,
ITEMNO,
STOCK2.[DESCRIPTION],
KYWD,
STOCK2.NUMBER,
STOCK2.WH,
STOCK2.ONHAND,
STOCK2.STNS
FROM
STOCK2
inner join
KEYWORDITEMS11
on STOCK2.NUMBER = KEYWORDITEMS11.ITEMNO AND STOCK2.WH = 1
WHERE
(STOCK2.ONHAND > 0 and KEYWORDITEMS11.PRODUCTGROUP > 4999)
or
KEYWordITEMS11.PRODUCTGROUP <= 4999
ORDER By PRODUCTGROUP, ITEMNO
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in
message news:AlejandroMesa@.discussions.microsoft.com:
> Try,
> SELECT
> PRODUCTGROUPNUMBER,
> ITEMNO,
> STOCK.[DESCRIPTION],
> KYWD,
> STOCK.ITEMNUMBER,
> STOCK.WH,
> STOCK.ONHAND,
> STOCK.STNS
> FROM
> STOCK
> inner join
> KEYWORDITEMS
> on STOCK.ITEMNUMBER = PRODUCTGROUP.ITEMNO AND STOCK.WH = 1
> WHERE
> (STOCK.ONHAND > 0 and PRODUCTGROUP.PRODUCTGROUPNUMBER > 4999)
> or
> PRODUCTGROUP.PRODUCTGROUPNUMBER <= 4999
>
> AMB
>
> "scorpion53061" wrote:
>|||You might get a better perf if you convert your "DISTINCT" and "OR" to
"UNION" query.
e.g.
SELECT
PRODUCTGROUP,
ITEMNO,
STOCK2.[DESCRIPTION],
KYWD,
STOCK2.NUMBER,
STOCK2.WH,
STOCK2.ONHAND,
STOCK2.STNS
FROM STOCK2 inner join KEYWORDITEMS11 on STOCK2.NUMBER =
KEYWORDITEMS11.ITEMNO AND STOCK2.WH = 1
WHERE (STOCK2.ONHAND > 0 and KEYWORDITEMS11.PRODUCTGROUP > 4999)
UNION
SELECT
PRODUCTGROUP,
ITEMNO,
STOCK2.[DESCRIPTION],
KYWD,
STOCK2.NUMBER,
STOCK2.WH,
STOCK2.ONHAND,
STOCK2.STNS
FROM STOCK2 inner join KEYWORDITEMS11 on STOCK2.NUMBER =
KEYWORDITEMS11.ITEMNO AND STOCK2.WH = 1
WHERE KEYWordITEMS11.PRODUCTGROUP <= 4999
ORDER By PRODUCTGROUP, ITEMNO
-oj
"scorpion53061" <scorpion_nospamhere53061@.yahoo.com> wrote in message
news:%23BTFhOBTFHA.2872@.TK2MSFTNGP14.phx.gbl...
>I love what you did here though I have run the query for 10 minutes and it
>is still running.
> Here is what I have now with the corrected table names and fields....
> SELECT
> DISTINCT
> PRODUCTGROUP,
> ITEMNO,
> STOCK2.[DESCRIPTION],
> KYWD,
> STOCK2.NUMBER,
> STOCK2.WH,
> STOCK2.ONHAND,
> STOCK2.STNS
> FROM
> STOCK2
> inner join
> KEYWORDITEMS11
> on STOCK2.NUMBER = KEYWORDITEMS11.ITEMNO AND STOCK2.WH = 1
> WHERE
> (STOCK2.ONHAND > 0 and KEYWORDITEMS11.PRODUCTGROUP > 4999)
> or
> KEYWordITEMS11.PRODUCTGROUP <= 4999
> ORDER By PRODUCTGROUP, ITEMNO
> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in
> message news:AlejandroMesa@.discussions.microsoft.com:
>

Multiple Stored Procedure Execute Together - How?

Hi,
I have multiple stored procedures (SP) running in multiple databases. The
output of all the databases has same column names, same number of columns an
d
column types.
I want to run all these different SP's as one SP and combine the output as
one result.
I tried creating one new SP as SPAll and calling all the SP's in SPAll.
eg.
Create SPAll @.Parameter int
AS
Exec SP1 @.Parameter
Exec SP2 @.Parameter
GO
But when I execute SPAll from 'sql server reporting services' (vs.net), it
executes and displays results from SP1 also. I want to display results from
both SP1 and SP2.
Thanks in advance.Hello GJ.
execute the stored procedures saving the result sets to a temporary table
and then select the results from the temporary table to give you a single
result set
IE:
use Northwind
GO
set nocount on
if object_id('tempdb..#results') is not null drop table #results
create table #results(
index_name sysname,/* Index name. */
index_description varchar(210),/* Index description. */
index_keys nvarchar(2078)/* Table or view column(s) upon which the index is
built. */
)
insert #results(index_name,index_description,in
dex_keys)
exec sp_helpindex @.objname = 'dbo.Categories'
insert #results(index_name,index_description,in
dex_keys)
exec sp_helpindex @.objname = 'dbo.Customers'
select * from #results
regards,
Mark Baekdal
http://www.dbghost.com
http://www.innovartis.co.uk
+44 (0)208 241 1762
Database change management for SQL Server
"GJ" wrote:

> Hi,
> I have multiple stored procedures (SP) running in multiple databases. The
> output of all the databases has same column names, same number of columns
and
> column types.
> I want to run all these different SP's as one SP and combine the output as
> one result.
> I tried creating one new SP as SPAll and calling all the SP's in SPAll.
> eg.
> Create SPAll @.Parameter int
> AS
> Exec SP1 @.Parameter
> Exec SP2 @.Parameter
> GO
> But when I execute SPAll from 'sql server reporting services' (vs.net), it
> executes and displays results from SP1 also. I want to display results fro
m
> both SP1 and SP2.
> Thanks in advance.|||Best way, based on what you are telling us:
Create SPAll @.Parameter int
AS
create table #spAllReturn
(
<columns that match procs>
)
insert into #spAllReturn
Exec SP1 @.Parameter
insert into #spAllReturn
Exec SP2 @.Parameter
select * from #spAllReturn
GO
----
Louis Davidson - drsql@.hotmail.com
SQL Server MVP
Compass Technology Management - www.compass.net
Pro SQL Server 2000 Database Design -
http://www.apress.com/book/bookDisplay.html?bID=266
Note: Please reply to the newsgroups only unless you are interested in
consulting services. All other replies may be ignored :)
"GJ" <GJ@.discussions.microsoft.com> wrote in message
news:AA68D163-4681-4794-B4F0-748E72C18760@.microsoft.com...
> Hi,
> I have multiple stored procedures (SP) running in multiple databases. The
> output of all the databases has same column names, same number of columns
> and
> column types.
> I want to run all these different SP's as one SP and combine the output as
> one result.
> I tried creating one new SP as SPAll and calling all the SP's in SPAll.
> eg.
> Create SPAll @.Parameter int
> AS
> Exec SP1 @.Parameter
> Exec SP2 @.Parameter
> GO
> But when I execute SPAll from 'sql server reporting services' (vs.net), it
> executes and displays results from SP1 also. I want to display results
> from
> both SP1 and SP2.
> Thanks in advance.|||GJ
create table #test
(
col ...
....
....
)
insert into #test exec sp1
insert into #test exec sp2
select * from #test
"GJ" <GJ@.discussions.microsoft.com> wrote in message
news:AA68D163-4681-4794-B4F0-748E72C18760@.microsoft.com...
> Hi,
> I have multiple stored procedures (SP) running in multiple databases. The
> output of all the databases has same column names, same number of columns
and
> column types.
> I want to run all these different SP's as one SP and combine the output as
> one result.
> I tried creating one new SP as SPAll and calling all the SP's in SPAll.
> eg.
> Create SPAll @.Parameter int
> AS
> Exec SP1 @.Parameter
> Exec SP2 @.Parameter
> GO
> But when I execute SPAll from 'sql server reporting services' (vs.net), it
> executes and displays results from SP1 also. I want to display results
from
> both SP1 and SP2.
> Thanks in advance.

Wednesday, March 7, 2012

Multiple Sorting

Hello All!
My report has columns Date, Year, Model, Cost, Color
I have users that will require the abililty to sort by multiple criteria.
Is it possible to configure a primary AND secondary AND maybe a THIRD sort
in Reporting Services?
For example: Sort the above columns as: Date, Model and Cost at the same
time?
This sorting criteri will change based on the user and the info sought. So
another user may want to
sort on Cost and Year, while another person wants Color,Cost, Year etc..
Currently, as far as I know, Reporting Services limits one to one column
sort at a time in a report.
Thanks in advance !
ScottOn Nov 16, 9:53 am, iamscott <iamsc...@.discussions.microsoft.com>
wrote:
> Currently, as far as I know, Reporting Services limits one to one column
> sort at a time in a report.
By default, all of your objects will be populated in the order of the
data in the DataSet. You can define this with a ORDER BY clause in
your SQL.
But, you can create Sort rules by object in your Report. Go to your
Table Properties, then the Sort tab, and you can add multiple sorting
rules to your table. Each rule is applied in sequence, with an
Ascending or Descending. Note that the sorting value is actually an
Expression, which means you can make it dynamic with a little code.
For your problem, what I would do is create a Parameter called
SortRules, make it a Integer, then define Available values as:
"Date, Model, Cost", 1
"Cost, Year", 2
"Color, Cost, Year", 3
etc
Then, in your table, add three Sort rules, each Ascending
Rule 1:
= IIF( Parameters!SortRules.Value = 1, Fields!Date.Value,
IIF( Parameters!SortRules.Value = 2, Fields!Cost.Value,
IIF( Parameters!SortRules.Value = 3, Fields!Color.Value,
Nothing ) ) )
Rule 2:
= IIF( Parameters!SortRules.Value = 1, Fields!Model.Value,
IIF( Parameters!SortRules.Value = 2, Fields!Year.Value,
IIF( Parameters!SortRules.Value = 3, Fields!Cost.Value,
Nothing ) ) )
Rule 3:
= IIF( Parameters!SortRules.Value = 1, Fields!Cost.Value,
IIF( Parameters!SortRules.Value = 2, Nothing,
IIF( Parameters!SortRules.Value = 3, Fields!Year.Value,
Nothing ) ) )
Now, when the user views the report, they will get a Parameter Prompt
at the top to select a sort method, then after choosing one and
hitting the View Report, the table will sort based on that method.
-- Scott|||Thanks so much for your idea! have a great weekend!
Scott
"Orne" wrote:
> On Nov 16, 9:53 am, iamscott <iamsc...@.discussions.microsoft.com>
> wrote:
> > Currently, as far as I know, Reporting Services limits one to one column
> > sort at a time in a report.
> By default, all of your objects will be populated in the order of the
> data in the DataSet. You can define this with a ORDER BY clause in
> your SQL.
> But, you can create Sort rules by object in your Report. Go to your
> Table Properties, then the Sort tab, and you can add multiple sorting
> rules to your table. Each rule is applied in sequence, with an
> Ascending or Descending. Note that the sorting value is actually an
> Expression, which means you can make it dynamic with a little code.
> For your problem, what I would do is create a Parameter called
> SortRules, make it a Integer, then define Available values as:
> "Date, Model, Cost", 1
> "Cost, Year", 2
> "Color, Cost, Year", 3
> etc
> Then, in your table, add three Sort rules, each Ascending
> Rule 1:
> = IIF( Parameters!SortRules.Value = 1, Fields!Date.Value,
> IIF( Parameters!SortRules.Value = 2, Fields!Cost.Value,
> IIF( Parameters!SortRules.Value = 3, Fields!Color.Value,
> Nothing ) ) )
> Rule 2:
> = IIF( Parameters!SortRules.Value = 1, Fields!Model.Value,
> IIF( Parameters!SortRules.Value = 2, Fields!Year.Value,
> IIF( Parameters!SortRules.Value = 3, Fields!Cost.Value,
> Nothing ) ) )
> Rule 3:
> = IIF( Parameters!SortRules.Value = 1, Fields!Cost.Value,
> IIF( Parameters!SortRules.Value = 2, Nothing,
> IIF( Parameters!SortRules.Value = 3, Fields!Year.Value,
> Nothing ) ) )
> Now, when the user views the report, they will get a Parameter Prompt
> at the top to select a sort method, then after choosing one and
> hitting the View Report, the table will sort based on that method.
> -- Scott
>

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
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
> >
>