Page 1 of 2

report displaies symbols!

Posted: Mon Apr 21, 2014 5:26 pm
by AlharbiN
Hi,
We use RicText to display a stylish text, when we pass an Arabic value to the report to be displaied by the RichText component; it is displied as symbol.
However, if the text is stored in the RicText as a default value it is displied currently!

I have attached our report with this topic and you here is our code

Code: Select all

        private void printPostAyahCard(string sIdentity, string strAyah, string strTfseer, string sPath, StiReport report)
        {

            string sFullFileName = "";

            StiPage page = report.Pages[0];
            page.UnlimitedHeight = true;
            page.UnlimitedBreakable=false;
            report["ayah"] = strAyah;
            report["tfseer"] = strTfseer;

            report.ReportName = "تفسير آية";
            report.Render(false);
/*We tried to overcome this issue by using the component directly but there is no result*/
            //StiComponent component = report.GetComponentByName("ComponentName");
            //StiRichText ricAyah = (StiRichText)report.GetComponentByName("rchAyah");
            //rich.SelectionFont = new Font("Arial", 20, FontStyle.Bold);
            //System.Drawing.Font font = new System.Drawing.Font("KFGQPC Uthmanic Script HAFS", 32);
            //ricAyah.SetFont(font);
            //ricAyah.RtfText = strAyah;

            sFullFileName = sPath + @"\Images\1\0\" + sIdentity + ".jpg";
            
            report.ExportDocument(Stimulsoft.Report.StiExportFormat.ImagePng, sFullFileName);
            report = null;
        }
Final question, Could we increase the output image resolution? if yes how, please?

Re: report displaies symbols!

Posted: Tue Apr 22, 2014 7:09 am
by HighAley
Hello.

Please, try to set the Full Convert Expression property of the Rich Text to True.

To set better resolution you should use ExportDocument(Stimulsoft.Report.StiExportFormat exportFormat, string file, Stimulsoft.Report.Export.StiExportSettings settings) method with StiPngExportSettings as parameter.

Thank you.

Re: report displaies symbols!

Posted: Tue Apr 22, 2014 10:20 am
by AlharbiN
Hello,
we tried this code

StiPage page = report.Pages[0];
page.UnlimitedHeight = true;
page.UnlimitedBreakable=false;
report["ayah"] = strAyah;
report["tfseer"] = strTfseer;
report.ReportName = "تفسير آية";
report.Render(false);

StiRichText ricAyah = (StiRichText)report.GetComponentByName("rchAyah");
ricAyah.FullConvertExpression = true;

StiRichText ricTfseer = (StiRichText)report.GetComponentByName("rchTfseer");
ricTfseer.FullConvertExpression = true;

report.ExportDocument(Stimulsoft.Report.StiExportFormat.ImagePng, sFullFileName);

Unfortuntaly, the problem still the same.

Re: report displaies symbols!

Posted: Tue Apr 22, 2014 1:12 pm
by AlharbiN
The issue become worse, since we have found that symbol appearance is not associated only with passing value via parameter! It also appears when we use RegData which means we have no way to display dynamic data. Symbol does not appears only and only if we assign default value to RichText manually!

Re: report displaies symbols!

Posted: Wed Apr 23, 2014 8:06 am
by HighAley
Hello.

You should set this property before rendering of the report.

Thank you.

Re: report displaies symbols!

Posted: Wed Apr 23, 2014 12:17 pm
by AlharbiN
I'm sorry! I have edit the code as you have commented but still the issue has not solved!

Re: report displaies symbols!

Posted: Thu Apr 24, 2014 10:36 am
by HighAley
Hello.

Please, send us sample project which reproduces the issue for analysis.

Thank you.

Re: report displaies symbols!

Posted: Thu Apr 24, 2014 2:26 pm
by AlharbiN
Please, check the attached file

P.S: I have sent a copy of this ziped file to your support email

Re: report displaies symbols!

Posted: Fri Apr 25, 2014 7:58 am
by HighAley
Hello.

You are loading reports from assemblies. It's impossible to change FullConvertExpression property of the Rich Text component after compilation because this property affects compilation methods.
You should set the property in the report template and then save it as assembly that could be used in your project.

Thank you.

Re: report displaies symbols!

Posted: Fri Apr 25, 2014 8:22 am
by AlharbiN
How to set the property in the report templetate? I haven't used this feature and I don't know how to do that.