Disabling Crostab page break - jasper-reports

Background:
I have a report with a large dataset on a crosstab element. The report will only cater to spreadsheet format so the width of the report will not matter.
I have tried setting the Ignore Pagination property to true. Split Type to prevent but some of the data still breaks and moves on the bottom of the sheet.
Any help would be greatly appreciated.

I found the solution to my problem. I was using iReport 3.7.4 and there was a bug in the UI. Apparently the crostabs property ignoreWidth="true" was showing as ticked in the UI but it was actually missing from the xml. You can locate this property in the crosstab tag as shown below:
<crosstab ignoreWidth="true">
...
</crosstab>

Related

RDLC Crystal Report Set Column Group Result Vertical

I can't find any help online with my problem maybe due to that I don't know the exact keywords to use but hear me out.
Here is the screen shot of my report format...
The actual report result appears like this...
The next item appears beside (right side) the first result. I want it to appear below instead like this...
How do I achieve this? Just comment any additional information that is needed.
BTW, I am using visual studio 2013 (Seems like it matters).
UPDATE:
This is the report format that I want to copy. The headers are not important just the body of the report. Thanks!
Try to use grouping go to this link hope this gives you a clue thanks
Finally found out what's wrong. I removed the column groupings and added only a parent row group. Then I added all needed rows and columns inside the group. It was fairly easy once I found out the problem.
Here's the output of my report.
Thanks guys!

How to rearrange report section at print time in ActiveReports?

I need to print the report footer before the group header/footer in ActiveReports 6. My code in report footer requires calculation from the group header/footer, so instead of moving all the controls to report header and do massive changes to code, I wonder if there's a quick way to just rearrange the page at print time.
I currently have:
rhMain (reportheader) for report cover page
gfVehicle (groupfooter) for detail on each vehicle, summary data is also calculated and stored here for each vehicle to be used in report summary
rfMain (reportfooter) for report summary
What I need to be arranged:
rhMain cover page
rfMain summary page
gfVehicle detail on each vehicle
What I have tried is move all the summary stuff to rhMain and during rfMain_format, I change the value of the controls in rhMain. This failed probably because rhMain is already rendered at this point.
Any other ideas?
There is no way to rearrange the sections during printing. The sections are designed to be rendered in a specific order and it cannot be changed. If you can provide some detailed information about your use case we may try suggesting some workaround. You can post your questions to ActiveReports support forums.
Can you please explain your scenario so we can try to help based on it. In general a report footer is nothing but a "group-footer" for the whole report (that is not bound, so would it help to replace the report-header/footer with an outside group header/footer.
Please include an image of what you're trying to do so we help further.
Issam Elbaytam
Grapecity.

Display centered page header in a sub report which is placed in a multi column formatted section

More than a full day gone and i still can't find a solution...
I am creating a report which will be used to print out an exam paper(Crystal Reports with VS 2010). All exams have more than one related unit and all units have their own questions.
So i have created a sub report with the units and questions and added to the main reports' Details section which formatted as multicolumn. I have generated the report which seems like below.
http://www.avekon.com/tmp/examprintscreen0.png
Everything is fine until now. But when i want to add the unit titles (which are in the subreport),they are displayed as headers of each column. I want to display the unit title as centered on the top of each page, like below.
http://www.avekon.com/tmp/examprintscreen.png
Tried to add a header to main report and update it from subreport. NOT WORKED! Because the variables are not while the subreport is looping.
Tried to format other sections as multi column. NOT POSSIBLE as i see.
Tried to insert sub report into sub report. NOT POSSIBLE again.
and i have tried a lot of other logical and illogical ways but no success at the end. It should be easy but i can not find the right way. Please help, really important!
Remove the multi-column formatting from the main report and instead, format the sub-report as multi-column.
This should do the trick.

Error filling print... Infinite loop creating new page

I get this error when trying to preview the report.
Error filling print... Infinite loop creating new page.
net.sf.jasperreports.engine.JRException: Infinite loop creating new page. 
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageBreak(JRVerticalFiller.java:1903) 
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBreak(JRVerticalFiller.java:1961) 
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupHeaderReprint(JRVerticalFiller.java:704) 
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupHeadersReprint(JRVerticalFiller.java:672)      
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageBreak(JRVerticalFiller.java:1944)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBreak(JRVerticalFiller.java:1961)  
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:747) 
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:281)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:144) 
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:909) 
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:822)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:61) 
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:446)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:276) 
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:745)
at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:891) 
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) 
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Print not filled. Try to use an EmptyDataSource...
Is there an option I have to check or something to make this work?
In my case, I solved the problem by eliminating a subreport with the help of adding a detail band. The subreport was in a group header, not in the page header, however. For other people with a similar problem I would suggest a similar approach.
i had the same problem, I increase the vertical size of the report.now the issue is fixed.
Just you need to write groovy on Print When Expression that $V{PAGE_NUMBER}.equals(1) on column header property.
This happened when you drop sub report in detail section so the column header in jasper repeat twice.
So you have to tell column header to not repeat again with sub report.

"Document has no pages" on iReport and nothing on OpenReports

I am having an issue with JasperReports I can not solve. I am using Eclipse, OpenReports 3.2 and IReport 3.7
The issue I am having is that the report does nothing. When I preview the report in IReport I can at least get a "Document has no pages" message but when I try to open it using OpenReports it doesn't do anything. I get the open reports header and the copyright message but nothing between them.
I was able to track it down to line 150 in ReportRunAction.java in OpenReports. That line is:
jasperPrint = jasperEngine.fillReport(reportInput);
At least that is the line the page dies on. It trips the catch block that the line is inside of but the error is empty. When I try to print the description it is null. I can't swear that the issue isn't that parameter. Through looking around all I have been able to find is something about how the report needs to be compiled with the same version of the jasperreports.jar that OpenReports uses. I have no idea how to tell if/what version of jasper reports is being bundled into the .jasper file though.
Is that my problem? If so how do I tell/set the version of the jar that gets bundled? If not; help!
The no pages messages comes out when the report has not records or you discarded all of them with a wrong filter expression.
There are a couple of things you can try:
set the filter expression to:
new Boolean (true)
This will in some way reset your filter expression.
Right click your jasper report
properties
find more...
and Set the report property "When no data" to "All sections no details" so you can see at least the rest of the report.
Thanks.
If you are using the Detail Bandeport, then you will need a Data Query for the report. Since it's returning "No Pages" in iReport, then you either don't have a query. Or simply your query is not returning any rows.
In old iReport, from Data menu, choose Report Query and write your query here. If you want only one record (i.e. Detail band only one time) you can use a dummy table. Like:
SELECT 'a' FROM DUMMY
Otherwise, if you don't want to use the Detail Band, you have the option to view the other bands without using a query. From Edit menu, choose Report Properties, under More... tab, set the flag When no data to All Sections, no detail
Your problem is not exceptions or errors, it's just no data to show.
Any Empty Datasource will do the trick too.
I ran into the same error when using IReports when I had a subreport that only contained other subreports and no actual query. Adding a dummy query as medopal suggests fixes the no pages error and allows things to run correctly.
See also: http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=49315
I've been facing this error for a while. In my case, this error occurred because of an image. If you have images in your report file, you will be forced to fill image with valid data when you wanna use report. If you don't, you will see this error "Document has no page". To address this problem just set "on error type" field in properties window (just click on image you'll see the property window) to "blank".
Strong wish.
I had same problem and got after searching problem, that I did not provide password to connection.
so I add these lines to my java code.
Class.forName("com.mysql.jdbc.Driver");
con =DriverManager.getConnection("jdbc:mysql://localhost:3306/stock_mngt","root","your password");
now my code works.