Page 1 of 2
take report of DataGrid
Posted: Thu Sep 17, 2015 8:29 pm
by Aqeel
Hi dear Engineers
My Data-grid in C# was filled with some information
Now I want when the user for example,choose row 1, and click the print button ... only the data of row 1 send to the report !!!!
thank u
Re: take report of DataGrid
Posted: Fri Sep 18, 2015 9:03 am
by HighAley
Hello.
You could register the data with RegData() method before showing the report.
You should prepare the data in your code and can do it any available way.
Thank you.
Re: take report of DataGrid
Posted: Sun Sep 20, 2015 10:26 pm
by Aqeel
Thank you for your answering But the problem not solved...
I register the data of one row to a dataTable that named "" sr "" with this code:
Code: Select all
getNum = dataGridView1.CurrentRow.Cells["Column2"].Value.ToString();
sr.Clear();
sqlcom.CommandText = "select * from Tbl_Add where Num='" + getNum + "'";
sqlda.Fill(sr);
and this code work correctly.(only the data of a row that i choose send to the sr )
but when i send them to stimul
Code: Select all
stiReport1.RegData(sr);
stiReport1.Show();
Only the information of first line be displayed!!!!
how can i solved this!!?
Re: take report of DataGrid
Posted: Mon Sep 21, 2015 12:28 pm
by Alex K.
Hello,
Please try to place the DataBand on the page with your datatable.
Thank you.
Re: take report of DataGrid
Posted: Mon Sep 21, 2015 4:40 pm
by Aqeel
I'm do it , and when i click the print button the data of all the row in DataGrid is send to the report...
But I don't want this

Re: take report of DataGrid
Posted: Tue Sep 22, 2015 7:53 am
by HighAley
Hello.
What do you need to get? Maybe we don't understand your task.
Could you describe your issue in details with samples?
Thank you.
Re: take report of DataGrid
Posted: Tue Sep 22, 2015 11:58 am
by Aqeel
OK!
i hava a DataGrid in visual (c#) like attachment number 1...
and my report view is like picture number 2
i want when the user choose row 1 in DataGrid and click the Print button the result in the report displayed like picture 3
I hope you understand what I want
Re: take report of DataGrid
Posted: Tue Sep 22, 2015 12:40 pm
by Alex K.
Hello,
Please try to use the following expressions in the Text component:
{DataSourceName.id}, {DataSourceName.name}, etc
where DataSourceName is name of data source which registered in the report.
Thank you.
Re: take report of DataGrid
Posted: Tue Sep 22, 2015 4:49 pm
by Aqeel
Thank for the answer
the data has been send to the report(this is not the problem(I deliberately wrote the headlines in Photo 2 ))
but the data of all the row in the datagrid is send to the report and i want only one row
Re: take report of DataGrid
Posted: Wed Sep 23, 2015 6:06 am
by HighAley
Hello.
Please, send us your report template with the screen-shots of the report to
support@stimulsoft.com for analysis.
Thank you.