Page 1 of 1
how to set page margins runtime javascript
Posted: Tue Jun 19, 2018 5:40 am
by woody08
how to set page margins, data columns, column count at runtime?
Re: how to set page margins runtime javascript
Posted: Tue Jun 19, 2018 9:37 am
by Lech Kulikowski
Hello,
Please check sample which create report from code:
https://www.stimulsoft.com/en/samples/j ... -from-code
Also, you can find all properties and methods:
https://admin.stimulsoft.com/documentat ... lsoft.html
Thank you.
Re: how to set page margins runtime javascript
Posted: Wed Jun 20, 2018 1:12 am
by woody08
Very Thanks it solved from this code
report.pages.getByIndex(0).margins = new Stimulsoft.Report.Components.StiMargins(1, 1, 0.3, 0);
also my report have Data (named LabelsDataBand) but i don't know how to set columns count, width and gaps at run time
below code all fail...
//report.pages.getByIndex(0).Components.LabelsDataBand.Columns = 3;
//report.pages.getByIndex(0).Components.getByIndex(0).LabelsDataBand.Columns = 3;
//report.pages.getByIndex(0).LabelsDataBand.Columns = 3;
thanks Lech Kulikowski ~~
Re: how to set page margins runtime javascript
Posted: Thu Jun 21, 2018 1:48 am
by woody08
it solved by code below
report.pages.getByName("PageSpongeSpa").components.getByName("DataBandSpongeSpa").columns = 3;
thanks... have nice day~~
Re: how to set page margins runtime javascript
Posted: Fri Jun 22, 2018 9:03 am
by Lech Kulikowski
Hello
We are always glad to help you!
Please let us know if you need any additional help.
Thank you.