I am a very new user to crystal and have taken over a project that someone else has done and left.
Here is my current issue. I have a Main report that has a ton of sub reports on it. There is one sub-report that is suppressed that is causing a parameter prompt on the main report. I have looked through documentation about the links from main to sub but there is no link between these sub-report parameters and the main report. Also the sub report uses these parameters in the report itself. IE start date - end date are the parameters and are used on the sub report so I can't just remove them. How can I stop the prompt for these two parameters from the sub-report in the main report?
Thanks a Ton.
In the end I created a new report and just did not include the sub report mentioned. Thanks.
Related
I have a problem with jaspersoft studio, the problem is that I want to put the Subreport on the very last page in the document. So my idea was to put it in the summary, but then I got something strange...At the end of the PDF generation the subreport is on the last page, BUT the sub report is not complete there is stuff missing :/ It is just printing out the last values
Consider the following example:
I have 3 Parts, Part-1, Part-2, Part-3
After finishing the part-3 the subreport should be visualize with some of the information of part 1-3, but the subreport in the summary just contains information from the part 3
I use a XML Datasource
Can anyone help me, please?
You have to think of the context of the summary band and the sub report.
Is a variable from part 1 and part 2 being passed to the sub report? Is the same variable being passed from part 3? If so then it is being overwritten.
It really depends on the source of the information for the sub report, but the timing and context are likely the culprits here. You may need to create three sets of variables to contain what you want or just pass something into the sub report and let it gather the information for the three parts on its own.
I have a subreport with several parameters.
The main report also has some parameters.
The subreport parameters are prompting when you run the main report...
All the parameters for both sub and main prompt at the same time.
Is there a way to get the subreport params to just prompt once you get to the subreport?
I have tried linking the subreport...
The problem is there are no fields to link to in the subreport.
The params for the subreport just point to start and end date formulas.
Any ideas?
Link the parameters of the sub report with parameters or fields of the main report... Coming to prompting the parameters when sub report is opened to the extent I know that is not possible but I would suggest you to try Ondemand subreport once.
Anyone know if we can set a global variables in a main report and have the sub-reports use those variables ?
In my case i have a very complicated report (Main report and then few sub-reports then in those sub-reports...other sub-sub-reports (3-5 levels like that).
Now it came to my attention that i need to pass a new variable from user input and this variable need to be used by multiple sub reports .
I know i can pass variables from Main to sub to other subs but this is a long process which i'm trying to avoid .
Any ideas ?
Thanks for the help!
In your main report create a paramter; lets say it's $P{main_parameter}
In a subreport create another paramter to handle $P{main_parameter}'s value; let it be $P{subreport_parameter}
now in mainreport you have $P{main_parameter}
and in subreport you have $P{subreport_parameter}
finaly; in your mainreport right click on the subreport ->paramters -> add. That's it. Now you can pass parameter from main report to subreport.
Not: be careful both paramters' type should be same otherwise you will get error
i'm trying to add subreport to report.
I have setted connection type to "use a connection expression" and the expression is $P{REPORT_CONNECTION}.
My subreport contains a simple query and some static text, when i test it all works good, but when i test mainreport the subreport does not appear.
I have some static text in subreport, this one should be display always, isn't true? But i can't see it...
During compilation i have no errors, and subreport path seems correct becouse a message say "subreport.jrxml already compiled.".
What can i do?
Thanks.
The solution is pass HIBERNATE_SESSION as parameter from master report to subreport.
Please Right clik on sub report and clik on open sub report if your sub report gets open then your reporyt is connect with your sub report. if subreport is not open do the right connection for that.
if your subreport is work for the parameter value with seperatly and displyes the static text and detail band values it is sure that the report will come ffrom main report.
but the report displays only static text and the text is in title or page heder, then you have to go to the report property and set the output when no data then choose diplay all section data from combo. your static text will apper from main report.
When you add a sub-report in your main report, the sub report expression will refer your locally saved sub-report path. Ex: "C:\abc\xyz.jrxml".
Now you can preview your main report containing sub-report in your ireport.
Once you publish the main report in Jasper server, the Sub report gets loaded into jasper repository and its expression becomes "repo:Repositorypath.jrxml".
Once sub-report contained report is published into Jasper repository, its path will always refers to Jasper repository path and because of this reason, you will not be able to Preview the main report in Ireport.
So, execute the report in jasper server directly once you publish the main report instead of previewing or opening the subreport in Ireport.
Thanks,
Srikanth Kattam
How can I disable Parameter Prompt in sub report at run time in Crystal Report XI? I used Ms VS 2005 and report also included. Other report features is the same Crystal Report features. Other report not show prompt at run time which are not included Sub report. Prompt appeared one is included sub report. so you may hv any suggestion. let me know pls. thanks.
I solved it from this web site: http://www.it-sideways.com/2011/10/how-to-disable-parameter-prompt-for.html
Take a look at this link.
Pass parameters to a stored procedure in a Crystal Report sub report?
Here are two other links that could prove helpful as well.
passing parameters in crystal report
http://www.tek-tips.com/faqs.cfm?fid=1329
We had the same issue and resolved this by modifying our code that prints the report.
Instead of setting the ReportSource of the CrystalReportViewer before setting the report parameters, set it after you have added all the report and subreport parameters.
I just solved it with something very simple, I don`t know if it works in every case but in my case it did.
Solution:
Go to Properties of your CrystalReportViewer and set ReportSource=None
Use following steps
Don't use CrystalReportViewer1.RefreshReport or CrystalReportViewer1.Refresh
Set Report source from properties to none
Report source must be assigned Dynamically
in your code have this sequence
REPORT1.Refresh()
REPORT1.SetParameterValue(0, "some default value") 'assign some default value
CrystalReportViewer1.ReportSource = REPORT1 'dynamically assigned report source