Showing posts with label sections. Show all posts
Showing posts with label sections. Show all posts

Wednesday, March 21, 2012

Multiple details sections, possible?

In a table the details section is called "table1_Details_Group". Is it possible to add a second details group so that I can have the two groups have different group properties?

I'm trying to avoid creating a second table and using an expression to only show one at a time.

Again Thanks.

See this tutorial on adding groupings to a report. It uses a table for an example.

http://msdn2.microsoft.com/en-us/library/ms170623.aspx

|||Thanks but the details section of a table seems not to fit the general information you linked to. For instance I can change the name of any group except the details group and the details group is not grouped on any expression.

I don't think I can create a separate details group, something crystal allows, but was hoping there was a trick or process I was missing.

So to be brief, can one table have more than one details group? If so how is the second detail group created?

|||I don't think I am clear on what you mean by details group. A table can have multiple groups and each group will have it's own set of detail rows based on the grouping expression. Can you give me a better idea of what you are trying to accomplish?|||
Create a brand new table. This table will have 3 sections; a header, a details section/group/ and a footer. Right click on the details section and choose edit group. This will bring up the group information for the details section. For example the name of this group will probably be "table1_Details_Group".

I want to have a second details group in the same table which will have different properties from the first. Can I do this?

|||No it isn't possible. How do you want your data to be displayed? Maybe there is another path to the end result you are looking for.|||FYI, you can insert more rows for the detail group. These have their own properties but they aren't the same as a group. I don't know what particular group properties you are looking for.|||thanks.

Multiple Detail Sections

I have created a report that is using a table with multiple groupings. My
main result set from a stored procedure populates the detail section of the
table. I have a secondary result set that I would like to populate based on a
value from the first result set. For example:
Detail 1 Customer 1
Detail 2 Order 1
Order 2
Order 3
Detail 2 is populated based on the customer id.
How can I accomplish this using the report authoring tool?
Any help would be appreciated.Assuming you are not trying to do a table with groupings, this can be
accomplished with nested "List" items (a list inside of a list) which allow
a free form layout. You just bind each list to the correct dataset for your
detail. See the Sample Reports for an example.
"Scott2624" <Scott2624@.discussions.microsoft.com> wrote in message
news:8411C050-B2FE-48B1-8E26-755220D4FD06@.microsoft.com...
>I have created a report that is using a table with multiple groupings. My
> main result set from a stored procedure populates the detail section of
> the
> table. I have a secondary result set that I would like to populate based
> on a
> value from the first result set. For example:
> Detail 1 Customer 1
> Detail 2 Order 1
> Order 2
> Order 3
> Detail 2 is populated based on the customer id.
> How can I accomplish this using the report authoring tool?
> Any help would be appreciated.
>

Monday, March 19, 2012

Multiple DECLARE Sections ... why?

Is there any value to having multiple DECLARE sections within a single store
d
proc/statement block? I understand the value of multiple DECLARE sections
that are related to local variable within specific statement blocks.
However, in working with existing SP's, I run across the following on a
regular basis and would like to better understand if this structure provides
any value and/or cost to the proc's effeciency.
Thanks in advance for your insight/feedback.
Example:
CREATE PROC test
AS
DECLARE
@.var1 int,
@.var2 int
DECLARE
@.text1 varchar(8),
@.text2 varchar(8)It makes no difference. SQL is interpreted, so this won't make any
difference at all to the execution of the SP.
It looks like it was done to aid reading the code, all variables of the same
type declare together.
Regards
Colin Dawson
www.cjdawson.com
"Tom B." <TomB@.discussions.microsoft.com> wrote in message
news:74FD5973-B982-4C06-92F9-3DEAB4879109@.microsoft.com...
> Is there any value to having multiple DECLARE sections within a single
> stored
> proc/statement block? I understand the value of multiple DECLARE sections
> that are related to local variable within specific statement blocks.
> However, in working with existing SP's, I run across the following on a
> regular basis and would like to better understand if this structure
> provides
> any value and/or cost to the proc's effeciency.
> Thanks in advance for your insight/feedback.
> Example:
> CREATE PROC test
> AS
> DECLARE
> @.var1 int,
> @.var2 int
> DECLARE
> @.text1 varchar(8),
> @.text2 varchar(8)
>|||Sorry for any confusion, but the example was just that ... a basic
representation of the code that I've seen (actual code doesn't appear to hav
e
much rhyme or reason to the variable groupings). As for its value with
making the code more user friendly to read ... that makes perfect sense.
Thanks for the quick feedback!
"Tom B." wrote:

> Is there any value to having multiple DECLARE sections within a single sto
red
> proc/statement block? I understand the value of multiple DECLARE sections
> that are related to local variable within specific statement blocks.
> However, in working with existing SP's, I run across the following on a
> regular basis and would like to better understand if this structure provid
es
> any value and/or cost to the proc's effeciency.
> Thanks in advance for your insight/feedback.
> Example:
> CREATE PROC test
> AS
> DECLARE
> @.var1 int,
> @.var2 int
> DECLARE
> @.text1 varchar(8),
> @.text2 varchar(8)
>

Multiple dataset in a single report

Let's say we have two (logical) sections within a report, one that displays a record from table_A and on the other one displays a Barchart based on the values fetched from table_B.
Could we assign seperate queries (resultset) to above mentioned situation ?
p.s. Right now, we are doing it through JOIN between tables A and B. However, we would like to not use that.If you have different, tables, matrixes, etc within a report you may assign
a different result set to each one...Just define the multiple queries, and
make the assignment in the properties of the table/matrix
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Kam" <Kam@.discussions.microsoft.com> wrote in message
news:642C9A77-A4C2-44EE-B639-AC8C31E9776A@.microsoft.com...
> Let's say we have two (logical) sections within a report, one that
displays a record from table_A and on the other one displays a Barchart
based on the values fetched from table_B.
> Could we assign seperate queries (resultset) to above mentioned situation
?
> p.s. Right now, we are doing it through JOIN between tables A and B.
However, we would like to not use that.