Hi, I'm able to display rows of data, from a view within my database perfectly. Now comes the time for me to visually arrange my data. Original format by crystal reports: Leave Type Leave Entitled Leave Taken Leave Left Medical 20 days 2 days 18 days Medical
20 days 1 day 19 days Maternity 14 days 4 days 10 days to be displayed as in a TreeView format: Leave Type Leave Entitled Leave Taken Leave Left +Medical 20 days 3 days(total) 17 days +Maternity 14 days 4 days 10 days After clicking on the '+' for Medical,
i'll get the 2 actual rows of data, which means, what is being displayed, the Leave Type is distinct, and all the columns in Leave Taken, and Leave left will be calculated accordingly. Let me know if I'm not being clear enough, I could try with another example
I think all you need to do it to group by Leave Type then programatically hide the details section so it will start with summed values then a user can click on the leave type then it will take them to the drilled down details on that leave type. Let me know
if you need more details Ryan
In the section expert use the suppress tab to programatically hide sections using the DrillDownGroupLevel variable. When the report is first shown the DrillDownGroupLevel is equal to 0 and every group that is drilldown to increments the DrillDownGroupLevel
value. For example you have a report with 1 group and a detail section, you only want to show the detail section when drilling down on a group so on the suppress tab for the detail section put this formula:
if DrillDownGroupLevel >=1 then
formula = false
else
formula = true
The above codes would be in the .vb file of the .rpt? I've never really coded on that, mainly just dragging and dropping, with a few variable/fomula fields
Alright, will try that out. Another point. The data source in my report is a view, which is something like(simplified) Select * from furniture. So, in my prior .aspx page, I would allow the users to select a few colours in which they want to view the furniture.
If the user checks Blue, Red, Green, These parameters will be passed over to the report. Now, I do know how to pass parameters over, but what I don't, is how do I pull from the data source(or whatever it's called) where colour = blue, red, green? When I vew
the SQL query in the report designer, the command is "SELECT * FROM furniture", I will need a where clause to be present. Let me know if I'm not making myself clear enough.
You can do one of two things. You can use a dataset, edit the sql and fill it based on the changed sql (Select * FROM Furniture where colour = blue or colour = red) and set the dataset as the datasource. Or you can use the parameters and the select expert to
filter it in the report. It is quite simple to do one parameter (ie. Blue) but it gets more complicated when there is more than one(blue or red). When you use multiple parameters you need to manually join them so they work in an IN statement. For example if
you wanted red and blue you would have to pass the value "'red','blue'" as it would be calculated as colour IN ('red','blue'). If you use a lot of multiple parameters I would recommend using datasets instead of parameters. I hope this isn't too confusing Ryan
PS. I would recommend getting the book at www.crystalreportsbook.com it really helps when it comes to these topics.
eXtension
Contributor
2015 Points
747 Posts
Displaying in Crystal Reports
Jan 20, 2005 02:35 PM|LINK
RyanSmith
Participant
1944 Points
374 Posts
Re: Displaying in Crystal Reports
Jan 20, 2005 11:21 PM|LINK
eXtension
Contributor
2015 Points
747 Posts
Re: Displaying in Crystal Reports
Jan 21, 2005 12:44 AM|LINK
eXtension
Contributor
2015 Points
747 Posts
Re: Displaying in Crystal Reports
Jan 25, 2005 03:19 AM|LINK
RyanSmith
Participant
1944 Points
374 Posts
Re: Displaying in Crystal Reports
Jan 25, 2005 03:53 AM|LINK
eXtension
Contributor
2015 Points
747 Posts
Re: Displaying in Crystal Reports
Jan 25, 2005 06:30 AM|LINK
RyanSmith
Participant
1944 Points
374 Posts
Re: Displaying in Crystal Reports
Jan 25, 2005 07:16 AM|LINK
eXtension
Contributor
2015 Points
747 Posts
Re: Displaying in Crystal Reports
Jan 26, 2005 06:36 AM|LINK
RyanSmith
Participant
1944 Points
374 Posts
Re: Displaying in Crystal Reports
Jan 26, 2005 10:50 PM|LINK
eXtension
Contributor
2015 Points
747 Posts
Re: Displaying in Crystal Reports
Jan 27, 2005 03:55 PM|LINK