Pentaho report design.Adding two columns from different sub reports - pentaho

I have a main report and few subreports.
In the main report I have a total(sum) for one of the columns as 'Total A'
And in one of the sub reports I have a total for another column as 'Total B'
Now i want a grandtotal for those two columns
i.e ([Total A]+[Total B])in one feild.

You would have to use the Open Formula with ([Total A]+[Total B]) as the expression.

The problem is that the functions of the subreports cannot be exported. So [Total A] and [Total B] from each subreport are not available in the main report, even if set properly in the "Export Parameters" section of the subreport.
¿Anyone else experiencing this problem?

Related

Pass result of the report to the another report?

I have a Crystal Reports rpt-file, that contains 2 queries. (One for the main report, and the other for the subreport.)
The user gives a parameter ("DocNum") for the main report, that connected with a key field ("DocEntry") to the subreport.
The problem is, that in this case it takes too long time to generate the report, because the Crystal Reports reads the all records to the memory, and just than creates the rpt-file.
Query of the main report:
SELECT DocNum, DocEntry, CardCode FROM OINV WHERE DocNum = {?DocNum}
Query of the subreport:
SELECT ItemCode, Dscription FROM INV1
Is there any solution, that passing the key fields value ("DocEntry") to the subreports query as a "where condition"?
Something like this:
SELECT ItemCode, Dscription FROM INV1 WHERE DocEntry = {...}
Yes, this is known as Linked subreport.
Right-click the subreport and select 'Change Subreport Links...'

Pentaho report designer 8.3: crosstab report in Report header

I'm add a test query in dataset
select title as attr_value,
to_char(s,'YYYY') AS dt_year,
to_char(s,'mm') as dt_month,
1 as data
from my_test_table, GENERATE_SERIES('2018-01-01T00:00:00'::timestamp, '2018-05-01T00:00:00', '1 month' ) AS s
order by attr_value, dt_year, dt_month;
Add crosstab report element to Report Header section as inline
Add att_value to Row axis, dt_year and dt_month to Column Axis, data to Data Cell in Edit Crosstab window.
When i run a report, i get error
org.pentaho.reporting.engine.classic.core.ReportProcessingException: Failed to process the report
at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processReport(AbstractReportProcessor.java:1479)
at org.pentaho.reporting.designer.core.actions.report.preview.PreviewExcelAction$ExportTask.run(PreviewExcelAction.java:116)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException
at org.pentaho.reporting.engine.classic.core.states.datarow.PaddingController.activate(PaddingController.java:159)
at org.pentaho.reporting.engine.classic.core.states.datarow.DataProcessor.advance(DataProcessor.java:207)
at org.pentaho.reporting.engine.classic.core.states.datarow.GlobalMasterRow.advanceRecursively(GlobalMasterRow.java:302)
at org.pentaho.reporting.engine.classic.core.states.datarow.GlobalMasterRow.advance(GlobalMasterRow.java:265)
at org.pentaho.reporting.engine.classic.core.states.datarow.DefaultFlowController.performCommit(DefaultFlowController.java:142)
at org.pentaho.reporting.engine.classic.core.states.process.JoinCrosstabFactHandler.commit(JoinCrosstabFactHandler.java:38)
at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.commit(ProcessState.java:952)
at org.pentaho.reporting.engine.classic.core.states.process.ProcessCrosstabFactHandler.commit(ProcessCrosstabFactHandler.java:37)
at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.commit(ProcessState.java:952)
at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processPrepareLevels(AbstractReportProcessor.java:407)
at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:505)
at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processReport(AbstractReportProcessor.java:1433)
... 2 more
When i add crosstab over "Master report" -> "Add crosstab", the report successfully build.
Why i cant build crosstab report added to the Report header? Eventually, i want to add 2 different crosstab tables in 2 excel sheets. One table on the first sheet, second table on the second sheet.

SAP Web Intelligence Sum Product

I'm new here. I have a problem generating a forecast. I have different projects with different planned and actual data.
In one report I want to show the projects in each line and in another report I want to show the aggregated overall result of all projects.
I tryed:
=sum([FORECAST COST]) in ([Project])
=sum([FORECAST COST]] foreach ([Project])
=runningsum([FORECAST COST)] foreach ([Project])
any idea?
Try this formula in Forecast cost column:
=If [FORECAST COST] InList ("project a";"project b";"project c";"project d";"project e") Then "Sum" Else [FORECAST COST]
This applies to BO4.0. If you have 4.1 and higher, you can use grouping.

How to aggregate details in Pentaho Report Designer (PRD) 3.9?

Very new to Pentaho Reporting,
I have a query grabbing columns categories, quantity, and gross. It returns about 200 rows.
Without changing the query, is there a way for the report to display the aggregates for each category (I have category as a group)? For example, All you can eat should only display a sum of the Amount and GrossValue columns.
Same for dessert (notice there are two group headers - why?)
You just need to get used to with pentaho report designer.
Refer information given at the end of this page simple report.
You can add one parameter in group footer and set its properties.
They provides properties like aggregation-type, which can be set as Sum or count and then it will show at the end of each group with sum or count of the rows as per the type you specified.

Pass data from ssrs subreport to parent

1 Is it possible to pass data from ssrs 2005 subreport to its parent report?
2 If yes, how?
Thanks so much
Philip
Create two datasets - one for the main report one that is the same used in the sub report.
Add your sub report but grab the total from the second dataset on the main report.
I'm not actually taking the info from the sub report. I'm only using the sub report to display the information correctly. I'm using the second dataset just to total what's in the sub report.
=Sum(Fields!Total.Value, "DataSource1") + Sum(Fields!ThinkTotal.Value, "ThinkCharge")
You might be able to add a subquery to the query in the main report to get totals:
SELECT
t1.ClientID,
t1.Address,
-- Subquery to get invoice totals:
(SELECT SUM(InvoiceTotal)
FROM Invoices
WHERE Invoices.ClientID = t1.ClientID)
AS InvoiceTotal,
t1.CompanyName
FROM Clients t1;
Its has been posted on another forum that this cannot be done :(