TheLostDreamer Posted August 8, 2013 Share Posted August 8, 2013 Hello everybody,As in the title i have a main report with several columns. The column titles are in the mainreport, some of the fields in details are there too and some are subreports.So one of this columns has in the details a subreport which is horizontal and may have 4 columns. Important is that in this subreport there is only the details band filled.Now the data source expression (mongo db) looks kind like this:{runCommand: { aggregate : 'person', pipeline : [ {$match:{'_id':'{person_id}'}}, {$unwind:'$aCollection'}, {$project:{'_id':1, 'subreportValue':'$aCollection.thevalue' }} ] }}And now to the problem:If the value "aCollection" exists, everything works fine. There are 1 up to 4 columns filled as they should in the mainreportBUT ;)If "aCollection" does not exist the row with the possible 4 subcolumns is merged (in Excel). So there are rows where the colum exists of 4 rows and some in which they are merged. Unfortunatly Excel cannot sort a table with merged fields.Now i need to know how to create 4 empty fields in the detail band in the subreport anyways also if no data source is existing. I know the options "all sections, no detail" (which does not work because my data is in the detail)Hope someone has a clue... been working on this bug the whole dayThanks in RegardPeter Link to comment Share on other sites More sharing options...
Solution TheLostDreamer Posted August 9, 2013 Author Solution Share Posted August 9, 2013 Found myself the solution:-set the no data source options to "all selections, no detail"-Create a column header band with a new field " " (meaning an empty field)-Set the header band "print when expression" to "$F{subreportValue} == nullSo if there are values, the column headers are not printed and only the values are shownIf there are no values the column header band with 4 empty cells is shown in the mainreport, therefore the cells aren't merged Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now