Friday, March 4, 2011

is possible to include a subreport or 2 reports in the same Crystal Report?

Hi Folks, im using Crystal Repots in vs2008, so im using datasets with procedures to get the data from the db, my escenario is the following:

In the same Crystal Report, i have to show two reports, basically using the sames datasets, and the same database, but they are diferents querys (have grouping and summing instead)

is this possible? and if it is how can i solute this, using database expert? or cross-tab? what option of crystal reports supports this operations?

Thanks in advance :)

From stackoverflow
  • You should be able to insert a "sub report" in Crystal on your primary report. You can pass parameters from the main report to the sub report and utilize a whole different command in the sub report. I'm not sure the exact keyboard sequence to insert a sub report in VS2008, but in CR 2008, it's as simple as using the file menu INSERT > SUB REPORT.

    Angel Escobedo : im trying it now, thanks... maybe the query is so hardcode it expect grouping by columns that not exists in the database explicit, so here we go...
  • Based on my own experiences, I have to agree with Greg - a subreport is probably the easiest-to-maintain solution to your problem. In the case of VS2008, the steps to follow are:

    1. Go to the Crystal Reports -> Insert -> Subreport menu option.
    2. Click where you want to place the subreport on the main report.
    3. The 'Insert Subreport' form will be displayed. Either choose an existing report, or create a new one using the Report Wizard. In the Report Wizard, you can also choose from the existing datasets un your project.

    To link your main report to the subreport right-click on the Subreport, and choose 'Change Subreport Links'.

    Hope that helps.

  • I could not print the subreport created. Whenever I click the print button, it takes me to main report and export main report in a pdf instead of doing the same for subreport. Will you please let me know why it is happening so in Crystal Report 10.5 and Asp.Net (VS 2008). It works fine in VS 2005 (ASP.Net and Crystal Report 10.2)

0 comments:

Post a Comment