save to pdf has unnormal behavior

Stimulsoft Reports.NET discussion
mahdi_h84
Posts: 15
Joined: Wed May 26, 2010 5:42 am

save to pdf has unnormal behavior

Post by mahdi_h84 »

Hi,
i set a condition to a column of my table in my Code based on my parameters.
in reportViewer i can see my column with my favorite condition but when use print with pdf , this column is empty.

when print with printer i can see my column.
what can i do?
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

save to pdf has unnormal behavior

Post by Ivan »

Hello,

Can you please send us a sample report with data, which reproduces the issue, MDC file of the rendered report and resulting PDF file?
You can save MDC file in the Preview window via button with Diskette image on it ("Document file ...").
These files will help us to analize problems and provide you with recommendations for solving the issues.

Thank you.
mahdi_h84
Posts: 15
Joined: Wed May 26, 2010 5:42 am

save to pdf has unnormal behavior

Post by mahdi_h84 »

yes , but how can i send it? can i attach it to my post?

also my Setting is in my aspx.cs.

it is my aspx.cs

Code: Select all



using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Stimulsoft.Report;
using Stimulsoft.Report.Dictionary;
using System.Data;
using Stimulsoft.Report.Components;
using System.Drawing;


public partial class Modules_WorkBook_report_new : System.Web.UI.Page
{
	protected void Page_Load(object sender, EventArgs e)
	{
		string appDirectory = HttpContext.Current.Server.MapPath(string.Empty);

		StiReport report = new StiReport();
		report.Load(appDirectory + "\\test.mrt");

		List stdListID = new List();
		for (int i = 1; i  BulidRanges = new List();
		Random rd = new Random();

		foreach (long stdId in stdListID)
		{
			for (int j = 0; j  14)
					Range = "Range1";
				else
					if (Grade > 10)
						Range = "Range2";
					else
						if (Grade > 5)
							Range = "Range3";
						else
							Range = "Range4";
				drTotal = tbTotal.NewRow();
				drTotal["CellStyle"] = Range;
				drTotal["StdID"] = stdId;
				drTotal["stdResult"] = Grade;
				tbTotal.Rows.Add(drTotal);
			}
		}


		report.Compile();
		report.CompiledReport.RegData("mainTable", tbMain);
		report.CompiledReport.RegData("ResultsTable", tbTotal);
		StiWebViewer1.Report = report;

	}


	private StiCondition CreateRangesStyle(string RangeName , string ColumnName , string ColorStr )
	{
		StiCondition con = new StiCondition();
		con.Column = ColumnName;
		con.DataType = StiFilterDataType.String;
		con.Condition = StiFilterCondition.EqualTo;
		con.TextColor = Color.FromArgb(Int32.Parse(ColorStr, System.Globalization.NumberStyles.HexNumber));
		con.Item = StiFilterItem.Value;
		con.Value1 = RangeName;
		return con;

	}
	
}

and my report is :

Code: Select all


using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.Dialogs;
using Stimulsoft.Report.Components;

namespace Reports
{
    
    public class Report1 : Stimulsoft.Report.StiReport
    {
        
        public Report1()
        {
            this.InitializeComponent();
        }
        #region StiReport Designer generated code - do not modify
        public Stimulsoft.Report.Dictionary.StiDataRelation ParentRelation1;
        public Stimulsoft.Report.Components.StiPage Page1;
        public Stimulsoft.Report.Components.StiPageHeaderBand PageHeaderBand1;
        public Stimulsoft.Report.Components.StiText Text1;
        public Stimulsoft.Report.Components.StiPageFooterBand PageFooterBand1;
        public Stimulsoft.Report.Components.StiText Text2;
        public Stimulsoft.Report.Components.StiDataBand MainDataBand;
        public Stimulsoft.Report.Components.StiPanel pnlResults;
        public Stimulsoft.Report.Components.StiHeaderBand HeaderBand2;
        public Stimulsoft.Report.Components.StiText Text13;
        public Stimulsoft.Report.Components.StiDataBand BestInClass;
        public Stimulsoft.Report.Components.StiText txtResult;
        public Stimulsoft.Report.Components.StiWatermark Page1_Watermark;
        public Stimulsoft.Report.Print.StiPrinterSettings Report1_PrinterSettings;
        public mainTableDataSource mainTable;
        public ResultsTableDataSource ResultsTable;
        
        public void Text1__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
        {
            e.Value = ToString(sender, mainTable.stdName, true);
        }
        
        public void Text2__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
        {
            e.Value = ToString(sender, mainTable.stdName, true);
        }
        
        public void Text13__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
        {
            e.Value = "Result";
        }
        
        public void txtResult__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
        {
            e.Value = ToString(sender, ResultsTable.stdResult, true);
        }
        
        private void InitializeComponent()
        {
            this.ResultsTable = new ResultsTableDataSource();
            this.mainTable = new mainTableDataSource();
            this.ParentRelation1 = new Stimulsoft.Report.Dictionary.StiDataRelation("Relation1", "Relation1", "Relation1", this.mainTable, this.ResultsTable, new System.String[] {
                        "stdID"}, new System.String[] {
                        "stdID"});
            this.NeedsCompiling = false;
            this.EngineVersion = Stimulsoft.Report.Engine.StiEngineVersion.EngineV2;
            this.ReferencedAssemblies = new System.String[] {
                    "System.Dll",
                    "System.Drawing.Dll",
                    "System.Windows.Forms.Dll",
                    "System.Data.Dll",
                    "System.Xml.Dll",
                    "Stimulsoft.Controls.Dll",
                    "Stimulsoft.Base.Dll",
                    "Stimulsoft.Report.Dll"};
            this.ReportAlias = "Report1";
            // 
            // ReportChanged
            // 
            this.ReportChanged = new DateTime(2010, 5, 29, 9, 49, 43, 781);
            // 
            // ReportCreated
            // 
            this.ReportCreated = new DateTime(2010, 5, 18, 9, 38, 18, 0);
            this.ReportFile = "E:\\\\test.mrt";
            this.ReportGuid = "bc29f86629dd4ca583e01a3494523d9c";
            this.ReportName = "Report1";
            this.ReportUnit = Stimulsoft.Report.StiReportUnitType.Centimeters;
            this.ScriptLanguage = Stimulsoft.Report.StiReportLanguageType.CSharp;
            // 
            // Page1
            // 
            this.Page1 = new Stimulsoft.Report.Components.StiPage();
            this.Page1.Guid = "f76cd6dcadd24daab290efb3fb282bdd";
            this.Page1.Name = "Page1";
            this.Page1.PageHeight = 29.7;
            this.Page1.PageWidth = 21;
            this.Page1.PaperSize = System.Drawing.Printing.PaperKind.A4;
            this.Page1.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.All, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black));
            this.Page1.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
            // 
            // PageHeaderBand1
            // 
            this.PageHeaderBand1 = new Stimulsoft.Report.Components.StiPageHeaderBand();
            this.PageHeaderBand1.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0.4, 19, 1.4);
            this.PageHeaderBand1.Name = "PageHeaderBand1";
            this.PageHeaderBand1.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black));
            this.PageHeaderBand1.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
            // 
            // Text1
            // 
            this.Text1 = new Stimulsoft.Report.Components.StiText();
            this.Text1.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0.2, 0.4, 18.4, 0.6);
            this.Text1.Name = "Text1";
            this.Text1.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.Text1__GetValue);
            this.Text1.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black));
            this.Text1.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
            this.Text1.Font = new System.Drawing.Font("B Nazanin", 12F, ((System.Drawing.FontStyle.Regular | System.Drawing.FontStyle.Bold) 
                            | System.Drawing.FontStyle.Italic));
            this.Text1.Guid = null;
            this.Text1.Interaction = null;
            this.Text1.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
            this.Text1.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
            this.Text1.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
            this.PageHeaderBand1.Guid = null;
            this.PageHeaderBand1.Interaction = null;
            // 
            // PageFooterBand1
            // 
            this.PageFooterBand1 = new Stimulsoft.Report.Components.StiPageFooterBand();
            this.PageFooterBand1.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 26.1, 19, 1.6);
            this.PageFooterBand1.Name = "PageFooterBand1";
            this.PageFooterBand1.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black));
            this.PageFooterBand1.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
            // 
            // Text2
            // 
            this.Text2 = new Stimulsoft.Report.Components.StiText();
            this.Text2.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0.2, 0.5, 18.4, 0.6);
            this.Text2.Guid = "189127b1aedb47a9b9ca2d004ce3b586";
            this.Text2.Name = "Text2";
            this.Text2.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.Text2__GetValue);
            this.Text2.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black));
            this.Text2.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
            this.Text2.Font = new System.Drawing.Font("B Nazanin", 12F, ((System.Drawing.FontStyle.Regular | System.Drawing.FontStyle.Bold) 
                            | System.Drawing.FontStyle.Italic));
            this.Text2.Interaction = null;
            this.Text2.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
            this.Text2.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
            this.Text2.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
            this.PageFooterBand1.Guid = null;
            this.PageFooterBand1.Interaction = null;
            // 
            // MainDataBand
            // 
            this.MainDataBand = new Stimulsoft.Report.Components.StiDataBand();
            this.MainDataBand.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 2.6, 19, 22.6);
            this.MainDataBand.DataSourceName = "mainTable";
            this.MainDataBand.Name = "MainDataBand";
            this.MainDataBand.Sort = new System.String[0];
            this.MainDataBand.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black));
            this.MainDataBand.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
            this.MainDataBand.BusinessObjectGuid = null;
            // 
            // pnlResults
            // 
            this.pnlResults = new Stimulsoft.Report.Components.StiPanel();
            this.pnlResults.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(16, 0, 2.4, 2.2);
            this.pnlResults.Guid = "eaa1e9aaa075484d8b02353d6736f44d";
            this.pnlResults.Name = "pnlResults";
            this.pnlResults.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black));
            this.pnlResults.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
            // 
            // HeaderBand2
            // 
            this.HeaderBand2 = new Stimulsoft.Report.Components.StiHeaderBand();
            this.HeaderBand2.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0.4, 2.4, 0.6);
            this.HeaderBand2.Guid = "8adcb15e9b0d495da1c06696f0042991";
            this.HeaderBand2.Name = "HeaderBand2";
            this.HeaderBand2.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black));
            this.HeaderBand2.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
            // 
            // Text13
            // 
            this.Text13 = new Stimulsoft.Report.Components.StiText();
            this.Text13.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, 2.4, 0.6);
            this.Text13.ComponentStyle = "HeaderStyle";
            this.Text13.Guid = "b3f010b08bf94e21baf541e31b561954";
            this.Text13.HorAlignment = Stimulsoft.Base.Drawing.StiTextHorAlignment.Center;
            this.Text13.Name = "Text13";
            this.Text13.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.Text13__GetValue);
            this.Text13.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Center;
            this.Text13.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.All, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black));
            this.Text13.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.LightGray);
            this.Text13.Font = new System.Drawing.Font("B Zar", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 178);
            this.Text13.Interaction = null;
            this.Text13.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
            this.Text13.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
            this.Text13.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
            this.HeaderBand2.Interaction = null;
            // 
            // BestInClass
            // 
            this.BestInClass = new Stimulsoft.Report.Components.StiDataBand();
            this.BestInClass.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 1.8, 2.4, 0.6);
            this.BestInClass.DataRelationName = "Relation1";
            this.BestInClass.DataSourceName = "ResultsTable";
            this.BestInClass.EvenStyle = "GridRow2";
            this.BestInClass.Guid = "e2afc3c9e5db41b5aaab01182bf41c0c";
            this.BestInClass.Name = "BestInClass";
            this.BestInClass.OddStyle = "GridRow1";
            this.BestInClass.Sort = new System.String[0];
            this.BestInClass.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black));
            this.BestInClass.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
            this.BestInClass.BusinessObjectGuid = null;
            // 
            // txtResult
            // 
            this.txtResult = new Stimulsoft.Report.Components.StiText();
            this.txtResult.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, 2.4, 0.6);
            this.txtResult.Guid = "a37ecbfa42f948349c1c8e3d33a6f72e";
            this.txtResult.HorAlignment = Stimulsoft.Base.Drawing.StiTextHorAlignment.Center;
            this.txtResult.Name = "txtResult";
            this.txtResult.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.txtResult__GetValue);
            this.txtResult.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Center;
            this.txtResult.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.All, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black));
            this.txtResult.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
            this.txtResult.Font = new System.Drawing.Font("B Zar", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 178);
            this.txtResult.Interaction = null;
            this.txtResult.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
            this.txtResult.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
            this.txtResult.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
            this.BestInClass.Interaction = null;
            this.pnlResults.Interaction = null;
            this.MainDataBand.DataRelationName = null;
            this.MainDataBand.Guid = null;
            this.MainDataBand.Interaction = null;
            this.MainDataBand.MasterComponent = null;
            this.Page1.ExcelSheetValue = null;
            this.Page1.Interaction = null;
            this.Page1.Margins = new Stimulsoft.Report.Components.StiMargins(1, 1, 1, 1);
            this.Page1_Watermark = new Stimulsoft.Report.Components.StiWatermark();
            this.Page1_Watermark.Font = new System.Drawing.Font("Arial", 100F);
            this.Page1_Watermark.Image = null;
            this.Page1_Watermark.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.FromArgb(50, 0, 0, 0));
            this.Report1_PrinterSettings = new Stimulsoft.Report.Print.StiPrinterSettings();
            this.PrinterSettings = this.Report1_PrinterSettings;
            this.Page1.Report = this;
            this.Page1.Watermark = this.Page1_Watermark;
            this.PageHeaderBand1.Page = this.Page1;
            this.PageHeaderBand1.Parent = this.Page1;
            this.Text1.Page = this.Page1;
            this.Text1.Parent = this.PageHeaderBand1;
            this.PageFooterBand1.Page = this.Page1;
            this.PageFooterBand1.Parent = this.Page1;
            this.Text2.Page = this.Page1;
            this.Text2.Parent = this.PageFooterBand1;
            this.MainDataBand.Page = this.Page1;
            this.MainDataBand.Parent = this.Page1;
            this.pnlResults.Page = this.Page1;
            this.pnlResults.Parent = this.MainDataBand;
            this.HeaderBand2.Page = this.Page1;
            this.HeaderBand2.Parent = this.pnlResults;
            this.Text13.Page = this.Page1;
            this.Text13.Parent = this.HeaderBand2;
            this.BestInClass.MasterComponent = this.MainDataBand;
            this.BestInClass.Page = this.Page1;
            this.BestInClass.Parent = this.pnlResults;
            this.txtResult.Page = this.Page1;
            this.txtResult.Parent = this.BestInClass;
            // 
            // Add to PageHeaderBand1.Components
            // 
            this.PageHeaderBand1.Components.Clear();
            this.PageHeaderBand1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
                        this.Text1});
            // 
            // Add to PageFooterBand1.Components
            // 
            this.PageFooterBand1.Components.Clear();
            this.PageFooterBand1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
                        this.Text2});
            // 
            // Add to HeaderBand2.Components
            // 
            this.HeaderBand2.Components.Clear();
            this.HeaderBand2.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
                        this.Text13});
            // 
            // Add to BestInClass.Components
            // 
            this.BestInClass.Components.Clear();
            this.BestInClass.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
                        this.txtResult});
            // 
            // Add to pnlResults.Components
            // 
            this.pnlResults.Components.Clear();
            this.pnlResults.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
                        this.HeaderBand2,
                        this.BestInClass});
            // 
            // Add to MainDataBand.Components
            // 
            this.MainDataBand.Components.Clear();
            this.MainDataBand.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
                        this.pnlResults});
            // 
            // Add to Page1.Components
            // 
            this.Page1.Components.Clear();
            this.Page1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
                        this.PageHeaderBand1,
                        this.PageFooterBand1,
                        this.MainDataBand});
            // 
            // Add to Pages
            // 
            this.Pages.Clear();
            this.Pages.AddRange(new Stimulsoft.Report.Components.StiPage[] {
                        this.Page1});
            this.Dictionary.Relations.Add(this.ParentRelation1);
            this.mainTable.Columns.AddRange(new Stimulsoft.Report.Dictionary.StiDataColumn[] {
                        new Stimulsoft.Report.Dictionary.StiDataColumn("stdID", "stdID", "stdID", typeof(string)),
                        new Stimulsoft.Report.Dictionary.StiDataColumn("stdName", "stdName", "stdName", typeof(string))});
            this.DataSources.Add(this.mainTable);
            this.ResultsTable.Columns.AddRange(new Stimulsoft.Report.Dictionary.StiDataColumn[] {
                        new Stimulsoft.Report.Dictionary.StiDataColumn("stdID", "stdID", "stdID", typeof(string)),
                        new Stimulsoft.Report.Dictionary.StiDataColumn("stdResult", "stdResult", "stdResult", typeof(string)),
                        new Stimulsoft.Report.Dictionary.StiDataColumn("CellStyle", "CellStyle", "CellStyle", typeof(string))});
            this.DataSources.Add(this.ResultsTable);
        }
        
        #region Relation ParentRelation1
        public class ParentRelation1Relation : Stimulsoft.Report.Dictionary.StiDataRow
        {
            
            public ParentRelation1Relation(Stimulsoft.Report.Dictionary.StiDataRow dataRow) : 
                    base(dataRow)
            {
            }
            
            public virtual string stdID
            {
                get
                {
                    return ((string)(StiReport.ChangeType(this["stdID"], typeof(string), true)));
                }
            }
            
            public virtual string stdName
            {
                get
                {
                    return ((string)(StiReport.ChangeType(this["stdName"], typeof(string), true)));
                }
            }
        }
        #endregion Relation ParentRelation1
        
        #region DataSource mainTable
        public class mainTableDataSource : Stimulsoft.Report.Dictionary.StiDataTableSource
        {
            
            public mainTableDataSource() : 
                    base("mainTable", "mainTable")
            {
            }
            
            public virtual string stdID
            {
                get
                {
                    return ((string)(StiReport.ChangeType(this["stdID"], typeof(string), true)));
                }
            }
            
            public virtual string stdName
            {
                get
                {
                    return ((string)(StiReport.ChangeType(this["stdName"], typeof(string), true)));
                }
            }
        }
        #endregion DataSource mainTable
        
        #region DataSource ResultsTable
        public class ResultsTableDataSource : Stimulsoft.Report.Dictionary.StiDataTableSource
        {
            
            public ResultsTableDataSource() : 
                    base("ResultsTable", "ResultsTable")
            {
            }
            
            public virtual string stdID
            {
                get
                {
                    return ((string)(StiReport.ChangeType(this["stdID"], typeof(string), true)));
                }
            }
            
            public virtual string stdResult
            {
                get
                {
                    return ((string)(StiReport.ChangeType(this["stdResult"], typeof(string), true)));
                }
            }
            
            public virtual string CellStyle
            {
                get
                {
                    return ((string)(StiReport.ChangeType(this["CellStyle"], typeof(string), true)));
                }
            }
            
            public virtual ParentRelation1Relation Relation1
            {
                get
                {
                    return new ParentRelation1Relation(this.GetParentData("Relation1"));
                }
            }
        }
        #endregion DataSource ResultsTable
        #endregion StiReport Designer generated code - do not modify
    }
}

in preview i can see my Numbers but when click Print To pdf , in pdf file , i can't
Attachments
433.Report1.mdc
(1.68 KiB) Downloaded 444 times
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

save to pdf has unnormal behavior

Post by Andrew »

Please, click on the button as seen on the screenshot below.
You may also send a report to support@stimulsoft.com.

Thank you.
Attachments
432.1.png
432.1.png (16.01 KiB) Viewed 4035 times
mahdi_h84
Posts: 15
Joined: Wed May 26, 2010 5:42 am

save to pdf has unnormal behavior

Post by mahdi_h84 »

ok
Attachments
434.Report1.mdc
(1.68 KiB) Downloaded 300 times
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

save to pdf has unnormal behavior

Post by Andrew »

Hello,

It is not enough data you sent to reproduce the issue.
The Report1.mdc file is empty and does not contain any information.

Please send us:
1. a sample report (MRT file, not the code from Code tab of designer),
2. data for this report, which reproduces the issue,
3. resulting PDF file

Thank you.
mahdi_h84
Posts: 15
Joined: Wed May 26, 2010 5:42 am

save to pdf has unnormal behavior

Post by mahdi_h84 »

in this attachment file i set all of files that you say and a powerpoint that explain all my problems with picture

thank you
Attachments
436.test.rar
(472.9 KiB) Downloaded 312 times
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

save to pdf has unnormal behavior

Post by Ivan »

Hello,

Please do following:

1. modify your code:

Code: Select all

con.TextColor = Color.FromArgb(Int32.Parse("FF" + mycolor, System.Globalization.NumberStyles.HexNumber));
2. set the CanGrow property of txtSign and txtComments components to true.

3. In web exist only one way for better printing from web viewer - export to adobe pdf format and after then printing.
In other variants printing provided by browser. So you need check your browser settings.
It depends on the print settings of your browser. Please go Menu - PageSetup, remove Header and Footer, and set all margins to 0. If you use Firefox, please also set the Scale to 100%

Thank you.
mahdi_h84
Posts: 15
Joined: Wed May 26, 2010 5:42 am

save to pdf has unnormal behavior

Post by mahdi_h84 »

thank you.
mahdi_h84
Posts: 15
Joined: Wed May 26, 2010 5:42 am

save to pdf has unnormal behavior

Post by mahdi_h84 »

why my odd and even rows has same style when print it with my browser?
why my footer is not at the end of page when print it with my browser?
Post Reply