This is a migrated thread and some comments may be shown as answers.

How Get The value Of Cell

3 Answers 55 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Waqas
Top achievements
Rank 1
Waqas asked on 04 Jan 2012, 01:27 PM
Hello Every one !
i have two reports , 1- contracts list and 2- contract detail , now i want that if i click on the contract id the 2nd report contract detail will open , i used action property of the column contract id , but i cant able to get the value of that clicked cell , i want contract id so that i can pass it as a parameter to my 2nd report , it is very urgent , please give me solution or guide to solve this issue , Thanks in advance , and sorry for my bad english :(

Best Regards

M.Waqas Aslam

3 Answers, 1 is accepted

Sort by
0
Squall
Top achievements
Rank 1
answered on 04 Jan 2012, 05:05 PM
Hi,
How you have set the contract id textbox value? I suppose you have bound it to datasource field. If this is the case you can directly set the action parameter to the same field as you have set the textbox value.
SN
0
Waqas
Top achievements
Rank 1
answered on 05 Jan 2012, 06:30 AM
i use need data source to assign datasource to the report , please help me here is my code , please can any one tell me how to send the value from the one report to 2nd , as i mentioned in my question , Regards
private void rptContractDetail_NeedDataSource(object sender, EventArgs e)
      {
          FDate = ClsParamerters.FDate;
          TDate = ClsParamerters.TDate;
          Product = ClsParamerters.Product;
          Party = ClsParamerters.Party;
          City = ClsParamerters.City;
          Ex = ClsParamerters.Ex;
          WB = ClsParamerters.WB;
          PartyType = ClsParamerters.Partytype;
          ContractID = ClsParamerters.ContractID;
          //if (FDate.Equals(""))
          //    FDate = "2000-12-12";
          //if (TDate.Equals(""))
          //    TDate = "2050-12-12";
          String MyWhere;
          MyWhere = @"select DeliveryOrderId ,DeliveryOrderDate ,TotalPcs ,rate , [Size/Wt] ,vehicleNo ,NetWeight ,LocationName ,ContractId ,ContractDate ,ProductName ,QtyContract ,ProductRate ,Ex ,WB ,EmptyBagRate ,commission ,Remarks  from (
                      select db.DeliveryOrderId ,do.deliveryorderdate,db.QtyToDeliver  as 'TotalPcs' ,
                      c.productrate as 'rate',c.RateUnitSize as 'Size/Wt',do.VehicleNr as 'vehicleNo'
                      ,db.NetWeight,lc.locationname,db.ContractId ,c.ContractDate ,pro.productName,
                      c.QtyContract ,c.ProductRate ,c.IsExSellerRate as 'Ex',c.IsRateWithBag as 'WB' , c.EmptyBagRate ,
                      c.ComRate as 'commission',c.Remarks
                      from DeliveryOrdersBody db
                      inner join DeliveryOrders do on do.DeliveryOrderId  = db.DeliveryOrderId 
                      inner join Contracts c on db.ContractId = c.ContractId and db.IsSellerContract = c.IsSellerContract
                      inner join AccPartyDetails pd on c.PartyAccountNo = pd.AccountNo
                      inner join AccLocations lc on pd.LocationId  = lc.LocationId
                      inner join DefProduct pro on c.ProductId  = pro.ProductId
                      ) as n ";
           
          SqlConnection Conn = new SqlConnection(MyConnString);
          DataTable dt = new DataTable();
          Conn.Open();
          SqlCommand cmd = new SqlCommand(MyWhere, Conn);
          string chk;
          foreach (SqlParameter Parameter in cmd.Parameters)
          {
              if (Parameter.Value == null)
                  Parameter.Value = DBNull.Value;
          }
          SqlDataAdapter da = new SqlDataAdapter(cmd);
          da.Fill(dt);
 
          this.table1 .DataSource = dt;
          Conn.Close();
      }
0
Peter
Telerik team
answered on 09 Jan 2012, 01:22 PM
Hi Waqas,

How to setup a Drillthrough Report Action is elaborated in the How to: Add a Drillthrough Report Action help article. Additionally you may find useful the Creating Drillthrough Reports in Telerik Reporting video.

All the best,
Peter
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Tags
General Discussions
Asked by
Waqas
Top achievements
Rank 1
Answers by
Squall
Top achievements
Rank 1
Waqas
Top achievements
Rank 1
Peter
Telerik team
Share this question
or