Sunday, March 25, 2012

Crystal Subreports problem

I could use some help very badly with subreports. I am looking up Bill of Materials part numbers. I have a report that shows the Assembly_Part_Numbers, Component_Part_Numbers, and some other fields. Now, assemblies such as pc boards, cable assemblies, frame assemblies, etc., may comtain components, e.g. - (Component_Part_Numbers) which are themselves assemblies as well. They may be cable subassemblies, daughter boards, etc. If a Component_Part_Number also is listed in the Assembly_Part_Numbers then it is a sub-assembly. I need to be able to show the component parts of these separately, as well.

Now, on the main report I group by Assembly_Part_Number then sort the group by Component_Part_Number. This listing is perfect. But I am having a really hard time figuring out how to do the subreport, or drill-down report. I want the user to be able to click or double-click on a Component_Part_Number listed and, if it is a sub-assembly, display a subreport showing all the components of the sub-assembly. Also, I need to be able to print these out, as well.

Can anybody point me in the right direction? I tried it myself and came up with a very ugly report. I've been using Crystal for over eight years, but have never needed to do a subreport before.

Thanks,
Michael FoxHave you tried Hierarchical Grouping Options in Report menu? This will allow you to establish recursive relation by specifying Instance ID and Parent ID, so the entire tree structure of your assemblies will be displayed. I am not sure, however, if it is possible to actually drill-down into the tree. I tend to think it is not possible, and you would need some frontend application to catch user clicks and re-display the report with selected data.

Subreport is not your friend in this case, because subreport is not recursive (can't have one subreport inside another one).

No comments:

Post a Comment