That's great, but I don't have a RDL file, I want to create it from scratch. The reason why I want to do that, is that I have a build in report setup, where the user can select columns and grouping for the report. This setup is specialized against the functionality for the software I working with, and the plan is to keep that, but I then need to build the Report object myself (with Header, Body, Footer, Table and so on).
I actually were able to get this work when I used another project Reporting.ObjectModel, which have the most used RDL objects, but the problem was that the Chars.cs were missing. That's the reason why I then tries to use only MyFyReporting instead.
Under is my code which worked with Reporting.ObjectModel as reference. There is some methods referred there which is not added, since there are in other projects, but as you can see, I build a Report object here, with use of Expression, Row, Table and stuff, but I can't implement Chart there.
public class ReportFactory
{
Report report;
ReportRepository repRep;
public Dictionary<string, string> PropertyAlias = new Dictionary<string, string>();
public ReportFactory()
{
}
public Report GetRDLReport(DataTable dt, ReportRepository reprep)
{
repRep = reprep;
report = new Report();
report.Code = ""; //Used for Error message
string quote = ((char)34).ToString();
string singleQuotes = @"""";
string doubleQuotes = @"""""";
try
{
// Report-level properties
report.Description = "Position report";
report.Language = "en-US";
double pageWidth = 11.7f;
if (repRep.CurrentReport.Orientation == ReportOrientation.OrientationLandscape || repRep.CurrentReport.Orientation == ReportOrientation.OrientationPrintLandscape)
{
//report.PageHeight = new Reporting.ObjectModel.Size(8.5);
//report.PageWidth = new Reporting.ObjectModel.Size(pageWidth);
report.PageHeight = new Reporting.ObjectModel.Size("8.3in");
report.PageWidth = new Reporting.ObjectModel.Size(Parse.ParseToDatabaseDouble(pageWidth.ToString())+"in");
}
else
{
pageWidth = 8.3f;
report.PageWidth = new Reporting.ObjectModel.Size("8.3in");
report.PageHeight = new Reporting.ObjectModel.Size(Parse.ParseToDatabaseDouble(pageWidth.ToString()) + "in");
}
//report.Width = new Reporting.ObjectModel.Size(11.7); //11.7 inch wide
report.Author = "MB";
report.LeftMargin = report.TopMargin = report.RightMargin = report.BottomMargin = new Reporting.ObjectModel.Size(.5);
// Data source
DataSource dataSource = new DataSource("DataSourceReport");
ConnectionProperties connectionProperties = new ConnectionProperties();
connectionProperties.DataProvider = "SQL";
//connectionProperties.ConnectString = "the connection string to the database";
string connString = repRep.ReportConnection.Connection.ConnectionString;
connString = connString.Replace("Provider=SQLOLEDB;", "");
connString = connString.Replace("Provider=SQLNCLI11;", "");
connectionProperties.ConnectString = connString;
dataSource.ConnectionProperties = connectionProperties;
report.DataSources.Add(dataSource);
//ReportParameter reportParam = new ReportParameter("ConnectionString", connectionProperties.ConnectString, DataType.String, true);
//report.Parameters.Add(reportParam);
//DATA SETS
//Report Data DataSet
Reporting.ObjectModel.DataSet dataSetReportData = new Reporting.ObjectModel.DataSet();
dataSetReportData.Name = "ReportTableDataSet";
dataSetReportData.Query.DataSourceName = "DataSourceReport";
string reportSQL = repRep.CurrentReport.ReportQuery;
dataSetReportData.Query.CommandText = reportSQL;
dataSetReportData.Query.TimeOut = 5;
//Header Fields DataSet
Reporting.ObjectModel.DataSet dataSetHeaderFields = new Reporting.ObjectModel.DataSet();
dataSetHeaderFields.Name = "ReportHeaderDataSet";
dataSetHeaderFields.Query.DataSourceName = "DataSourceReport";
string headerFieldsSQL = repRep.CurrentReport.HeaderQuery;
dataSetHeaderFields.Query.CommandText = headerFieldsSQL;
dataSetHeaderFields.Query.TimeOut = 5;
int colNo = 0;
//Add Report Columns to DataSet
foreach (ReportColumn rc in repRep.CurrentReport.ReportColumnCollection.ReportColumns)
{
Type colType = typeof(string);
if (rc.ColType.Contains("B") || rc.ColType.Contains("W") || rc.ColType.Contains("S")) colType = typeof(decimal);
if (rc.ColType.Contains("D")) colType = typeof(DateTime);
string fieldName = ReplaceSpecialChars(rc.ColCaptionParsed);
dataSetReportData.Fields.Add(new Field(fieldName, rc.ColCaptionParsed, colType));
}
colNo = 0;
//Add SumFormula Columns to DataSet
foreach (ReportColumn rc in repRep.CurrentReport.ReportColumnCollection.SumFormulaColumns)
{
Type colType = typeof(string);
if (rc.ColType.Contains("B") || rc.ColType.Contains("W") || rc.ColType.Contains("S")) colType = typeof(decimal);
if (rc.ColType.Contains("D")) colType = typeof(DateTime);
string fieldName = ReplaceSpecialChars(rc.ColCaptionParsed);
dataSetReportData.Fields.Add(new Field(fieldName, rc.ColCaptionParsed, colType));
}
//Add Grouping Fields to DataSet
foreach (ReportColumn rc in repRep.CurrentReport.GroupingFields)
{
string fieldText = rc.ColCaptionInter;
if (dataSetReportData.Fields.FirstOrDefault(f => f.Name == rc.ColNameInter) == null) dataSetReportData.Fields.Add(new Field(rc.ColNameInter, rc.ColNameInter, typeof(string)));
}
if (repRep.CurrentReport.AddressCodeField != "")
{
//Add Address Fields to DataSet
foreach (HeaderField hf in repRep.CurrentReport.AddressFields)
{
string fieldText = hf.Name;
//string fieldText = "Fields!" + hf.Name;
//if (dataSetReportData.Fields.FirstOrDefault(f=>f.Name == hf.Name) == null)
dataSetReportData.Fields.Add(new Field("Header_" + hf.Name, "Header_" + fieldText, hf.DataType));
}
//Add ShortCode to DataSet
if (repRep.CurrentReport.AddressFields.Count > 0)
{
//dataSetReportData.Fields.Add(new Field("ShortCode", "ShortCode", typeof(string)));
if (dataSetReportData.Fields.FirstOrDefault(f => f.Name == "ShortCode_Group") == null) dataSetReportData.Fields.Add(new Field("ShortCode_Group", "Header_ShortCode", typeof(string)));
}
}
report.DataSets.Add(dataSetReportData);
//Add Header Fields to DataSet
foreach (HeaderField hf in repRep.CurrentReport.HeaderFields)
{
string fieldText = hf.Name;
dataSetHeaderFields.Fields.Add(new Field(hf.Name, fieldText, hf.DataType));
}
report.DataSets.Add(dataSetHeaderFields);
//END DataSets
//Page Header
report.PageHeader.PrintOnFirstPage = true;
report.PageHeader.PrintOnLastPage = true;
//CustomProperty custProp = new CustomProperty("AddressText", "Arne Hansen");
//report.CustomProperties.Add(custProp);
//Border constants
Reporting.ObjectModel.BorderStyle borderStyleSolid = new Reporting.ObjectModel.BorderStyle();
borderStyleSolid.Default = new Expression("Solid");
BorderWidth borderWidth1 = new BorderWidth();
borderWidth1.Default = new Expression("1pt");
//All Report Header fields
double maxHeaderFieldPos = 0.5f;
foreach (HeaderField hf in repRep.CurrentReport.HeaderFields)
{
Textbox repItem = new Textbox();
Style style = new Style();
repItem.Name = "textBox" + hf.Name;
UpdateReportItemFromTag(repItem, hf.Tag, "Caption;");
if (repItem.Style.Color.Value.ToString() == "") repItem.Style.Color.Value = "Black";
if (repItem.Style.BackgroundColor.Value.ToString() == "") repItem.Style.BackgroundColor.Value = "White";
if (!hf.IsFooterField && repItem.Top.Unit.Value + repItem.Height.Unit.Value > maxHeaderFieldPos) maxHeaderFieldPos = repItem.Top.Unit.Value + repItem.Height.Unit.Value;
if (hf.Name == "PageNo")
{
if (hf.Value.ToString() == "<Page No>") hf.Value = "=CStr(Globals!PageNumber) & " + quote + "/" + quote + " & CStr(Globals!TotalPages)";
//repItem.Top = new Reporting.ObjectModel.Size(report.PageHeight.Unit);
repItem.Top = new Reporting.ObjectModel.Size(0);
}
if (hf.DataType==typeof(DateTime))
{
//Remove clock part
hf.Value = ((DateTime)hf.Value).ToShortDateString();
}
repItem.Value.Value = new Expression(hf.Value.ToString());
borderWidth1.Default = new Expression("1pt");
if (!hf.IsFooterField)
{
report.PageHeader.ReportItems.Add(repItem);
}
else
{
report.PageFooter.ReportItems.Add(repItem);
}
}
report.PageHeader.Height = new Reporting.ObjectModel.Size(maxHeaderFieldPos);
//BODY
//report.Body.Height = new Reporting.ObjectModel.Size("6.5");
//report.Body.Height = new Reporting.ObjectModel.Size("170pt");
// TABLE
Table table = new Table("tblMain");
table.DataSetName = "ReportTableDataSet";
table.Width = new Reporting.ObjectModel.Size(pageWidth);
table.Left = new Reporting.ObjectModel.Size(0);
table.Top = new Reporting.ObjectModel.Size(0);
//UpdateReportItemFromTag(table, repRep.CurrentReport.ReportTableProperties, "Alignment;");
table.PageBreakAtStart = false;
table.KeepTogther = true;
table.FillPage = false;
double tableBottom = table.Top.Unit.Value + table.Height.Unit.Value;
double footerHeight = 0.5f;
double bodyHeight = report.PageHeight.Unit.Value - report.PageHeader.Height.Unit.Value - footerHeight;
report.Body.Height = new Reporting.ObjectModel.Size(bodyHeight);
report.Body.Columns = 1;
report.PageFooter.Height = new Reporting.ObjectModel.Size(footerHeight);
report.Body.ReportItems.Add(table);
// Table columns
double tableHeaderHeight = 0.25f;
double fontSize = Parse.ParseDouble(CommonUtils.Property.PropertyGet(repRep.CurrentReport.ReportTableProperties, "FontSize"));
double lineSpacing = Parse.ParseDouble(CommonUtils.Property.PropertyGet(repRep.CurrentReport.LineSpacingProperties, "LineSpacing"));
if (lineSpacing == 0) lineSpacing = 3;
tableHeaderHeight = fontSize * lineSpacing;
TableRow row = new TableRow(repRep.CurrentReport.ReportColumnCollection.ReportColumns.Count, new Reporting.ObjectModel.Size(Parse.ParseDouble(tableHeaderHeight.ToString())+"pt"), "tableHeader");
table.Header.TableRows.Add(row);
Textbox t;
colNo = 0;
// Table header
foreach (ReportColumn rc in repRep.CurrentReport.ReportColumnCollection.ReportColumns)
{
double colSize = rc.ColSize / repRep.CurrentReport.ColumnSizeAll * (table.Width.Unit.Value - report.LeftMargin.Unit.Value - report.RightMargin.Unit.Value);
table.TableColumns.Add(new TableColumn(colSize.ToString("0.00").Replace(",", ".")));
t = ((Textbox)row.TableCells[colNo].ReportItems[0]);
t.CanGrow = true;
t.CanShrink = true;
//t.Value.Value = StripSpecialCharacters(repRep.CurrentReport.ReportColumnCollection.ReportColumns[colNo].ColCaptionParsed); // rc.ColCaptionInter;
string fieldName = repRep.CurrentReport.ReportColumnCollection.ReportColumns[colNo].ColCaptionParsed;
//t.Value.Value = repRep.CurrentReport.ReportColumnCollection.ReportColumns[colNo].ColCaptionParsed;
t.Value.Value = fieldName;
//t.Value.Value = quote + fieldName + quote;
UpdateReportItemFromTag(t, repRep.CurrentReport.ReportTableProperties, "Alignment;Caption;Left;Top;Height;Width;");
if (t.Style.Color.Value.ToString() == "") t.Style.Color.Value = "Black";
if (t.Style.BackgroundColor.Value.ToString() == "") t.Style.BackgroundColor.Value = "Lightgray";
//t.Style.FontWeight.Value = "Bold";
string backColor = RdlColorFromLegacyTag(CommonUtils.Property.PropertyGet(repRep.CurrentReport.ReportTableProperties, "BackColor"), Color.LightGray);
if (backColor.StartsWith("A=128")) t.Style.BackgroundColor = new Expression<Color>("Lightgray");
SetCellBorder(t);
colNo++;
}
string textBoxNameForAddress = "";
// Sorting and Grouping inserting Header and Sum
for (int orderNo = 1; orderNo <= 5; orderNo++)
{
bool insertHeader = false;
bool insertSum = false;
if (repRep.CurrentReport.SortField[orderNo] != "" && repRep.CurrentReport.InsertHeader[orderNo]) insertHeader = true;
if (repRep.CurrentReport.SortField[orderNo] != "" && repRep.CurrentReport.InsertSum[orderNo]) insertSum = true;
if (insertHeader || insertSum)
{
// Table group 1
string groupName = repRep.CurrentReport.SortField[orderNo].Substring(repRep.CurrentReport.SortField[orderNo].IndexOf(".") + 1) + "_Group";
//string groupName = "ReportItems!" + repRep.CurrentReport.SortField[orderNo].Substring(repRep.CurrentReport.SortField[orderNo].IndexOf(".") + 1) + "_Group";
TableGroup group1 = new TableGroup();
Grouping grouping1 = new Grouping();
grouping1.Name = groupName;
//grouping1.GroupExpressions.Add(new Expression("=Fields!Investor.Value"));
//grouping1.GroupExpressions.Add(new Expression("=Fields!" + groupName));
Expression groupExpression = new Expression("=Fields!" + groupName + ".Value");
//groupExpression.Value = "=Fields!" + groupName+".Value";
grouping1.GroupExpressions.Add(groupExpression);
if (repRep.CurrentReport.SortField[orderNo] == repRep.CurrentReport.PageBreakField) grouping1.PageBreakAtEnd = true;
group1.Grouping = grouping1;
table.TableGroups.Add(group1);
Header header = new Header();
Footer footer = new Footer();
group1.Header = header;
header.RepeatOnNewPage = false;
group1.Footer = footer;
footer.RepeatOnNewPage = false;
if (insertHeader)
{
TableRow headerRow = new TableRow(repRep.CurrentReport.ReportColumnCollection.ReportColumns.Count, new Reporting.ObjectModel.Size(.25), "header" + orderNo + "Col");
group1.Header.TableRows.Add(headerRow);
//Build array for header text in all columns for the group
string[] headerTextArray = new string[repRep.CurrentReport.ReportColumnCollection.ReportColumns.Count];
//Check if the Header Text for the group is set to something other than default (empty)
string headerText = CommonUtils.Property.PropertyGet(repRep.CurrentReport.HeaderProperties[orderNo], "Caption");
if (headerText != "")
{
string[] headerFieldArray = headerText.Split('|');
for (int headerColNo=0; headerColNo < headerFieldArray.Length; headerColNo++)
{
if (headerFieldArray[headerColNo] == "[]")
{
headerTextArray[headerColNo] = "=Fields!" + groupName + ".Value";
}
else
{
headerTextArray[headerColNo] = headerFieldArray[headerColNo];
}
}
}
else
{
headerTextArray[0] = groupName.Replace("_Group", "") + " :";
headerTextArray[1] = "=Fields!" + groupName + ".Value";
}
//Set header text for all columns
colNo = 0;
foreach (ReportColumn rc in repRep.CurrentReport.ReportColumnCollection.ReportColumns)
{
//Set Header cell 1 (The Group field name)
t = ((Textbox)headerRow.TableCells[colNo].ReportItems[0]);
t.Name = "TextboxGroupHeader" + orderNo + "Column"+(colNo+1).ToString();
UpdateReportItemFromTag(t, repRep.CurrentReport.HeaderProperties[orderNo], "Caption;Left;Top;Height;Width;");
if (t.Style.Color.Value.ToString() == "") t.Style.Color.Value = "Black";
if (t.Style.BackgroundColor.Value.ToString() == "") t.Style.BackgroundColor.Value = "White";
SetCellBorder(t);
if (colNo < 2)
{
t.CanGrow = true;
t.CanShrink = true;
}
t.Value.Value = headerTextArray[colNo];
if (colNo == 2 && orderNo == 1 && repRep.CurrentReport.AddressCodeField != "")
{
//t.Style.Color = new Expression<Color>("White"); //To make the address invisible. Can't set it to invisible, as the header address also will be invisible
if (repRep.CurrentReport.PageBreakField == repRep.CurrentReport.SortField[orderNo])
{
//Textbox tableAddressCell = new Textbox();
//tableAddressCell.Name = "tableAddressCell";
t.Style.Color.Value = t.Style.BackgroundColor.Value;
string vbCrLf = ((Char)13).ToString() + ((Char)10).ToString();
//t.Value.Value = @"=Fields!AddressName.Value";
//t.Value.Value = @"=CStr(Fields!AddressName.Value) & Chr(13) & Chr(10) & IIf(CStr(Fields!POBox.Value)<>" + doubleQuotes + ",CStr(Fields!POBox.Value),CStr(Fields!AddressRoad.Value)) & Chr(13) & Chr(10) & CStr(Fields!AddressCity.Value) & IIF(CStr(Fields!Country.Value)<>" + doubleQuotes + ",Chr(13) & Chr(10) & CStr(Fields!Country.Value)," + doubleQuotes + ") & Chr(13) & Chr(10) & CStr(Fields!AttensionPerson.Value)";
t.Value.Value = @"=Fields!Header_AddressName.Value & Chr(13) & Chr(10) & IIf(Fields!Header_POBox.Value<>" + doubleQuotes + ",Fields!Header_POBox.Value,Fields!Header_AddressRoad.Value) & Chr(13) & Chr(10) & Fields!Header_AddressCity.Value & IIF(Fields!Header_Country.Value<>" + doubleQuotes + ",Chr(13) & Chr(10) & Fields!Header_Country.Value," + doubleQuotes + ") & Chr(13) & Chr(10) & Fields!Header_AttensionPerson.Value";
textBoxNameForAddress = t.Name;
}
}
colNo++;
}
}
if (insertSum)
{
//Group Sum row 1
string sumText = CommonUtils.Property.PropertyGet(repRep.CurrentReport.SumProperties[orderNo], "Caption");
bool lineFeedBefore = false;
bool lineFeedAfter = false;
if (sumText.StartsWith("<LF>")) lineFeedBefore = true;
if (sumText.EndsWith("<LF>")) lineFeedAfter = true;
sumText = sumText.Replace("<LF>", "");
if (lineFeedBefore)
{
TableRow lineFeedBeforeRow = new TableRow(repRep.CurrentReport.ReportColumnCollection.ReportColumns.Count, new Reporting.ObjectModel.Size(.25), "lf" + orderNo + "Col");
group1.Footer.TableRows.Add(lineFeedBeforeRow);
}
TableRow sumRow = new TableRow(repRep.CurrentReport.ReportColumnCollection.ReportColumns.Count, new Reporting.ObjectModel.Size(.25), "sum" + orderNo + "Col");
group1.Footer.TableRows.Add(sumRow);
if (lineFeedAfter)
{
TableRow lineFeedAfterRow = new TableRow(repRep.CurrentReport.ReportColumnCollection.ReportColumns.Count, new Reporting.ObjectModel.Size(.25), "lf" + orderNo + "Col");
group1.Footer.TableRows.Add(lineFeedAfterRow);
}
//Build array for sum text in all columns for the group
string[] sumTextArray = new string[repRep.CurrentReport.ReportColumnCollection.ReportColumns.Count];
//Check if the Sum Text for the group is set to something other than default (empty)
if (sumText != "")
{
string[] sumFieldArray = sumText.Split('|');
for (int sumColNo = 0; sumColNo < sumFieldArray.Length; sumColNo++)
{
if (sumFieldArray[sumColNo] == "[]")
{
sumTextArray[sumColNo] = "=Fields!" + groupName + ".Value";
}
else if (sumFieldArray[sumColNo].Contains("[]"))
{
sumTextArray[sumColNo] = "=" + quote + sumFieldArray[sumColNo].Replace("[]", quote + "& Fields!" + groupName + ".Value & " + quote) + quote;
}
else
{
sumTextArray[sumColNo] = sumFieldArray[sumColNo];
}
}
}
else
{
sumTextArray[0] = groupName.Replace("_Group", "") + " Total";
}
//Set SUM row
colNo = 0;
foreach (ReportColumn rc in repRep.CurrentReport.ReportColumnCollection.ReportColumns)
{
t = ((Textbox)sumRow.TableCells[colNo].ReportItems[0]);
t.CanGrow = true;
t.CanShrink = true;
t.Name = "TextboxSum" + orderNo + "Column" + (colNo + 1).ToString();
t.Style.BorderStyle = borderStyleSolid;
t.Style.BorderWidth = borderWidth1;
UpdateReportItemFromTag(t, repRep.CurrentReport.SumProperties[orderNo], "Alignment;Format;Caption;Left;Top;Height;Width;");
SetCellBorder(t);
ColumnTypeClass colType = new ColumnTypeClass(rc.ColType);
t.Style.TextAlign.Value = "Left";
//Set fixed text from Sorting and Grouping
t.Value.Value = sumTextArray[colNo];
string fieldName = ReplaceSpecialChars(repRep.CurrentReport.ReportColumnCollection.ColCaptions[colNo]);
//fieldName = "Fields!" + fieldName + ".Value";
if (colType.ColumnOrdinarySum && colType.InsertSumBreak)
{
t.Value.Value = "=Sum(Fields!" + fieldName + ".Value" + ")";
t.Style.Format = new Expression("#,##0");
t.Style.TextAlign.Value = "Right";
}
else if (colType.ColumnWeightSum && colType.InsertSumBreak)
{
t.Value.Value = "=Sum(Fields!" + fieldName + "SumFormula.Value+0.0000001)/Sum(Fields!" + fieldName + ".Value+0.0000001)";
t.Style.Format = new Expression("#,##0.00");
t.Style.TextAlign.Value = "Right";
}
else
{
/*if (colNo == 0)
t.Value.Value = groupName.Replace("_Group", "") + " Total";
else
t.Value.Value = "";*/
}
colNo++;
}
//INSERT CHART
if (repRep.CurrentReport.InsertGraph[orderNo])
{
//Chart
}
}
//Next Grouping level...
}
}
//Address
if (repRep.CurrentReport.ReportBase.AddressTable != "" && textBoxNameForAddress!="")
{
Textbox repItemAddress = new Textbox();
Style styleAddress = new Style();
repItemAddress.Name = "textBoxAddress";
styleAddress.BackgroundColor = Color.White;
styleAddress.FontFamily = new Expression("Arial");
styleAddress.FontSize = new Expression("8.25pt");
repItemAddress.Style = styleAddress;
repItemAddress.Height = new Reporting.ObjectModel.Size("94.82pt");
repItemAddress.Width = new Reporting.ObjectModel.Size("210.71pt");
repItemAddress.Top = new Reporting.ObjectModel.Size("27.6pt");
repItemAddress.Left = new Reporting.ObjectModel.Size("17.5pt");
//repItemAddress.Value.Value = new Expression("=ReportItems!TextboxGroupHeader1Column3.Value");
repItemAddress.Value.Value = new Expression("=ReportItems!"+ textBoxNameForAddress+".Value");
report.PageHeader.ReportItems.Add(repItemAddress);
}
//DATA ROW
TableRow dataRow = new TableRow(repRep.CurrentReport.ReportColumnCollection.ReportColumns.Count, new Reporting.ObjectModel.Size(.25), "dataCol");
table.Details.TableRows.Add(dataRow);
//Set DATA rows
colNo = 0;
foreach (ReportColumn rc in repRep.CurrentReport.ReportColumnCollection.ReportColumns)
{
t = ((Textbox)dataRow.TableCells[colNo].ReportItems[0]);
t.CanGrow = true;
t.CanShrink = true;
t.Name = "TextboxDataColumn" + (colNo + 1).ToString();
string fieldName = ReplaceSpecialChars(repRep.CurrentReport.ReportColumnCollection.ColCaptions[colNo]);
//t.Value.Value = "={" + fieldName + "}";
t.Value.Value = "=Fields!" + fieldName + ".Value";
UpdateReportItemFromTag(t, repRep.CurrentReport.LineSpacingProperties, "Alignment;Format;Caption;Left;Top;Height;Width;");
SetCellBorder(t);
t.Style.TextAlign.Value = "Left";
ColumnTypeClass colType = new ColumnTypeClass(rc.ColType);
if (colType.ColumnOrdinarySum)
{
t.Style.Format = new Expression("#,##0");
t.Style.TextAlign.Value = "Right";
}
else if (colType.ColumnWeightSum)
{
t.Style.Format = new Expression("#,##0.00");
t.Style.TextAlign.Value = "Right";
}
else if (colType.ColumnDate)
{
t.Style.Format = new Expression("d");
}
//t.Style.BorderStyle = borderStyleSolid;
//t.Style.BorderWidth = borderWidth1;
colNo++;
}
}
catch (Exception ex)
{
GlobalLog.StaticLog.Log(ex, ex.Message, Logger.LogLevel.Error, "GetRDLReport");
report.Code = ex.Message;
}
return report;
}