Controlling page breaks when printing to duplex printer - activereports

I'm using the new fixed page layout report in active reports 7, with a fixed cover page and a variable number of overflow pages. When it's printed the user can select a number of these reports to print at once, and the data for the report is adjusted accordingly. The report has grouping defined to start a new cover page for each group. How can I ensure that when printing to a double sided printer that each cover page is printed to a new sheet of paper? For example, consider the simple case where there is only a cover sheet and no overflow. If the dataset contains data for three such pages, how can I ensure that a new sheet is printed for each one, rather than the second being printed on the back of the first?
An alternative solution would be to split the data before it gets to the report, then repeatedly create and print the report for each group. To do this I would need to ask the user to select a printer for the first copy, but then use the same printer for subsequent invocations. How can I determine which printer the user selected, then pass that printer to the second, third, etc invocations? I could create my own printer selection dialog, I guess, but it would be useful to know if I can retrieve the information from the built in one

I don't think there is any way to do this with AR currently. It's a great idea though and I'll make sure the ActiveReports team considers this in the future. I'll also ask around and see if anyone else has ideas within GrapeCity/ComponentOne.

Related

{EpicorERP} Running a Report to see what users are doing/printing

I was wondering if anyone had a method of running a report to see what a user is doing in Epicor or what they are printing. We are having users report that in the middle of the night, when no one is here at the plant, there are 500 page reports being printed. We are able to see in the print queue who printed what, but the report doesn't match up with anything in our system. We would have for example a report called DailySales.rpt, but in the printer queue it would be something like hb986a87dthr.rpt. Just wondering if anyone else has seen this, or would have a solution that would let me see what a user is printing.
It is not possible to link the print job directly to the SysTask record because neither the print job number, the temp file, nor mac addresses are saved in Epicor for cross referencing. It can be approximated by looking at runtimes and the SysTask record.
You can create a BAQ and BAQ report to display Active and recently completed SysTask information by user. This will give you the report run, start/end times, user, and current status. If you need more detailed information such as the criteria used in the report, you can also join to the SysTaskParam table. Keep in mind that the SysTaskParam table is fully normalized by field name, so you may want to join multiple copies of the table with specific criteria if you need a lot of information. Unfortunately, for "print all pages" jobs, Epicor doesn't know how many pages the report will be until after the data is instantiated and then it is rendered in the reporting software, so you won't be able to get any estimate of number of pages or size.
There are many strategies for mitigating the issue you described. Here are a couple:
You can use criteria within the BAQ to limit the number of records returned for a specific query
You can create a subquery criteria from BAQ parameters to return no data when abnormally open parameters are used for the report (e.g. > 30 days range). You could also use this method with time gates based on the current system time.
Retrain users

Collect all data from Crystal Report

I have a crystal report containing multiple subreports. I need to find the way to 'collect' all the data printed on the report/subreports in the following (or similar)
format:
Page1:FieldName1=Value1|FieldName2=Value2|...|Page2:FieldName1=Value1.1|FieldName2=Value2.1|.....
So, the important note is that there is a possibility to figure out on which page (in the PDF generated from report) the particular field value occured.
I tried to do some complex formulas which would 'remember' all the data in a cumulative string within formula(s) (WhilePrintingRecords) but the part I can't achieve is to associate each value to correct Page number of the main, top level, report (the page numbers are of crucial importance in this purpose).
The problem is even more complex because of the groupings and linking applied in main report and subreports, so the Page numbers is at the end of the printing kinda changed comparing to design time order.
Can anyone come up with any idea please?
Thank you Siva, your reply led me to another thing to investigate (I'm new to Crystal Reports) - the issue was actually not related to incorrect execution of the formula keeping the page counter, but rather the one more formula I thought was not executing, since I didn't know that if formula is in the section which is suppressed (and hidden) IS STILL EXECUTING. The counter always counted one more page which was sufficient. When I removed that formula that I didn't need - it worked just fine. So, it was my fault :(

Unwanted page break in SSRS report

I have an RDL report built in Business Intelligence Studio 2008 and I am having an issue with an unwanted page break.
I have a single dataset with a singletable with some summed data. I have added in a List and added two groups.
I have even checked the page break properties of each one.
The report works fine, but my top most group seems to page breaking, leaving extra pages in the beginning.
What I would like to happen is to have the top most group be a page header, and the second group to be a group header for the detail. Am I going about this the wrong way?
Some things you can look at...
Check your report Properties - Look at Consume Container WhiteSpace >
Set it to True
It looks like you are checking the Tablix page break. Did you right
click on each of the Row Group > Group Properties > Page Break
Options Between Each Instance of a Group?
Another issue could be the margins (make sure they are set to inches
if that is what you use). Make sure that your Margins + Report body
is less than the printing area you are attempting to print on
(screen/pdf/paper/etc).
Using '&' for string concatenation instead of '+' (don't know why but
this sometimes causes page issues).
Check can grow settings on your cells
Print destinations settings > properties > check "Override Default settings"
Check the white space around your report body (attempt to minimize any if you can)
Here is some other useful info about Pagination from MS SQL Server
I had a tablix with "Keep Together" marked. The tablix also showed a subreport for each row. It turned out that the first record had a very long subreport so it could not fit on the page w/ the top of page elements I had (report title).
this took me the better part of an afternoon before I realized what was happening.
ultimately i lived with it. I wanted the keep together feature. Next week, a shorter record will be the first one and it wont be an issue.

SSRS - Have report execute sub-queries?

I've looked all over and cannot find an answer to my question; I can't even determine whether it is possible.
Referring to the attached image, you will notice that this is a statement report with data grouping activated.
1) The report shows all the services invoiced to an account by date.
You can expand the group to see all the transactions that formed part of that service for that day. (You can for instance make use of the same service multiple times per day)
2) This is the detailed layout of the service invoiced. This list is different for each service, but mainly it will show you a summarized transaction list (PK BatchId), which has the "+" symbol next to it to enable drilldown to a detailed report of the batch.
My problem:
When loading the statement report, we are now hitting multiple tables, multiple times to produce the data to be grouped and displayed in #2 (refer to image).
We are trying to avoid this like the plague.
My Question
Is there a way to populate #2 when and only when the user clicks a "+" symbol or an "expand" image where the "+" is currently located in #1.
In other words. We dispose of the group function and populate the statement without detailed information. When the user clicks on #1, we load a sproc, populate a dataset and display the data in #2.
Any thoughts on this?
Drillthrough Reports look like a good solution here. See the link for more information on how these work. So basically you have the report without the detailed information, but when somebody clicks on 1 it opens up a new report with the details behind it.
After testing, I confirmed that subreports are executed even if they are hidden within an element that can be toggled.
So subreports won't answer this problem.
[Edited: previously I thought they could be used. JAT points out that this negative answer may have some value, so I'm leaving it.]

How can I build a table of contents in iReport/JasperReports?

We use iReport to enable our customers to generate catalogs for print for their products. This process works GREAT. One of the things we've struggled with is how to create a table of contents for these product catalogs.
I decided to use the Scriptlet functionality to give this a shot. Note that our reports are all master-detail in nature, in that there is a master report and a subreport.
At first, I attached the scriptlet to the master report, and tried to find a way to collect all of the product numbers in the detail report, then pass that value back to the master report. I can't figure out how to get the detail information back to the master report, as it appears that you can only pass default variables from the subreport back to the master (eg PAGE_NUMBER, COLUMN_NUMBER, PAGE_COUNT, COLUMN_COUNT).
So then I tried attaching the Scriptlet to the detail report. Well, the detail report doesn't know what page the master is on, so I started passing the master's page_number into a variable in the detail report. That worked great, except that sometimes the detail can overflow to the point that page numbers from the master are skipped. In other words, if a subreport returns more than two pages worth of data, you are going to miss a page number when the subreport is called the next time.
So how to do this?
I found an approach that worked, similar to one of my ideas above. First of all, I could NOT get a subreport to return a value to the calling report, and then retrieve that value using getVariableValue from inside a scriptlet. I tried forever, and I just could not get that to work.
Instead, I went with the approach where I attached the same scriptlet to both the master and subreports. The scriptlet has a class variable where I can keep a running tally of all the product numbers I encounter in the detail, and this code goes inside the afterDetailEval() method of the scriptlet. Note that I only want this code to run for the subreport, so I do a check to see if a particular detail field, which will never be null, is present. If it's not, I don't run the code. So when that event is called by the master report, the code doesn't run.
Now for the part that I learned from the example. The admirable side-effect programming in the example is that there is a line of dimensions 1x1 that contains a call to a custom scriptlet method in the "Print When Expression" property. That's a great idea! So this custom method returns false no matter what, and the line never prints. I did the same thing in the Page Footer band, and this method collects the values from the class variable, determines the page, and stores the results in a hash. Then it resets the class variable.
In the Report Summary band, I have another line that will never print, that calls another custom method. All I do here is iterate through a map of product numbers and show all the pages each one appears on. Done!
There is an example of tables of contents (with subreport) in project folder jasperreports-x.x.x/demo/samples/tableofcontents.
And see the hyperlink example also.
Hyperlinks, Anchors and Bookmarks
JasperReports allows you to create drill-down reports, which introduce tables of contents
in your documents or redirect viewers to external documents using special report elements called hyperlinks.