Showing posts with label groups. Show all posts
Showing posts with label groups. Show all posts

Monday, March 19, 2012

Line break after group

I need to insert a line break in a detail row after certains groups of data.
example:
Week Day Detail
1 Mon 1
1 Tue 1
1 Wed 2
1 Thu 2
1 Fri 1
2 Mon 1
2 Tue 1
2 Wed 2
2 Thu 2
2 Fri 1
I need it to have a line break after week 1, 2, etc. Also, the detail column
has aggregates, runningvalues etc. There can't be a runningvalue on the line
break. I want the data to look like this:
Week Day Detail
1 Mon 1
1 Tue 1
1 Wed 2
1 Thu 2
1 Fri 1
2 Mon 1
2 Tue 1
2 Wed 2
2 Thu 2
2 Fri 1I would create a group on Week with no group header but a single blank row
group footer. This should be your innermost group. Outer groups will
calculate the aggregates properly. You'll need to scope any running values
to outer groups.
"Dutch" wrote:
> I need to insert a line break in a detail row after certains groups of data.
> example:
> Week Day Detail
> 1 Mon 1
> 1 Tue 1
> 1 Wed 2
> 1 Thu 2
> 1 Fri 1
> 2 Mon 1
> 2 Tue 1
> 2 Wed 2
> 2 Thu 2
> 2 Fri 1
> I need it to have a line break after week 1, 2, etc. Also, the detail column
> has aggregates, runningvalues etc. There can't be a runningvalue on the line
> break. I want the data to look like this:
> Week Day Detail
> 1 Mon 1
> 1 Tue 1
> 1 Wed 2
> 1 Thu 2
> 1 Fri 1
> 2 Mon 1
> 2 Tue 1
> 2 Wed 2
> 2 Thu 2
> 2 Fri 1

Monday, March 12, 2012

Limiting Records Returned within Groups

Sorry to be a noob here, but I've scoured the rest of the threads, and can't find the answer to my dilemma.

I'm trying to write a report that returns the top 10 depositors (based on current balance) for each of our branches. I've broken out each branch into it's own group.

When I apply the 'Top N' function, it limits the first group to 10 records, but pulls nothing for the remaining groups.

I've seen other posts that say I need to write a formula that counts the records in each group, and then in the detail section, suppress records greater than 10, but I have no idea how to create the 'count records' formula.

Again, sorry to be the fresh fish here, but I'm at my wit's end.

Thanksfirstly create a formula

formula 1:

//it puts in section 'Group header'
shared numbervar mycount:=0;


formula 2:

//now, inside section 'details'
shared numbervar mycount;
mycount:=mycount+1;


now, click right on section 'detalis' it shows popup menu
you do click on Format Section ......
click on button Suppress and there you have to write

shared numbervar mycount;
if mycount>10 then
true


I don't tested this, but I think it may help you|||Hensa22, you are my savior. Thank you so much.

Monday, February 20, 2012

Limit rows in detail section

I'd like to limit the number of rows in my detail section based on a
parameter.
For example, if I might have region and state as groups, and for each
store
I wanted to show the top 5 products (obviously different products in
each store)
by number sold.
But it could be 10 instead of 5 depending on what the user requested.
Any quick thoughts about this?
TIA,
JimMy first choice would be to limit the sql using a dynamic query ie
="select top " & Parameters!NumRows.Value & " * from mytable"
Of course the sql would have to be much fancier to get the top N for each
group..
The other thing you could do is filter in the group..
something about runningcount for the Group < Parameters!NumRows.value
should do it..
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"jhcorey@.yahoo.com" wrote:
> I'd like to limit the number of rows in my detail section based on a
> parameter.
> For example, if I might have region and state as groups, and for each
> store
> I wanted to show the top 5 products (obviously different products in
> each store)
> by number sold.
> But it could be 10 instead of 5 depending on what the user requested.
> Any quick thoughts about this?
> TIA,
> Jim
>