Hi,
I have to produce a report with some constraints: the paper already has an header (need to print just below it) and each page must contain a precise number of records.
The report has a blank page header and its height should be modifiable trough my app in order to print the page correctly after the header.
1) can I change the page header's height programmatically?
2) is there a 'page break' method in order to jump to a new page after a number of records?
3) can I disable text-wrap for TContainerField ? it can take more vertical space causing problems at the bottom of the page.
I'm figuring a way to do it:
1) change the property in the xml file before running the report.
2) exec the report many times for each set of records I want in a page.
3) cut the text in order to avoid the wrapping.
Is there a less ugly way?
many thanks
pm
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think already it is time to create discussion where users will describe the wishes :).
1) Currently there are no possibility change the report's property programmatically, it is in the plane.
2) Also as previous. But I have a question. I can set a property for MasterDataBand for example "Start new page after N records". Is it sence of your question?
3) Currently for Container with type Text sets a:
a) Qt::TextDontClip 0x0200 If it's impossible to stay within the given bounds, it prints outside.
b) Qt::TextWordWrap 0x1000 Breaks lines at appropriate points, e.g. at word boundaries.
I may make these two properties will be sets by the user, but default values as above.
So we will have
Clip/DontClip - default dont clip, any suggestion ???
WordWrap/DontWrap - default wrap, any suggestion ???
I not quite understand what you mean "2) exec the report many times for each set of records I want in a page.". Please clarify.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Inside setValue I know which page I'm printing and the subset of records to print (page 1 records from 0 to 49, page 2 records from 50 to 99 ...).
This is the workaround I'm figuring to simulate the 'Start new page after N records'.
In the end, my wishes are:
1) change report's properties programmatically
2) a property "Start new page after N records". But please also let's discuss about a method "Start new page Now".
3) properties Clip/DontClip WordWrap/DontWrap seem OK.
let'a add another question:
4) can I compile the report as resource in order to have the xml inside the exe?
thanks
pm
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
May be better for your need create a second page? And in fact you will have two reports in one.
A property "Start new page after N records"...I think it is a not good idea as a possible situation when the height of field is different and may occur the clip or overlapping of the bands.
4) yes, you may put xml as a resource. There are two functions
bool loadReport(QString fileName);
bool loadReport(QDomDocument xmlDoc);
First one for loading report from file.
Seconf one you may use for loading report from resource
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have to produce a report with some constraints: the paper already has an header (need to print just below it) and each page must contain a precise number of records.
The report has a blank page header and its height should be modifiable trough my app in order to print the page correctly after the header.
1) can I change the page header's height programmatically?
2) is there a 'page break' method in order to jump to a new page after a number of records?
3) can I disable text-wrap for TContainerField ? it can take more vertical space causing problems at the bottom of the page.
I'm figuring a way to do it:
1) change the property in the xml file before running the report.
2) exec the report many times for each set of records I want in a page.
3) cut the text in order to avoid the wrapping.
Is there a less ugly way?
many thanks
pm
Hi
I think already it is time to create discussion where users will describe the wishes :).
1) Currently there are no possibility change the report's property programmatically, it is in the plane.
2) Also as previous. But I have a question. I can set a property for MasterDataBand for example "Start new page after N records". Is it sence of your question?
3) Currently for Container with type Text sets a:
a) Qt::TextDontClip 0x0200 If it's impossible to stay within the given bounds, it prints outside.
b) Qt::TextWordWrap 0x1000 Breaks lines at appropriate points, e.g. at word boundaries.
I may make these two properties will be sets by the user, but default values as above.
So we will have
Clip/DontClip - default dont clip, any suggestion ???
WordWrap/DontWrap - default wrap, any suggestion ???
I not quite understand what you mean "2) exec the report many times for each set of records I want in a page.". Please clarify.
to clarify point 2 (sorry for my bad English) say I have to print 100 records on 2 pages and I must be sure to print 50 records per page:
Inside setValue I know which page I'm printing and the subset of records to print (page 1 records from 0 to 49, page 2 records from 50 to 99 ...).
This is the workaround I'm figuring to simulate the 'Start new page after N records'.
In the end, my wishes are:
1) change report's properties programmatically
2) a property "Start new page after N records". But please also let's discuss about a method "Start new page Now".
3) properties Clip/DontClip WordWrap/DontWrap seem OK.
let'a add another question:
4) can I compile the report as resource in order to have the xml inside the exe?
thanks
pm
May be better for your need create a second page? And in fact you will have two reports in one.
A property "Start new page after N records"...I think it is a not good idea as a possible situation when the height of field is different and may occur the clip or overlapping of the bands.
4) yes, you may put xml as a resource. There are two functions
bool loadReport(QString fileName);
bool loadReport(QDomDocument xmlDoc);
First one for loading report from file.
Seconf one you may use for loading report from resource