Page 1 of 1
Report Heading Margins
Posted: Wed Mar 03, 2021 3:42 pm
by icoso
Is there some type of built-in margin settings for the fields and headings on a report?
How do I change the margin settings?
In the report designer my headings look like this: (Everything fits)
Report-Headings1.png
When I run the report the headings look like this: (its like there is a right side margin applied.)
Report-Headings2.png
Or if I change the width to 30 it still looks like this:
Report-Headings3.png
Why is this happening? How can it be fixed or changed?
Re: Report Heading Margins
Posted: Wed Mar 03, 2021 6:54 pm
by Janusz
Fonts used by TCPDF are not exactly the same as you can see on the screen. Make sure that fields are big enough not to cause any wrap with bigger fonts. Fields can overlap if necessary.
Generally you can not fine tune your report and base only on the screen view.
tcpdf.JPG
Re: Report Heading Margins
Posted: Wed Mar 03, 2021 7:26 pm
by icoso
Yes, I understand that they are not WSYSIWYG, but the font is not all that different. The field width on the report designer itself is about twice the size of the text in the field and when it appears on the pdf report its clearly cutting off the right side as if is applying a margin. For example look at the ELF Type heading on the report designer screen. The "e" at the end of Type is very close to the R in Royalty. Then on the report pdf output, its cut off after ELF and there is a least two extra character spaces between the F in ELF and p in Type and where the word Royalty begins on each line. There is clearly a right margin being applied on the field. Is this in the CSS or is it in the nuBuilder report code?
If in the CSS, what ID is it?
Re: Report Heading Margins
Posted: Thu Mar 04, 2021 12:06 am
by Janusz
Hi, maybe you can try in the nureportjson.js but me I was not trying to adjust it so can not give more info.
Re: Report Heading Margins
Posted: Fri Mar 05, 2021 2:32 pm
by icoso
Perhaps kev1n or Steve would be able to tell me why the reports seem to embed a margin on the report fields.
Re: Report Heading Margins
Posted: Fri Mar 05, 2021 2:45 pm
by kev1n
Janusz wrote:Hi, maybe you can try in the nureportjson.js but me I was not trying to adjust it so can not give more info.
Did you try reducing the margins as Janusz suggested?
Re: Report Heading Margins
Posted: Fri Mar 05, 2021 3:16 pm
by icoso
kev1n wrote:
Did you try reducing the margins as Janusz suggested?
Janusz didn't suggest reducing margins... He said: "Make sure that fields are big enough not to cause any wrap with bigger fonts." that's not what Im asking about and obviously Im doing that, based on the pictures I posted and I understand how to make reports and place fields therein. Been doing this type of work for over 30 years. I also know that using industry standard reporting tools don't behave like this and that's why Im asking about embedded margins or spacing.
Its pretty obvious that something within the code is putting a margin or extra space on the right side of the fields and headings. Thats not just the font Im using. Im trying to figure out what it is and why and how to "fix" it. Changing the size of the fields and labels and over lapping them is not really a good option. Wouldn't it be better to find out the underlying cause of this?
Re: Report Heading Margins
Posted: Fri Mar 05, 2021 3:47 pm
by kev1n
Yes, he suggested to try modifying nureportjson.js. And the most obvious thing to look at is margins. But there was no response from you when he suggested that.
Hi, maybe you can try in the nureportjson.js but me I was not trying to adjust it so can not give more info.
Re: Report Heading Margins
Posted: Wed Mar 10, 2021 6:51 pm
by icoso
Inside that nureportjson.js file are several what appear to be margin settings. I have no idea what these are for or what they affect. There are several that seem to repeat and again I have no idea what they are for and what they affect. These are:
Code: Select all
{
"sortField":"",
"sortBy":"a",
"sections":[
{
"id":"",
"top":110,
"height":0,
"label":" Header",
"page_break":0,
"margins":4,
"color":"#FFFFFF",
"objects":[
]
},
{
"id":"",
"top":150,
"height":0,
"label":" Footer",
"page_break":0,
"margins":6,
"color":"#FFFFFF",
"objects":[
]
}
]
},
Do you have any idea what these margin settings are for and what they affect in the report? There are no notes or documentation defining what any of these settings in the file mean. I don't see any section in that file that specify fields.
Re: Report Heading Margins
Posted: Wed Mar 10, 2021 7:41 pm
by kev1n
I'm afraid I'm not familiar with it. Maybe Steven or someone else knows more about that.