On Jan 10, 12:22*am, forest demon <mete.ha...@gmail.com> wrote:
> On Jan 9, 11:25*pm, "Alberto Poblacion" <earthling-
>
>
>
>
>
> quitaestoparacontes...@poblacion.org> wrote:
> > "forest demon" <mete.ha...@gmail.com> wrote in message
>
> >news:f159c9fb-459c-4e6a-a865-(E-Mail Removed)...
>
> > > what i'm trying to do is attach a report file to a reportviewer
> > > instance with some values from a page. i can attach a dataset to
> > > the .rdlc file with stuff from a datasource, but i need to also add
> > > values form a pages web controls to the same report.
>
> > > it was recommended, on here, that i create a dataset in memory and add
> > > that to the report. *i'm not sure how to do that at this point without
> > > a datasource. *i'm drawing a blank.
>
> > * * Simply build the dataset step by step by adding to its collections in
> > your code:
>
> > DataSet ds = new DataSet();
> > DataTable dt = new DataTable("name");
> > ds.Tables.Add(dt);
> > dt.Columns.Add("Col1", typeof(string));
> > dt.Columns.Add("Col2", typeof(int));
> > dt.Rows.Add(new object[]{"value1", 123});
> > dt.Rows.Add(new object[]{"value2", 456});
> > //Now ds is a dataset that contains one table with two columns and two rows
>
> should i cast the value prior to adding it to the row?
> if not, i get the DataRow type when trying to use the text value in
> the array.
>
> thanks...- Hide quoted text -
>
> - Show quoted text -
oh geesh...nevermind. i figured it out. sorry....
thanks again for your help. i do appreciate it.
-
fd
|