Showing posts with label single. Show all posts
Showing posts with label single. Show all posts

Friday, February 24, 2012

Chart legend has too much data - how to only show 1 legend

I have created a hybrid bar chart / with line. Basically uses the bars to
show sales for each geographic region. A single line is plotted showing the
sales goal to be reached. The x axis is "Region" The y axis value 1 is total
sales $. I added y value 2 to show the sales goal $ and the legend
automatically got populated with series labels. I only want the x axis
labels to be in the legend.
How can I fix this?NP,
This is not a direct answer to your question, but I got tired of the report
legend and what seemed the lack of configuration and used a nice trick from
the Technical Article: Get More Out of SQL Server Reporting Services Charts
(http://msdn2.microsoft.com/en-us/library/aa964128.aspx) to create my own
legend. The document is excellent, five stars.
If you use the Custom Chart Color Palettes and Legends section from the doc
you will see what I mean. You are able to create your own legend and use what
you want and remove what you don't.
Hope this helps.
Reeves
"NP" wrote:
> I have created a hybrid bar chart / with line. Basically uses the bars to
> show sales for each geographic region. A single line is plotted showing the
> sales goal to be reached. The x axis is "Region" The y axis value 1 is total
> sales $. I added y value 2 to show the sales goal $ and the legend
> automatically got populated with series labels. I only want the x axis
> labels to be in the legend.
> How can I fix this?

Chart in Subreport in Table - wrong data is charted

I have a report that contains a single chart. That report works fine by
itself, and as a subreport in many other contexts, but...
When I use that report as a sub-report inside a table, passing all of the
parameters to the sub-report based on values from the current row of the
table...
The chart is labelled correctly (I echo all parameters in the chart title),
but the data that's charted is clearly wrong. The chart always has 3
series, but in any given table, only the first chart is correct. All the
rest "randomly" (but reproducibly) either show all zeros for one or more
(but never all) series, or show data that looks a lot like the rendered
version of the data from the first chart (i.e. the data is the same
magnitude and shape on the printed page even if the real magnitude is quite
different).
I'm sure this is some magic of RS trying to "help" me by "grouping" or
"filtering" or in some other way "fixing" my data, since clearly I didn't
want to simply see the results of my queries charted... but I'm at a loss to
know what to do about it.
Any ideas?
I'm using RS 2005 SP2 on Server 2003 R2 SP2 x64.
-cd"Carl Daniel [VC++ MVP]" <cpdaniel_remove_this_and_nospam@.mvps.org.nospam>
wrote
>I have a report that contains a single chart. That report works fine by
>itself, and as a subreport in many other contexts, but...
> When I use that report as a sub-report inside a table, passing all of the
> parameters to the sub-report based on values from the current row of the
> table...
> The chart is labelled correctly (I echo all parameters in the chart
> title), but the data that's charted is clearly wrong. The chart always
> has 3 series, but in any given table, only the first chart is correct.
> All the rest "randomly" (but reproducibly) either show all zeros for one
> or more (but never all) series, or show data that looks a lot like the
> rendered version of the data from the first chart (i.e. the data is the
> same magnitude and shape on the printed page even if the real magnitude is
> quite different).
> I'm sure this is some magic of RS trying to "help" me by "grouping" or
> "filtering" or in some other way "fixing" my data, since clearly I didn't
> want to simply see the results of my queries charted... but I'm at a loss
> to know what to do about it.
> Any ideas?
> I'm using RS 2005 SP2 on Server 2003 R2 SP2 x64.
PS: I can see in SQL Profiler that all of the correct queries are being
executed with the correct parameters - one outer query by the master report
and one query per row for the sub report, with parameters taken from the
results of the outer query. All queries are OLAP/MDX queries, in case that
makes any difference (I can't imagine how it could, but who knows).
PPS: Yes, I know this would be more efficient if I "simply" built a larger
query and used grouping in a list or table instead of a sub-report, but
that's not the point. The queries are complex, and composing them would be
challenging (at least!); plus, the number of rows from the outer query is
never large.
-cd

Sunday, February 19, 2012

Chart data from custom assembly method?

Hi!
I'm new to reporting services and have a question for you.
I've managed to get a single value from a custom assembly method and publish
it on a report,
what I want to do now is to fill a chart with data from my custom assembly
method, the data
is returned like a dataset.
Displaying a single value was no big deal, found a lot of examples on the
net and in this forum, but
setting the custom dataset as source is very hard to find.
Regards,
Peter Larsson!Isn't this possible, anyone?
/P
"Peter Larsson" <peterskola@.frillesas.nospam> wrote in message
news:eAHDhuahHHA.1624@.TK2MSFTNGP06.phx.gbl...
> Hi!
> I'm new to reporting services and have a question for you.
> I've managed to get a single value from a custom assembly method and
> publish it on a report,
> what I want to do now is to fill a chart with data from my custom assembly
> method, the data
> is returned like a dataset.
> Displaying a single value was no big deal, found a lot of examples on the
> net and in this forum, but
> setting the custom dataset as source is very hard to find.
> Regards,
> Peter Larsson!
>
>