Adding rows and columns to report in code

Hi.
Im not sure what im doing wrong. Im trying to add rows from C# code (in Visual studio) to my table, but it doenst show anything:
FastReport.Report newrep = new FastReport.Report();
 newrep.Load(@"..\..\SzablonyCR\Rep1.frx");
 FastReport.Table.TableObject Table1 = (FastReport.Table.TableObject)newrep.FindObject("Table1");
then in loop:
for (.....){
                                       tc.Text = item.nazwaDluga;
                                        tr.AddChild(tc);

                                        tc = new FastReport.Table.TableCell();
                                        tc.Text = item.ilosc.ToString();
                                        tr.AddChild(tc);
                                        Table1.Rows.Add(tr);
}

Can anyone help? >

Comments

  • edited 12:36PM
    Ok, it works now. Dont know why, but font was white...
    Now can anyone help me with creating custom table?
    I need something like:
    ______________________
    |__________|__________|
    |_____________________|

    but all i can create is just 2 columns, cant set that row 0 columns count = 2, row 1 columns count = 1.
  • edited 12:36PM
    nevermind, got it.
  • JasonColeyNZJasonColeyNZ New Zealand
    edited 12:36PM
    Can you please provide some code here on how to add columns to a table object, I can't seem to get this working, I get Fill cannot be null errors?

    I am using the latest .NET build and C#

    Cheers
    Jason

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.