Showing posts with label grid. Show all posts
Showing posts with label grid. Show all posts

Friday, March 23, 2012

Report Viewer Control and VS 2005 ?

Hello,

I'm using Report Viewer Control and everything works fine. But my problem is I have the same report shown two ways, handout/grid . Handout has less columns and grid has way more.

Now how can I accomplish this task ? I was thinking maybe have two subreports within the one main and hide/unhide accordingly based on user selection of handout or grid.

The problem is all my attempts are unsuccessful.

I will really appreciate if someone can help me on this.

Thanks a lot.

Harsimrat

hmm.... how about creating 2 different reports and use if else statement to control which report to display on report viewer ?

not very clear on your requirements but just a suggestion... hth

|||

OK, the subreports is kind of two reports also. Can you give me an example how to achieve this ?

|||

are you developing rdlc or rdl report?

cos i was thinking if you want to use subreport, then you need 1 main report and 2 subreports.. while you can just use 2 reports to show the same result.... maybe you have your reason...

my idea was... create a combobox e.g. name cboView for the two options of display: handout ; grid

if (cboView.selectedvalue == "handout")

ReportViewer1.serverreport.reportpath = "................."

else

Reportviewer1.serverreport.reportpath="............"

|||

It is .rdlc report (Client Side). Can you show me the code how to call from the code as I'm using VS designer and if I don't provide the name to the Report Viewer component is not happy.

2nd Type of Report :

Secondly, I have another problem where I think I have to use subreporting. I have 10 different type of formats, based on how user saved them. Say User picks 5 Reports to be displayed and all are of different types (formats) I need to display them in Report Viewer one per page, where I cannot say ReportViewer1.Localreport.reportpath as then all 5 Pages will be using the same format which is totally wrong.

In that case I need to have one main report and 10 subreports in it. Now based on the ID I know what type of report it is. So how can I hide/unhide other 9 for Page 1. Then so on on different pages in same reportViewer1 . Can you please explain the hide/unhide code or how this should be done.

Hopefully you can understand what I'm trying to achieve. If you want more clarity I can try to explain more better.

Please let me know.

Thanks,

Harsimrat

|||

i just found out my suggestion won't work for webforms in local mode...

u might find this useful

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=203247&SiteID=1

i think you might find more assistance in the other forum... HTH

Wednesday, March 21, 2012

Report Two Data Subsets in the same Grid

This is likely very easy, but I'm not sure which direction is the best
way to go...
Dimension:
Time: Date and Hour the record occurred
Cube:
Has a field that counts the number of times an event occurred in a
given hour
I want to show a grid that has for each day of the month how many times
an event occured between 8:00 and 16:00 and from 16:00 to 20:00 hours.
What is the best way to role up the records in the report?
I've seen two possible ways to do it...
1) Use calculated fields with IIF statements to try to role up the
records.
Problem: IIF statement doesn't seem to work correctly.
2) Use a Matrix control to Filter the records correctly.
Problem: I can't seem to have two Filters on the Hour Group in the same
Matrix. One for 08:00 to 16:00 and one for 16:00 to 20:00.
Clearly I'm missing some key concept, because what I'm asking has to be
commonplace. Can someone point me in the right direction?
Thanks,
Paul WI might have missed something, but this is my suggestion:
Create a dataset that returns the number of events in two section, one for
8-16 and the other for 16-20. You should be able to do this with a
calculated member and filter in your MDX query. (No good examples spring to
mind, but you can always ask in the microsoft.public.sqlserver.olap news
group.)
Then create a matrix, and have two coloums (one for each section of the day)
and group on date.
Kaisa M. Lindahl Lervik
"Paul W" <pbwedz@.yahoo.com> wrote in message
news:1155143250.949345.213080@.n13g2000cwa.googlegroups.com...
> This is likely very easy, but I'm not sure which direction is the best
> way to go...
> Dimension:
> Time: Date and Hour the record occurred
> Cube:
> Has a field that counts the number of times an event occurred in a
> given hour
> I want to show a grid that has for each day of the month how many times
> an event occured between 8:00 and 16:00 and from 16:00 to 20:00 hours.
> What is the best way to role up the records in the report?
> I've seen two possible ways to do it...
> 1) Use calculated fields with IIF statements to try to role up the
> records.
> Problem: IIF statement doesn't seem to work correctly.
> 2) Use a Matrix control to Filter the records correctly.
> Problem: I can't seem to have two Filters on the Hour Group in the same
> Matrix. One for 08:00 to 16:00 and one for 16:00 to 20:00.
> Clearly I'm missing some key concept, because what I'm asking has to be
> commonplace. Can someone point me in the right direction?
> Thanks,
> Paul W
>