Page 1 of 1
TextBox CanGrow?
Posted: Mon May 15, 2023 11:03 am
by Jose
Hi!
I need the most simple function:
I have a Textbox in a GropHeaderBand and I want it to grow vertically when text is longer then textbox width. Word wrap is needed.
I set Textbox Can Grow=true and Word Wrap=true and also GroupHeaderBand Can Grow=true.
But textbox height is the same, not growing, while word wrap is OK.
What can I do?
Thank you
Attila
Re: TextBox CanGrow?
Posted: Mon May 15, 2023 2:07 pm
by Max Shamanov
Hello,
Please check the attached report with Can Grow and WordWrap properties.
If the issue still persist, please send us a sample report with test data that reproduces the issue.
Thank you.
Re: TextBox CanGrow?
Posted: Mon May 15, 2023 3:22 pm
by Jose
Hi!
I tried your sample - it's ok.
My simplyfied sample is ok in designer prewiev. But in the server it's not.
Moreover, my real report is ok in designer prewiev!
There is something in the code that makes a mess of the report?
Code:
StiOptions.Engine.AllowSetCurrentDirectory = false;
StiFontCollection.AddFontFile("Fonts/arial.ttf", "Arial");
StiBlazorHelper.Initialize(jsRuntime);
Stimulsoft.Report.Export.StiPdfExportSettings exportsettings = new();
exportsettings.AutoPrintMode = Stimulsoft.Report.Export.StiPdfAutoPrintMode.Silent;
StiReport report = new StiReport();
report.Load("wwwroot/invoices/SzamlaA4Ketpld.mrt");
string connstr = DataGeneral.GetConnectionString(adatbazis);
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(new StiSqlDatabase("MS SQL", connstr));
report["@SzamlaIds"] = szamlaIds;
report.Dictionary.Variables["KellAtutalaskod"].ValueObject = true;
report.ReportAlias = szamlaszam;
report.ReportName = szamlaszam;
report.Render(true);
StiReportResponse.PrintAsPdf(report);
As you can see the report goes to pdf in a new browser window.
(I have some other reports: there is some Textbox in the DataBound like this and fails too. In prewiev ok.)
If you look the attached image: 1. report in prewiev, 2. report in application (pdf), 3. report in designer, 4. SPSzamlanyomtatas.VevoNev properties.
Attila
Re: TextBox CanGrow?
Posted: Wed May 17, 2023 7:05 pm
by Max Shamanov
Hello,
Please send us a sample project that reproduces the issue for analysis.
Thank you
Re: TextBox CanGrow?
Posted: Thu May 18, 2023 5:37 pm
by Jose
Hello!
It seems that problem solved.
Believe it or not, I set "Allow HTML Tags" to True, and it is OK.
Thank you for your help.
Regards
Attila
Re: TextBox CanGrow?
Posted: Thu May 18, 2023 8:09 pm
by Lech Kulikowski
Hello,
You are welcome.