Search code examples
crystal-reports

Open linked subreport by clicking a number


I have several running totals in my Report Footer. I would like to be able to click on each one to open a subreport where I can show more detail about each one. Does anyone know if that's possible and how it is done? I would like to pass parameter values with each one to the subreport so it knows what to display. How can those be passed in this scenario?

enter image description here


Solution

  • It is certainly possible. Create a sub report and then link to the number as a hyperlink where you want to get the click functionality.

    Now pass the value to sub report record selection formula using sub report links and you get the desired functionality.

    Edit...........................................................

    Apologize... I understood your question in a wrong way.

    I don't think your requirement is possible in crystal reports(Atleast to me) but I can suggest you one work around. If you wish to use you can use it else let me know I will delete the answer.

    Instead of clicking on the running total and viewing the sub report, you can generate a new sub report just like you need for every option under the department.

    Follow the below process:

    Group by department (This will be first group) and then group by the next option (Sales, cost of sales etc) now suppress the group footer 2 but hide the group header 2 and place a sub report in group header (Don't create as a hyper link).

    Sub report:

    Perform the same grouping in sub report now link the (Sales, cost of sales) field to group 2 of the sub report from main report.

    In sub report perform your calculations and show the detailed report.

    When you preview to the left side you will be show drill down for group header 2 data click on that a new tab will be opened and data for the specific selection is shown.