how to publish multiple sub-report in jasper server - jasperserver

how to publish a main report which has multiple sub-reports for example main report A consists of a sub-report B and sub-report B consists of sub-report C and they have different parameters, for example report B has different parameter and report c has different parameter. i can able to publish all three reports but i am getting an error with arguments (parameters are unable to call) from the main report

Make sure you connected all the subreports(and subdatasets) with your main report,
(simple right click on dataset and option to connect to main dataset) and make sure to configure your jasper server of .jrxml so that it includes all the necessary resources
The studio "knows" where it can find all the required files, but the "knowledge" ends there.

Related

Crystal Reports: export datasource with report definition

I am stepping into a new reporting environment and I don't have a lot of background info yet. But my company utilizes a series of crystal reports.
I want to compare two reports that are identical except that they connect to different data sources. I can click on both reports in the Crystal Reports viewer, go to Database > Set Database Location and I am able to see the data source. If I do this for both reports in question, I can see that they both connect to different data sources, as expected.
However, when I export the two Crystal Reports as text files and then compare them using Notepad++, I don't see the datasource / connection string in the report files, so when I do a compare, they are exactly the same.
If the exported text files are exactly the same, how does Crystal Reports Viewer know to point one report towards a prod data source and another report towards the dev data source? It does not appear to be embedded in the exported metadata / report definition file.
Thank you!!
The connection info is simply not part of the exported report definition text.
But, obviously, it is part of the report definition.
If you need to export more detailed report definition information, including connection properties, consider getting a documentation utility. Ken Hamady maintains a list of those here.

Order of execution of sub reports(linked and non linked) and main report in Crystal

I am new to crystal and want to understand the basics of subreports.Is it that main report is always executed before subreport?What if the subreport is placed in report/group header?If there are multiple subreports which are either linked or not linked to main report, what would be the order of execution in that case?Does it depend on positioning of report?
I have read many articles and got mixed responses. Please help me in understanding these concepts
Subreports are last to get processed in each section.
The key implication is that if you intend to pass a value from a subreport to the main report via a shared variable, you can't expect a formula in the same section to obtain that value. You must pass the value to a formula in a section below.

How do I create a loop for subreports?

Adding a subreport into a report with Java and Jasper Reports was easy enough, but I am having trouble making that subreport into something loopable.
The code in Java was simple enough: create report and loop through the parameters to generate subreports. The report generated at the end is a XLS file.
The hassle starts with Jasper Reports since the second iteration complains about the subreport datasource ID already being in use, but then if I generate dynamically the names in the Java code, the Jasper Report won't compile since the subreport's database name is fixed in the XML.
I could, in theory, just create several of the reports with a single subreport and then attach all of them together, but that doesn't feel optimal. How can I create the looped reports then? Is it some sort of parameter to be given in the XML from Jasper Reports or is it impossible to be done and I must use the multiple reports strategy instead?

How to show main report with empty linked subreports in Crystal Reports?

I have a Crystal Reports report which contains a main report and three subreports. The data tables used in subreports are linked with main report's data table. In subreports also I've given linking.
Now when I have data in subreports, all comes out fine. But if there is no data in subreports, the main report is also shown as blank.
How to make the main report show results despite (some) sub reports being empty?
Subreports only run after the main report has retrieved it's data. So unless you have set up some fairly complex suppression conditions using shared variables, there is no way that a linked subreport can 'blank' the main report. You can confirm this by running the same report criteria with all of the subreports deleted. You will likely still have the same blank main report. The cause is more likely to be an inner join in the main report.
And there is one final possibility that I hope no one finds insulting. Depending on how the subreports are arranged, it could be possible that adding the subreports causes the first page to be blank while the report starts on the second page. This is caused by the 'keep together' properties of sections and groups. I have had clients call me to troubleshoot blank reports when the data was on page 2.

How to pass a Connection as a parameter to subreport when previewing in iReport

I have a report with several sub-reports. The sub-reports use different java.sql.Connection's. I have set parameters for the different connections in the master report and use the "connectionExpression" element for each sub-report to define the appropriate connection parameter to use. Is there a way when previewing the master report in iReport to specify the connection to use? I can't seem to find any way to do this and the sub-reports always come back blank.