Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Subreport Preview Post Reply Post New Topic
Page  of 4 Next >>
Author Message
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Topic: Subreport Preview
    Posted: 15 Apr 2015 at 11:18pm
Morning all,

I currently have a report setup which displays the Month-To-Date figures in a Calendar view, which works perfectly well on the main report.

Each 'day' of the calendar basically shows a number (which is a count of the number of entries for each day). I can then double click the number which takes me to the subreport.... but not in the way I expect.

I thought this would be considered a 'drill down' but instead it opens a 'Preview' tab. I was aiming to use the 'detail' section to show all of the entries once the user drill down into the Subreport but can't if it's in Preview...

Is there a way to suppress based on whether it's a preview or not? Or force it to drill down rather than preview?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Apr 2015 at 3:59am
Do you mean that the 'day number' for each 'calendar day' is actually a subreport displaying some sort of summarized data in the main report?
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 16 Apr 2015 at 5:40am
There is a subreport for each 'day' in the sense that all 'Sundays' are one subreport, all 'Mondays' are one subreport etc etc. 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Apr 2015 at 6:06am

and when you click on that WeekDay number it is actually clicking on the sub report that is displaying a value from the Sub Report, which in turn opens the subreport but in the summarized way and not showing the details.

First, is there a reason you are using subreports (I assume 7 - one per weekday) rather than bring all the dat ainto the main report and drilling into as you desired?
 
You also may be able to do what you want by running an on demand sub report attached to an object that overlays your other subreport. It would esentially be a copy of the existing subreport with the same links but be in "detail view" (no suppression) when it opens. I have not tried ot the overlapping process but have added on-demand sub reports as links onto other objects with success as a way of mimicking a user experience of drill down.


Edited by DBlank - 16 Apr 2015 at 6:07am
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 16 Apr 2015 at 11:28pm
Yes that's right. It has a link between the subreport and main report (using various Parameters and Formulas) and then when I double click the Calendar entry it takes me to the Subreport (which is actually the Subreport Preview instead of actually opening it, which is the problem).

To get it in the display of a Calendar, I don't think it's possible to do it without subreports (yes there is 7 subreports). Doing this all from the main report would result in a list of something similar....

On demand subreports are also unfortunately not feasible as I wouldn't be able to conditionally format the subreport backgrounds (Red, Amber, Green) dependent on the number of entries...

I was hoping there would be an option somewhere where I can turn off the Subreport Preview and make it drill down when double clicked. Even when I'm in the preview mode I can't seem to drill down.....
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Apr 2015 at 11:28am
I should have been clearer that I do not believe there is a way to force a sub-report to move change its drilldowngrouplevel when you launch it as a seperate tab from the main report. THis is why I was giving alternative solutions to make it appear as if that what was happening as I am guessing your end user(s) does not really care about the technical aspect, just how it interacts for them.
if you don't have other things in the main report you can get your 7 'columns' without subreports.
If you want to keep your same existing sub-report process going, did you try using a 'second' on demand sub report as your 'drill down' function?


Edited by DBlank - 20 Apr 2015 at 4:52am
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 19 Apr 2015 at 10:55pm
Thanks again for responding :-)

Oh right, sorry, I obviously misunderstood! That's absolutely correct; they are not bothered about the technicalities beneath the surface... I am intrigued; how would I be able to get the same effect without Subreports?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Apr 2015 at 4:50am
Do you have to use 'squares' with numbers in them (I assume to mimic the
look of a calendar)?
If you can use a chart you could do grouping on the weekday and drill straight into the data from say the bar in the chart.
If you have to use the boxes you could do that. Just don't want to explore it if it is not necesary.


Edited by DBlank - 20 Apr 2015 at 4:51am
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 20 Apr 2015 at 4:53am
In an ideal world they would be 'squares' with each 'column' representing a different week day. Unfortunately I don't think a chart would suffice for the End Users.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Apr 2015 at 5:28am
Bring all your data into the main report
Create 7 formula
//Sunday
if weeekday(table.datefield)=1 then 1 else 0
//Monday
if weekday(table.datefield)=2 then 1 else 0
//Tuesday
if weekday(table.datefield)=3 then 1 else 0
etc.
 
Place your 7 boxes in the report header
Add a new sub report
Name =Sunday (or whatever)
set it to an 'On demand subreport (similar to a hyperlink)'
Add you links
Shrink the size of this sub report width to fit inside the sunday box and place it inside your 'sunday box'.
right click on it and select 'format sub report'
select subreport tab
click on the formula field 'on-demand subreport caption'
add a formula here
Totext(SUM({@Sunday}),0)
 
Click OK
Your hyper link (in the main report) should now be the Sunday count from the main report
You can now design the sub report to look anyway you want.
Repeat for the other days.
I would get sunday exactly like you want it then just make copies of it for the other days. It would only be making changes to the select or links.
 
This is one approach.
 
 


Edited by DBlank - 20 Apr 2015 at 5:30am
IP IP Logged
Page  of 4 Next >>
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.