Showing posts with label region. Show all posts
Showing posts with label region. Show all posts

Tuesday, March 20, 2012

placing two matrix data regions one below the other without spacin

On my report I want to place two matrix data regions, whereas the second
matrix data region is placed exactly below the first matrix data region -
without spacing.
The first matrix shows the data with the numbers for the year 2006 and the
second matrix shows exactly the same data but with the numbers for the year
2005 ! So I donâ't want to show the column header for the second matrix data
region again. Therefore I set the visibility of the column header textboxes
to hidden and the column header is not shown as expected.
But a spacing remains between the two matrix data regions and I donâ't know
how to to eliminate it. The spacing has the size (height) of the hidden
column header text boxes. Also rendering the report in Excel doesnâ't give the
correct result. I also want to avoid overlapping report items because this
will probably produce rendering problems too.
Who can help to get rid of the remaing spacing between the two matrix data
regions !?
Any hints are welcome !Try selecting the whole row of your column header, and set the Height (not
LineHeight) to 0.01cm (or whatever your measurements are.)
Also, make the background colour for the row the same as the cells under it,
making it look like the top cells are slightly bigger than the rest.
Kaisa M. Lindahl Lervik
"Timmo" <Timmo@.discussions.microsoft.com> wrote in message
news:A1D86284-DBE1-4BE8-9881-CED568E6D938@.microsoft.com...
> On my report I want to place two matrix data regions, whereas the second
> matrix data region is placed exactly below the first matrix data region -
> without spacing.
> The first matrix shows the data with the numbers for the year 2006 and the
> second matrix shows exactly the same data but with the numbers for the
> year
> 2005 ! So I don't want to show the column header for the second matrix
> data
> region again. Therefore I set the visibility of the column header
> textboxes
> to hidden and the column header is not shown as expected.
> But a spacing remains between the two matrix data regions and I don't know
> how to to eliminate it. The spacing has the size (height) of the hidden
> column header text boxes. Also rendering the report in Excel doesn't give
> the
> correct result. I also want to avoid overlapping report items because this
> will probably produce rendering problems too.
> Who can help to get rid of the remaing spacing between the two matrix data
> regions !?
> Any hints are welcome !
>|||Try selecting the whole row of your column header, and set the Height (not
LineHeight) to 0.01cm (or whatever your measurements are.)
Also, make the background colour for the row the same as the cells under it,
making it look like the top cells are slightly bigger than the rest.
Kaisa M. Lindahl Lervik
"Timmo" <Timmo@.discussions.microsoft.com> wrote in message
news:A1D86284-DBE1-4BE8-9881-CED568E6D938@.microsoft.com...
> On my report I want to place two matrix data regions, whereas the second
> matrix data region is placed exactly below the first matrix data region -
> without spacing.
> The first matrix shows the data with the numbers for the year 2006 and the
> second matrix shows exactly the same data but with the numbers for the
> year
> 2005 ! So I don't want to show the column header for the second matrix
> data
> region again. Therefore I set the visibility of the column header
> textboxes
> to hidden and the column header is not shown as expected.
> But a spacing remains between the two matrix data regions and I don't know
> how to to eliminate it. The spacing has the size (height) of the hidden
> column header text boxes. Also rendering the report in Excel doesn't give
> the
> correct result. I also want to avoid overlapping report items because this
> will probably produce rendering problems too.
> Who can help to get rid of the remaing spacing between the two matrix data
> regions !?
> Any hints are welcome !
>|||Hi Kaisa !
Thank you very much for your answer ! Unfortunately your hint didn't help. I
already tried to set the height of the row with the column headers to 0 cm
and also setting the height to 0.01 cm couldn't help because the system sets
the height automatically to 0.07937cm which seems to be some minimal height !?
Nevertheless, if another idea comes to your mind, I would appriciate it a lot.
Regards
Timmo
"Kaisa M. Lindahl Lervik" wrote:
> Try selecting the whole row of your column header, and set the Height (not
> LineHeight) to 0.01cm (or whatever your measurements are.)
> Also, make the background colour for the row the same as the cells under it,
> making it look like the top cells are slightly bigger than the rest.
> Kaisa M. Lindahl Lervik
> "Timmo" <Timmo@.discussions.microsoft.com> wrote in message
> news:A1D86284-DBE1-4BE8-9881-CED568E6D938@.microsoft.com...
> > On my report I want to place two matrix data regions, whereas the second
> > matrix data region is placed exactly below the first matrix data region -
> > without spacing.
> > The first matrix shows the data with the numbers for the year 2006 and the
> > second matrix shows exactly the same data but with the numbers for the
> > year
> > 2005 ! So I don't want to show the column header for the second matrix
> > data
> > region again. Therefore I set the visibility of the column header
> > textboxes
> > to hidden and the column header is not shown as expected.
> >
> > But a spacing remains between the two matrix data regions and I don't know
> > how to to eliminate it. The spacing has the size (height) of the hidden
> > column header text boxes. Also rendering the report in Excel doesn't give
> > the
> > correct result. I also want to avoid overlapping report items because this
> > will probably produce rendering problems too.
> >
> > Who can help to get rid of the remaing spacing between the two matrix data
> > regions !?
> > Any hints are welcome !
> >
>
>

Monday, March 12, 2012

Placeholds for missing rows ... is this possible?

I have a dataset like this that feeds a table data region in a report:

Answer Label Answer Count
Strongly Agree 10
Agree 7
Neutral 12
Disagree 19
Strong Disagree 9

For every Answer Label, I need the table to create a new row that displays the label and count so it looks just like the above. The problem occurs when the dataset does not include one or more Answer Labels because there are no counts associated to them. I still need to see all Answer Labels ... but simply set the count = 0 if it is not found in the dataset.

So working with a resultset like this:

Strongly Agree 10
Neutral 12

My table data region needs to look like such:

Strongly Agree 10
Agree 0
Neutral 12
Disagree 0
Strong Disagree 0

Is there a good way to do this?

Thanks - WaydeIf your dataset doesn't contain the rows it makes no sense to produce them afterwards..
If you have two tables, persons and answers you could left/right join them:

SELECT person.Name, count(answers.answer) as AnswerCount
FROM person LEFT JOIN answers ON person.ID = answers.personID
group by person.ID;

This statement means:
Take ALL persons from person and connect it with found answers of the answer-table, so you always get all persons and blank or "0" values for the answers.. If AnswerCount is empty you could use isnull(count(answers.answer),"0")

|||

Another approach would be:

-- Assume schema:

-- Table: AnswerTypes

-- ID (PK)

-- Label

-- Table: Answers

-- AnswerTypeId (FK)

--

select label, IsNull(a.CountAnswers, 0) as votes from AnswerTypes

left outer join

(

select AnswerTypeId, count(*) as CountAnswers from Answers

group by AnswerTypeId

) a on AnswerTypes.ID = a.AnswerTypeID