Combine all SSRS reports in the Grid into one report - sql-server-2008-r2

It should be very simple and should employ multi-value parameters , but not able to figure out how ? This report takes parameters from the GridView I have a gridview in an asp.net web page which has print button for every row to print this report for that row.
Now, there are as many reports as there are rows in the grid.---[This part is done]
So,how about combining all these reports into one single report

You can add a subreport for each one of you reports.
You just create a new report and start inserting subreports in each row.
Check this documentation:
http://msdn.microsoft.com/en-us/library/dd220581.aspx
Here's an example for you:
1 - Create a new report. You can then add a tablix to it, in case you have more info, which is the case in my example. Just don't forget to add a dataset to that tablix if that's your case.
This is how it would look
Each gray line is a subreport.
2 - To insert a subreport just right-click a cell and go to Insert > Subreport
3 - Right-click your subreport, select Subreport Properties and choose your report from the drop-down menu:
4 - You can then set the parameters your subreport will receive:
Case 2: if you don't need a tablix for aditional info, just repeat the same process in a Rectangle.
UPDATE
As I said in my comment, here's one report in which I do exactly what you want:
As you can see the subreports are part of the main report's body that has other data.
I need to repeat these subreports for each record and that's how it is done.
Here you can see the Id being passed as parameter to my subreport:
From what I understood, that's what you want. That way for each record its current Id would be passed to the report. Generating a report with that "dynamic" parameter you mentioned.

Related

Linking fields to subreport

In my main report I have some fields which I need to use in my subreport.
Right now I'm loading one csv file in both the main and the sub reports, but this seems to slow down the preview of my reports (I need these reports in a program). Eve if I use the preview in Crystal Reporst, it loads 3 times the same database, so I was thinking about linking the fields.
So I do Right Click on Subreport -> Change Subreport Links... and then I put the fields I want on the right side of the shown table. But when I do a preview of the whole report, in the subreport it shows only the first line and not all the values inside.
How do I manage to make the subreport show all the values of the fields?

How to show data in multiple columns in report

Requirement:
I have a table in DB as below:
COP_MASTER
-----------------
CopDuty CopName
Duty1 Alpha1
Duty2 Alpha2
Duty1 Alpha3
Duty1 Alpha4
Duty2 Alpha5
Using iReport I need to prepare a report where the report looks like this:
CopDuty CopName
Duty1 Alpha1 Aplpha3 Alpha4
Duty2 Alpha2 Aplha5
Here the list of CopNames grows horizontally (or in a simpler terms the columns are dynamic).
I have already tried using subReport and inside the subReport's detail band a List element where the PrintOrder for the list element is kept "Horizontal". But the list grows vertically and not horizontally.
Any advice or help?
Prepare an independent report with the copName as a field to be displayed.
Make the printOrder properties available in the report properties tab as "Horizontal"
Change the Columns value:n (where n>1)
Go the main report and add the subreport element with the choice "Just add the subreport element".
Go to the Properties tab of the subreport element do the following changes as below:
Subreport Expression: $P{SUBREPORT_DIR}+"CopSubReportFileName.jasper"
DataSourceExpression: new net.sf.jasperreportsengine.data.JRBeanCollectionDatasource($F{cops})
Here we have to note that if the "cops" is a BO associated in the "Duty" BO then the above solution is just fine. But if it is to be tested through DB conn directly then the "dutyId" must be passed as report input parameter to the subreport for the corresponding copNames to be fetched and printed.

Multiple Crystal Report to be printed on same report

I have a crystal report that takes only about 1/3rd of the report space.
I have field read from the database which is an integer value.
I wish to print this report number of times as read from the database on the same page.
Any idea on how this can be achieved?
I can only use crystal report for achieving this.
Thanks in advance.
You can create another report and add your current report as a subreport multiple times
Lan is correct, build another report and add your current report as a subreport.
Here's the trick:
On your main report, have it make a list of all of the items that
you'd like to run the sub-report on.
On your sub-report, add a parameter called "itemNumber" or something like that. Then change your Subreport Links so the new "itemNumber" parameter is linked to the item on your top level report.
Now hide the field on the main report but leave the
subreport visible.!
This should make your report run for all items at one time.
In this case you can create a table with the maximum number of prints you will ever use. For example if you think you might need to print the report 100 times your table should contain records from 1 to 100. So lets assume this is the case- create a table , name it Copies and add a field CopyNo. Create a 100 records and set CopyNo from 1 to 100. Create the a main report based on Copies table - the record selection formula will be something like :
Copies.CopyNo<=#NumberOfCopies
#NumberOfCopies is a parameter , which you can set in order to control the printed copies. Create your actual report as a subreport and place it in the details section of the main report. When you run the report it will ask you for the number of copies and when you insert it, will print the same subreport as many times as the number you provide.

how to pass formula which is in group of main report to sub report (crystal report)

This question about crystal report.
I have crystal report, which has a formula in Group Section. I want to show all the generated group names in bottom of the crystal report.
So I have insert subreport to Main report footer. Then created a formula and link it to main report
formula.
But When running, in sub report, only show last generated group name only.
How to print all the generated group names in bottom of the report.
Thank you.
If I understand what you intend to do, you have a few options:
add a Cross-tab to the Report-Footer section - this will summarized the report's data without a second trip to the database
add a sub-report to the Report-Footer section - you will have more control of the formatting, but it will require a second trip to the database
create a formula that executes at print time (WhileReadingRecords) to store the group names in an array (note: arrays hold a maximum of 1000 entries), then create a second formula (also print time), that joins the array, adding it to the Report-Footer section.

Iterating with the subreport parameter

I have place a subreport in my master report. I have my query like, for a application I have some 3 jobID. Based on this jobID I need to fetch the related data. I placed the jobID in the detail band and passed the same to the subreport as parameter.
Since the subreport is reporting only once in the master report, even though I have 3 jobID, it is display the first jobID data in the master report.
I need to get data for all the jobID of a application.
please see whether your sub report shows value for 3id if not then it cant appear data from three reports.
also place the subreport on the details band.
simple query with tree id returnce three row in the sub report is must. then only it will apear in the main report.
Note : if you place the report on the non repeating band. then that band only show the first comming data insted of showing 3 lines.
donot place sub report on title/pageheader/column heder with repeting value.
place only those sub report on this band which give only one value or one row