Print Crystal Viewer Drilldown from VB
Posted on 2004-09-30
If you flop a CRViewer into a VB form, yadda yadda, and hit the Crystal Toolbar print button, a simple dialog comes up to print the report. Works fine, but you can't choose what printer it goes to.
Same as above, but you double-click on a particular group in the report, a simple drill-down subreport is automatically generated by Crystal and added to a new tab at the top of the viewer. You can hit the Crystal Toolbar print button, the same simple dialog comes up to print the report. This prints the subreport tab you are currently on, which in this case is the auto-generated subreport.
If you write VB code to take care of selecting the printer, etc, you can no longer print the subreport. Even if you are on the subreport tab when you choose print, you still receive a printout of the main report itself.
I have found some bits of code that try to work around this, but it is a lot of code to get around something that works out of the box.
My question is, is there a correct way to add the ability of choosing a printer without breaking the drill-down printing, or is there a way to make the drill-down printing work without adding a huge amount of code and additional sub-reports manually...?