Jump to content
We've recently updated our Privacy Statement, available here ×

Getting sub-report to print in columns


jd6strings

Recommended Posts

Hello all:

I'm migrating a report from Crystal to Jasper and I've created a sub-report that works fine but I'm having a hard time getting the data to display in column format.  The below screenshot is from the Crystal Report and notice how the data is displayed in column format and screenshot below that is the Jasper version and the data is displayed in row format.  How do I get the Jasper sub-report to display the records in columns?

Crystal:

http://206.123.217.126/ss_report.png

Jasper:

http://206.123.217.126/ss_report2.jpg

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

OK...in iReport I created a Group to group on a parameter to which I know would be unique.  I then set the 'Start on New Colum' value to true in the Group Header.  Now the subreport spreads each record to a new page and not to a new column.  I do not have the 'Start on new page' option ticked???

Link to comment
Share on other sites

Here's the query used for the subreport datasource.  Parameters are passed from the Main report to the subreport:

 SELECT
 MASTER1."Idx", MASTER1."OpCode", MASTER1."WellCode", MASTER1."CCode1",
MASTER1."CCode2", MASTER1."AnalNr", MASTER1."FromDate", MASTER1."ToDate",
MASTER1."SmplDate", MASTER1."Tech", MASTER1."FlowPress", MASTER1."Temperature",
MASTER1."H2S", MASTER1."N2", MASTER1."CO2", MASTER1."C1", MASTER1."C2", MASTER1."C3",
MASTER1."IC4", MASTER1."NC4", MASTER1."IC5", MASTER1."NC5", MASTER1."C6P", MASTER1."SPG",
MASTER1."BTU", MASTER1."GPM", MASTER1."ZFactor", MASTER1."SmpSource", MASTER1."PBase",
MASTER1."CylPSIG", MASTER1."CylNr", MASTER1."Remark", MASTER1."Foreman",
MASTER1."Flowing", MASTER1."LabTech", MASTER1."Gauge_Atmos",
MTRDATA."Cust_Code1", MTRDATA."Cust_Code2", MTRDATA."Cust_Code3",
MTRDATA."Cust_Code4", MTRDATA."Well_Name", MTRDATA."County", MTRDATA."State", MTRDATA."Field", MTRDATA."Location", MTRDATA."Formation",
OPFILE."OpName"
FROM { oj ("MASTER1" MASTER1 INNER JOIN "MTRDATA" MTRDATA ON MASTER1."OpCode" = MTRDATA."Op_Code" AND  MASTER1."WellCode" = MTRDATA."Well_Code")  INNER JOIN
"OPFILE" OPFILE ON MASTER1."OpCode" = OPFILE."OpCode"} where MASTER1."OpCode" = $P{opcode} and Master1."WellCode" = $P{wellcode}

The query returns the correct results I just can't get the records to display within report properly.

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

HELP....I was able to get this data to print successfully in colums per my previous post.  However I'm having an issue getting the ALL the records to show up in the report.  For instance for a particular customer I know for a fact that the query will retreive 21 records but due to the way the report is displaying the records and the first column has the row description, the report only correctly diplays 18 of the 21 records in column format and the additional records are overflowing off of the page.  Please see the attached test.pdf and you'll notice the records running off of teh side  I've also attached the jrxml file for the report.

My question is how can I get the data to overflow into the next column instead of overflowing off of the document?

 

Thanks!

Link to comment
Share on other sites

I was able to get all of my records to show up in the columns bu using this post as an example (http://community.jaspersoft.com/questions/542411/column-layout-label-left).

In my case I'm using a sub-report within a sub-report.  The problem I'm having now is I can not get the label to show up in the first column of every row.  I suspect it's because the first sub-report dataset ONLY produces a single record from the query.  Attached are my reports and an example.  How can I get the lables to display with every new row?  I've tried print expressions to no avail...

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...