can I read like datasource to MSSQL xml datatype on fastreport.

edited 12:22PM in FastReport .NET
I have xml datafield in my table.
my report have a lot of litle table different size, columns, rows.
and I save table name, cols, rows and data in xml data field and read with a query.
how I print in my databand with table object this xml datas.

Comments

  • edited 12:22PM
    I found solution

    private void Table1_ManualBuild(object sender, EventArgs e)
    {
    DataSourceBase data = Report.GetDataSource("TESTKALEM");
    data.Init();

    DataSet DS=new DataSet();
    XmlDocument doc=new XmlDocument();
    doc.LoadXml(data["XMLDATA"].ToString());
    DS.ReadXml(new XmlNodeReader(doc));
    int colCount = DS.Tables[0].Columns.Count;
    Table1.PrintRow(0);
    for (int i = colCount-1; i >=0; i--)
    if(DS.Tables[0].Columns.ColumnName!="SIRA")
    {
    Cell1.Text = DS.Tables[0].Columns.ColumnName;
    Table1.PrintColumn(0);
    }
    for(int j=0;j<DS.Tables[0].Rows.Count;j++)
    {
    Table1.PrintRow(1);
    for (int i = colCount-1; i >=0; i--)
    if(DS.Tables[0].Columns.ColumnName!="SIRA")
    {
    DataRow dr=DS.Tables[0].Rows[j];
    Cell2.Text = dr[DS.Tables[0].Columns].ToString();
    Table1.PrintColumn(0);
    }
    }

    }

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.