or
void ReportViewer1_RenderBegin(object sender, RenderBeginEventArgs args)
{
//single value parameter
args.ParameterValues["FormNumber"] = "ABC1";
args.ParameterValues["FormID"] = 10;
}
class
ReportBook2 : Telerik.Reporting.ReportBook
{
public
ReportBook2()
{
this
.Reports.Add(
new
Report1());
this
.Reports.Add(
new
Report2());
this
.Reports[0].DocumentMapText =
"Dash Board"
;
this
.Reports[1].DocumentMapText =
"Product Sales"
;
}
}
private
void
detail_ItemDataBound(
object
sender, EventArgs e)
{
Telerik.Reporting.Processing.DetailSection detailSection = (Telerik.Reporting.Processing.DetailSection)sender;
TransportListDocument doc = (TransportListDocument)detailSection.DataObject.RawData;
if
(doc !=
null
)
{
if
( String.IsNullOrEmpty(doc.Memo))
{
txtMemo.Visible =
false
;
captionMemo.Visible =
false
;
}
txtType.Value = Translator.Translate(
"_"
+ doc.DocumentType);
listId = doc.TransportListId;
driverId = doc.Driver.Id;
customerId = doc.Customer.Id;
addressId = doc.Address.Id;
}
}
private
void
subCarriers_NeedDataSource(
object
sender, EventArgs e)
{
Telerik.Reporting.Processing.SubReport subReport = (Telerik.Reporting.Processing.SubReport)sender;
if
(listId > 0 && driverId > 0 && customerId > 0 && addressId > 0)
{
AmountOfCarriers
amountOfCarriers =
DataFacade.Transport.DFCarrier.GetAmountOfCarriers(listId, driverId,
CustomerId, addressId, LanguageId, BranchId);
if
(amountOfCarriers !=
null
&& amountOfCarriers.Count > 0)
{
subTLCarriers1.SetPrivateDataMembers(Translator, LanguageId);
subTLCarriers1.DataSource = amountOfCarriers;
}
}
}
private
void
groupFooterAddress_ItemDataBound(
object
sender, EventArgs e)
{
Telerik.Reporting.Processing.ReportSection addressGroupSection = ((Telerik.Reporting.Processing.ReportSection)sender);
Telerik.Reporting.Processing.Group customerGroup = ((Telerik.Reporting.Processing.Group)addressGroupSection.Parent.Parent);
Telerik.Reporting.Processing.Group driverGroup = ((Telerik.Reporting.Processing.Group)customerGroup.Parent);
TransportListDocuments docs = (TransportListDocuments)addressGroupSection.Report.DataSource;
int
selectedAddressId = ((Address)addressGroupSection.DataObject[
"Address"
]).Id;
int
selectedCustomerId = ((ObjectModel.Customer.Customer)(customerGroup.GroupHeader.DataObject[
"Customer"
])).Id;
int
selectedDriverId = ((Driver)(driverGroup.GroupHeader.DataObject[
"Driver"
])).Id;
AmountOfCarriers amountOfCarriers = DataFacade.Transport.DFCarrier.GetAmountOfCarriers(docs[0].TransportListId, selectedAddressId, selectedCustomerId, selectedDriverId, LanguageId, BranchId);
if
(amountOfCarriers !=
null
&& amountOfCarriers.Count > 0)
{
subTLCarriers1.SetPrivateDataMembers(Translator, LanguageId);
subTLCarriers1.DataSource = amountOfCarriers;
}
}
protected void MainRadGrid_PreRender(object sender, EventArgs e)
{
foreach (GridDataItem dataItem in MainRadGrid.MasterTableView.Items)
{
int previousItemIndex = dataItem.ItemIndex - 1;
if (previousItemIndex >= 0)
{
if (dataItem["Number"].Text == dataItem.OwnerTableView.Items[previousItemIndex]["Number"].Text)
{
dataItem.OwnerTableView.Items[previousItemIndex]["Number"].RowSpan = 4;
dataItem.OwnerTableView.Items[previousItemIndex]["Number"].BackColor = System.Drawing.Color.FromName("#FAF8BB");
dataItem["Number"].Visible = false;
}
if (dataItem["Color"].Text == dataItem.OwnerTableView.Items[previousItemIndex]["Color"].Text)
{
dataItem.OwnerTableView.Items[previousItemIndex]["Color"].RowSpan = 2;
dataItem.OwnerTableView.Items[previousItemIndex]["Color"].BackColor = System.Drawing.Color.FromName("#B6F1FA");
dataItem["Color"].Visible = false;
}
}
}
}
Hello. I use teleric reporting for ASP.NET MVC
I want to make visibility of one report's parameter is depend from value of another report parameter.
If parameter "1" is equal to "Value1" I need to specify report's conditions with parameter "2", but if parameter "1" is equal to "Value2" parameter "2" is lost sense and I want to hidden it. (parameter "1" use AvailableValues mode)
Can I implement this scenario? I didn't found parameter changed value event? Is exist another way
Thank you.
Vladislav