How to insert cell values code behind

Stimulsoft Reports.NET discussion
Post Reply
pizzatto
Posts: 3
Joined: Wed Jul 24, 2013 8:19 pm
Location: Brazil

How to insert cell values code behind

Post by pizzatto »

Hello,

I've attempted to insert text values into a table dynamically without DataSource and i didnt find the correct attribute that i'll fill.

Someone could help me ?

obs:

My cell code:

Stimulsoft.Report.Components.Table.StiTableCell Table1_Cell1 = new Stimulsoft.Report.Components.Table.StiTableCell();
Table1_Cell1.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, 4.8, 0.8);
Table1_Cell1.ID = 1;
Table1_Cell1.JoinCells = new int[0];
Table1_Cell1.Name = "Table1_Cell1";
Table1_Cell1.Restrictions = (((Stimulsoft.Report.Components.StiRestrictions.None | Stimulsoft.Report.Components.StiRestrictions.AllowMove)
| Stimulsoft.Report.Components.StiRestrictions.AllowSelect)
| Stimulsoft.Report.Components.StiRestrictions.AllowChange);
Table1_Cell1.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.All, System.Drawing.Color.FromArgb(255, 105, 105, 105), 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.FromArgb(255, 105, 105, 105)), false);
Table1_Cell1.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
Table1_Cell1.Font = new System.Drawing.Font("Arial", 9F);
Table1_Cell1.Guid = null;
Table1_Cell1.Indicator = null;
Table1_Cell1.Interaction = null;
Table1_Cell1.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
Table1_Cell1.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
Table1_Cell1.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: How to insert cell values code behind

Post by Alex K. »

Hello,

Can you please describe your task in more details. Also please check the sample how to create a report in code in the attachment.

Thank you.
Attachments
DynamicCreateReport.zip
(15.46 KiB) Downloaded 265 times
pizzatto
Posts: 3
Joined: Wed Jul 24, 2013 8:19 pm
Location: Brazil

Re: How to insert cell values code behind

Post by pizzatto »

Hi, thanks for helping.

I attempted to follow your example, but I got an error "object reference not set instance object"

I attached my example project.(The XSD and XML file are in rar file).

Thanks
Attachments
CreateChartInRunTime.rar
(55.77 KiB) Downloaded 237 times
pizzatto
Posts: 3
Joined: Wed Jul 24, 2013 8:19 pm
Location: Brazil

Re: How to insert cell values code behind

Post by pizzatto »

Is possible to use StiDataBand without a DataTable or DataSet ??
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to insert cell values code behind

Post by HighAley »

Hello.

The error is because you set the same name for the DataSource and the DataBand.

Thank you.
Post Reply