Quickreport - pagenumber does not increase when page changed - delphi

I am using the OnNeedData feature with an array feeding a number of qrLabels in a detail band configuration - (Delphi 2010 and QuickRep5) - On a multi-page report, I need to detect every next page (2, 3, 4 etc) and modify the first line in the detail band.
Everything works fine except that the internal page number variable (QuickReport.QRprinter.pagenumber) does not increment before the first line is printed (or shown).
As an exemple, if I print a spam removed of labels with the caption equal to the page number,
the first line of page 2 will show Page 1 and the rest of the lines on that page will show correctly Page 2 same thing happens for all other pages.
Can someone help me to find a way to properly identify the beginning of a new page, I have tried OnEndPage, OnStartPage, BeforePrint, etc. without success - the counter always increment after the first line of the detail band has been printed...
Thank you

Make sure that the Quickrep1 has a PageheaderBand
Then examine the QuickRep1.QRPrinter.PageNumber in the OnBeforePrint event handler of that PageHeaderBand.

Related

How to generate a Report with a SubReport that has more than one page using FastReport and Delphi 7

I have a Report and in my Detail i put a SubReport with the following properties:
When the SubReport has more than one page, the next page gets blank, like in the images following:
It looks like, this next blank page, is related to the SubReport data, but it doesn't show anything, and after this blank space, the report keep normaly showing the rest of the data.
Anyone knows what can i do to show the data of the subReport when he generates more tha one page?
Try to set TfrxSubreport.PrintOnParent to True
You don't use Fast Report's TfrxSubreport on the Properties screenshot. TppSubReport is not FR's class

Page Break Acumatica Report

I am using SubReport in Accumatica after certain records. Is there any ways to let Report move rest of records to Next Page While printing or in PDF Export.
Check out the PageBreak property in the report designer - you can set it on any group or detail section to generate a page break before and/or after the printing of a specific section. It's also possible to have sections that are conditionally visible, so with some imagination you can have very fine control on when a page break is done.

Hiding a span in an accordion

I need help in hiding/unhiding neighboring spans. I'm building a series of FAQs using an accordion structure. I need to have each question truncated by default, but when clicked, the question must then appear in full. Finally, when the open FAQ (or another one) is clicked, the question should return to its truncated form.
My markup is of this form - where I have placed a truncated version of the question in one span and the untruncated version in a neighboring span:
> <div class="accord"><h4><span class="shortver">What steps do I need to
> take to ...</span><span class="longver hide">What steps do I need to
> take to install a constructed wetland?</span></h4><div
> class="faqcontent">Answer goes here</div>...</div>
The following function controls the FAQ:
function fnSetUpPageFAQAccordion(){
$(".accord > div").hide();
$(".accord > h4").click(function(){
$(this).find('span.shortver').addClass("hide").next('span.longver').removeClass('hide');
$(this).toggleClass("close").siblings("h4.close").removeClass("close");
$(this).next("div").slideToggle("1500").siblings("div:visible").slideUp("1000");return;
}); };
This code closes the truncated version of the question and opens the full version when the FAQ is clicked. What I can't figure out is how to reverse that sequence when the FAQ is clicked again (or another FAQ on the page is clicked).
Any suggestions - perhaps there is a better approach altogether?
Thanks/Bruce
Here's a slightly different approach, and a solution.
I think you could simplify this. Instead of having 1 span with the short version and 1 with the long version, put the beginning of the explanation in the first (let's call it class="questionStart")and the rest of it in the second (class="questionEnd"). That way you can leave the beginning always visible and only worry about toggling the class on the second. This is simpler but you'd need to remove the '...' which may not be worth it for the readability loss.
To address your issue of hiding the element when clicking something else, try adding an onClick event that first adds the hide class to all of the "questionEnd" spans, then toggles it on for just the one you've clicked on. I haven't tried it but I think you could make that work pretty easily either with your original approach or with mine.

Devexpress : Express Printing System - Print contents of 2 cxgrid's

Actually, I never tried this but it's supposed to work judging from some comments I've read. I have two grids: One displays Hotel guests and the other one their former stays (Date from- date to, etc..). Now I would like to be able to print both contents as a single report.How do I add the linked contents of the second grid to my dxComponentPrinter1Link1 ??
In the IDE open your form.
Right click and choose ReportLinks on the TdxComponentPrinter
object.
In the links editor window, instead of clicking the Add button, click the dropdown arrow next to the Add button. Choose Add Composition.
This creates a TdxCompositionReportLink object. There is an Items property which will hold all of the report links you want in the composite report. This will print out as a single report. I can't promise both reports will be on the same page though. I've never figured out how to do that.

Grails: load data according to page size

I have a view which displays data ->parsed json which comes after sendig request to back end.
The request parameters contains page ad page size which defualts to page=1 and page size to 20.
Now i require a pagination in view that helps to see the records by allowing users to select 10 records per page,20 records and 100.
The data parsed json is already available in view .
PLz, help me what should i do cause when user for the first time opens the page only 20 record should be displayed and when he select 100 record the page it should show 100 records.
I am thinking that you have an HTML drop down that says 20 results (and 50 and 100 and so on) and then when he changes this, it should show on the page right?
For this you can set an event handler for the dropdown's onChange() event which makes an AJAX call to your server (and passes the number of results required along with the offset if any as parameters) - and returns your results which you can display.
This is how I'd do it.

Resources