We are using Telerik Reporting tool to print an invoice.
We succeeded make and display the report but we have a problem while print it to an invoice page:
We don't know how can we print it to one continous page. We don't know what will be the length of the invoice because it's length is dynamic. sometimes the invoice is short and sometimes is long.
So, we cannot define in design time the height of the report in page settings.
Is there anyway to define auto height so that the whole report will be print in one continuous page?
Thanks,
Yocheved
14 Answers, 1 is accepted
Telerik Reporting prints in a page oriented format and it is not possible to make any adjustment for variable page height.
Knowing the report's layout, the used sizes in it and the amount of data, on a trial error basis you can set the report's PageSettings (PaperSize, Landscape, Margins and etc.) prior to processing the report.
Regards,
Stef
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
By calculating the page height based on the amount of records.
And set it at run-time.
Something like this:
{
InitializeComponent ();
this.PageSettings.PaperSize.Height.Add (number of rows * height of each line);
}
Can do this?
How can I get the report data-source at run-time?(to get length count)
thank you very much!
It is urgent to me..
I'd love to get an answer as soon as possible.
chani
You can use a report parameter in a binding to the report's PageSettings.PaperSize property.
At run-time in the start application you can retrieve the data and analyze it - amount of records, what page size will be needed to gather the whole rendered data into one page. Then assign the data to the report. Finally, pass the controlling report parameter's value through the report source object that wraps the report instance, and process the report.
Regards,
Stef
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
I'm quite new with this, Is it possible to get a small demo, Showing it working?!
Thanks so much!
Please check the attached demo project, which illustrates the suggested approach. The report has an integer report parameter which is used in a binding to the report's PageSettings.PaperSize via user function.
We check the amount of data at run-time and based on the report layout and number of records determine what should be the physical size of a page to gather the whole report.
I hope this helps you.
Regards,
Stef
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Hi,
We have a big problem with this solution,
when we print the invoice it prints it on 2 pages instead of 1,
this means that the solution you offered dont working in PRINT_PREVIEW mode​.
I spent a lot of hours to find a new solution to this big problem-
I concluded that only when the PageSetting.Height is same or grater than the actual height (include header)
it does not print 2 pages.
we work with kendo ui on MVC + durandal (SPA) Project.
Do you have any solution for this?
Thanks
Yehudit
Telerik Reporting does not support printing from thermal printers. The report document is a paged without option to specify endless dimensions. There is already such feature request approved by our product managers and considered for implementation.
Until the feature is available, please test using custom PaperKind and proper PaperSize as report's PageSettings which allow you to gather the whole report's content on a single physical page.
Regards,
Stef
Telerik
Hi,
Thank you.
but :
1. Is there a forecast when the feature will be released.
2.Is it possible to get an extensive explanation of exactly how I can solve it for now?
Because it's really not clear what the proposal for now.
It is realy urgent to me..
Thank you very much!
Yehudit
Hello,
I created a project to reproduce the problem..
(I could not attach the file-how could I pass it to you?)
Could you check it and explain me how can solve it?
You can see that in interactive mode the report contains single page but in print
preview mode it is splitted to three or two pages.
Thanks,
Yehudit
The idea is to check the sizes of the rendered documment and adjust on a trial-error basis the report's PageSettings in such manner that the content fits into a single physical page (the report's print preview).
About attachments, in forums you can upload only images, and in support tickets you can attached ZIP files.
Regards,
Stef
Telerik
Hello Stef,
thank you for the clear answer.
if i use main report with several internal reports
for example:
in main report will be the store name and products list.
and in the first sub report will be the credit details
and in the second sub report will be checks detail etc.
Is the main report in this situation is not split into several reports on print-preview mode?
Thanks
Yehudit
Please check my post in the Single continuous page receipt forum thread.
Regards,
Stef
Telerik
As of Telerik Reporting R3 2016 printing on continuous paper is supported. There is a PageSettings.ContinousPaper property allowing you to print without paging the document.
For more details, please check PageSettings Properties.
Regards,
Stef
Telerik by Progress