Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing Subreports using the CRVIEWER
Message
From
05/08/2002 14:02:40
Walter Meester
HoogkarspelNetherlands
 
 
To
05/08/2002 11:18:23
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Miscellaneous
Thread ID:
00686106
Message ID:
00686255
Views:
47
Richard,

>Thanks for that, though i think you misunderstand what i am trying to do, I load the crystal report into the viewer and display it using the crviewer.viewreport()

>Within this report in the viewer is an 'On demand subreport' which drills down to a new level of the report and previews it on a new page in the viewer, but clicking the print icon buton in the toolbar prints the main page of the report even though you are viewing the subreport.
THISFORM.CrViewer.PrintReport()
does print the active tab in the CrViewer.

Your problem is that you use the standard icon for printing the report. Yes, then the whole report is printed. This is one of the little quircks I don't understand why they are there. You can check in the PrintButtonClicked event the ActiveViewIndex property which tab is selected. If it is a drilldown (>1) you must use the THISFORM.CrViewer.PrintReport() to print the drilldown. Then you must prevent the default behaviour of the event by either setting usedefault to .F. or a NODEFAULT (I must admit I never tried this myself as I don't use the standard icons of CR because of different languages).

Walter,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform