1 year ago
#345637
kvj
I am trying to create an RDLC Report in C# with multiple SQL Queries. Is this possible? I've included a picture with the Layout I am trying to create
Basically every text box/tablinx is associated with a SQL Query
First text box Ship quantity
private SampleData GetData()
{
string constr = ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString;
string query = "Select sum(ship_qty) from dbo.salesorders";
SqlCommand cmd = new SqlCommand(query);
Second Text box Ship value string query = "Select sum(ship_value) from dbo.salesorders";
Third Text box Order value string query = "Select sum(order_value) from dbo.salesorders";
Fourth Text Box Total Order quantity string query = "Select sum(order_quantity) from dbo.salesorders";
I've added the table dbo.salesorders to the Dataset as a Table Adapter. when I run build and run the application I don't get any values in the tablinx(I've only tried the first tablinx so far)
But when I change th Query to "Select ship_qty" from dbo.salesorders I'm getting all the values for that column. I don't want all the values I just need the sum.
Any ideas if this layout is possible to implement?
Thanks.
c#
visual-studio
rdlc
0 Answers
Your Answer