Crystal Report - Printing information from sub-report - crystal-reports

I am working on a Crystal Report and if the address which is in a subreport is duplicate I need the information to print on the same page if it’s different I need it to print on a separate page....Please Help!

Like AmmoPT said, we might need more information to help you.
But maybe you you can try this:
Right click on the section where the sub-report is: Section Expert - Paging .
Then on new page before, click the x-2 formula icon and use something like this:
if {your_adress_field}=previous({your_adress_field}) then false else true

Related

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.

Crystal reports no data lable

I have a report containing some sub reports and in my main report i am showing the sub reports based on scan mode and status coming from query.
Now i need to show a message whenever sub reports don't have data.
I tried like this.
checked supress blank sub report and supress blank section for all reports.
1.Kept a text box in report footer of main report.
2.Took a field (Say Barcode) from sub report and passed to main report using shared variable.
3.In section expert of text box wrote like this.
not isnull(Barcode)
But it is not working.
Please suggest.
If I have understood this correctly the code below should work. Tip, avoid using NOT ISNULL. If possible just change the outcome order of your IF statement as below.
To make your formula more robust also, it's a great idea to add in the:
OR = ""
To account for any blank entries.
Final code:
IF Isnull({Barcode}) OR {Barcode} = "" THEN FALSE ELSE TRUE

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.

Remove Field Heading in Crystal Reports

I have a crystal report designer problem:
In my report is a field I want to display. But I don't want the field heading to be displayed. How can I suppress this?
It looks like this:
myFieldHeading
FieldValue1
FieldValue2
FieldValue3
But I want just that:
FieldValue1
FieldValue2
FieldValue3
How can I do that?
bye juergen
Never mind.
I found it. The header was added automatically in an other section. I removed it manually and now everything is fine.
Thanks anyway