Showing posts with label chart. Show all posts
Showing posts with label chart. Show all posts

Wednesday, March 28, 2012

Report pagination for charts

Hi,

We have developed few reports displaying data using chart layout. In the Data tab, we have specified MDX query that will return top 10 records.

But now, instead of restricting to just top 10 records, we would like to display all records and go in for pagination.

Is there some setting in the chart properties, where in I can display the first n records in first page, and the next n records( if available) in the next page and so on?

Can I specify the value of n somewhere in the propeties?

I read through many posts regarding pagination but those couldn't help me much.

Please help me in solving this problem.

Any help would be appreciated.

Thanks in advance!

No response yet!:(|||

One approach is the following:

Step 1: Add a table to the report
Step 2: Group by a number of rows
Right-click on the table and select Properties. Add a table group (with a group header, but no group footer)
Enter this for the group expression: =Ceiling(RowNumber(Nothing)/10)
This will cause the table to group on every ten rows. So you'll get a separate table group for every ten rows.
Step 3: Add a chart in the table group header
Design your chart.

Note: this approach is similar to the table inline charts approach discussed in the following whitepaper: http://msdn2.microsoft.com/en-us/library/aa964128.aspx

-- Robert

|||

Thanks a lot Robert!

I got the idea from the solution provided by you and did the following:

Step 1: Add a list to the report

Step 2: Added group expression for the list to group the data

Grouping =Ceiling(RowNumber(Nothing)/10)

Set the following properties for list:

KeepTogether: False

PageBreakAtEnd: True

Step 3: Added chart to the list

Set the property, PageBreakAtEnd: True for the chart.

The above steps solved my problem of report pagination for charts.

Thanks once again!

sql

Report pagination for charts

Hi,

We have developed few reports displaying data using chart layout. In the Data tab, we have specified MDX query that will return top 10 records.

But now, instead of restricting to just top 10 records, we would like to display all records and go in for pagination.

Is there some setting in the chart properties, where in I can display the first n records in first page, and the next n records( if available) in the next page and so on?

Can I specify the value of n somewhere in the propeties?

I read through many posts regarding pagination but those couldn't help me much.

Please help me in solving this problem.

Any help would be appreciated.

Thanks in advance!

No response yet!:(|||

One approach is the following:

Step 1: Add a table to the report
Step 2: Group by a number of rows
Right-click on the table and select Properties. Add a table group (with a group header, but no group footer)
Enter this for the group expression: =Ceiling(RowNumber(Nothing)/10)
This will cause the table to group on every ten rows. So you'll get a separate table group for every ten rows.
Step 3: Add a chart in the table group header
Design your chart.

Note: this approach is similar to the table inline charts approach discussed in the following whitepaper: http://msdn2.microsoft.com/en-us/library/aa964128.aspx

-- Robert

|||

Thanks a lot Robert!

I got the idea from the solution provided by you and did the following:

Step 1: Add a list to the report

Step 2: Added group expression for the list to group the data

Grouping =Ceiling(RowNumber(Nothing)/10)

Set the following properties for list:

KeepTogether: False

PageBreakAtEnd: True

Step 3: Added chart to the list

Set the property, PageBreakAtEnd: True for the chart.

The above steps solved my problem of report pagination for charts.

Thanks once again!

Monday, March 26, 2012

Report not Aggregates

Is there anyway to do a simple line chart that compares 5 fields? For
example, X axis shows fieldA, fieldB, fieldC, etc where Y axis is the value.
I'm having such a hard time with this, the report keeps wanting to take the
Sum or Count (aggregate) of fields. The values don't need summed, they're
already contained in the fields. Please help.
Thanks,
RyanHello Ryan,
I would like to know how you use the SQL Statement to get the dataset.
Also, please give me some sample data.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||2 Tables
table_items
item_id (PK)
item_name
table_values
value_id (PK)
year
actual_amount
item_id (FK)
SQL statement used for the dataset (for years 2002-2004 for example)
(the embedded selects are because some items will not have a row for years,
this puts a 0 value in for those years)
SELECT A.item_id, A.item_name, ISNULL
((SELECT actual_amount
FROM dbo.amounts
WHERE (item_id = A.id) AND (year = 2002)),
0) AS [2002 Actual], ISNULL
((SELECT actual_amount
FROM dbo.amounts AS amounts_5
WHERE (item_id = A.id) AND (year = 2003)),
0) AS [2003 Actual], ISNULL
.....
ETC.
The SQL resultset looks like this:
item_id
item_name
2002 Actual
2003 Actual
2004 Actual
Each item (detail row) is displayed on it's own page. I want each item to
have it's own graph. Just a simple line graph in this example would display
on the X-axis 2002 Actual, 2003 Actual, and 2004 Actual.
Probably too much info for a simple problem but there it is!
Thanks!
Ryan
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:HQcIY19CIHA.360@.TK2MSFTNGHUB02.phx.gbl...
> Hello Ryan,
> I would like to know how you use the SQL Statement to get the dataset.
> Also, please give me some sample data.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hello Ryan,
I suggest you just use another dataset for the chart.
Since the chart is based on the dataset's column and you could not put
multiple columns into the X Axis, you need to use another dataset like this:
item_id, item_name, Actual value, Year.
So that when you put the Year into the X axis, you could get the result you
want.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hmmm, this looks good. The problem though is that the last year in the
chart is a different field. For example:
[2006 Actual], [2007 Actual], [2008 Budget].
The last year draws from a Budget field and not the Actual field.
Looks like this may not be doable. We did have the chart in Microsoft
Access. I may have them use that or see if there's any way to accomplish
this in Crystal Reports (I need something I can build into my VS project).
Thanks,
Ryan
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:7$yFzgvDIHA.5256@.TK2MSFTNGHUB02.phx.gbl...
> Hello Ryan,
> I suggest you just use another dataset for the chart.
> Since the chart is based on the dataset's column and you could not put
> multiple columns into the X Axis, you need to use another dataset like
> this:
> item_id, item_name, Actual value, Year.
> So that when you put the Year into the X axis, you could get the result
> you
> want.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hello Ryan,
If you are using VS 2005, you could use the ReportViewer Control to
complish this report in the WinForm or Web Form.
Reporting Services and ReportViewer Controls in Visual Studio
http://msdn2.microsoft.com/en-us/library/ms345248.aspx
Hope this helps.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.