Adding pages to a mrt-template from code
Adding pages to a mrt-template from code
Hi!
I'm loading a mrt-file in a C#-project and are trying to add pages before compiling, rendering and exporting to pdf. The page gets added but is empty. What am I missing?
I've attached both the code and the mrt-file.
I'm loading a mrt-file in a C#-project and are trying to add pages before compiling, rendering and exporting to pdf. The page gets added but is empty. What am I missing?
I've attached both the code and the mrt-file.
- Attachments
-
- Report_test.mrt
- (3.31 KiB) Downloaded 383 times
-
- CreateReport.cs
- (14.22 KiB) Downloaded 231 times
Re: Adding pages to a mrt-template from code
Hello.
Please, send us a working project which reproduces the issue for analysis.
Thank you.
Please, send us a working project which reproduces the issue for analysis.
Thank you.
Re: Adding pages to a mrt-template from code
Hi!
You've allready had all the code in the CreateReport.cs, attached in my first post, but I made a full working project. Just put the Report_test.mrt-file in C:\Temp\Stimulsoft\ or change the path in Form1.cs.
Thanks
You've allready had all the code in the CreateReport.cs, attached in my first post, but I made a full working project. Just put the Report_test.mrt-file in C:\Temp\Stimulsoft\ or change the path in Form1.cs.
Thanks
- Attachments
-
- StimulsoftTest.zip
- (2.08 MiB) Downloaded 269 times
Re: Adding pages to a mrt-template from code
Hello,
Please try to change the following code:
Thank you.
Please try to change the following code:
Code: Select all
public StiPage CreateNewPage(String name, StiReport report)
{
\\StiPage p = new StiPage();
StiPage p = new StiPage(report);
...
Re: Adding pages to a mrt-template from code
Fantastic! That showed the objects but still no text in the boxes. So used the same strategy and instead of using the empty constructor, to create the textboxes, I sent in a rectangle and the text. That made the difference and now everything works as intended.
Thank you very much and happy New Year!
Thank you very much and happy New Year!
Re: Adding pages to a mrt-template from code
Hello,
Great!
Let us know if you need any additional help.
Happy New Year!!
Great!
Let us know if you need any additional help.
Happy New Year!!