I have a report with the following set up, the issue is that i need to grab the OrderDate into my link, but when I use HtmlItemCreated , the OrderDate is created after the CreditCard label so I cant ever grab the text of the OrderDate label. Or how can I do this?, I know I can grab the e.Brick.Text when I am in the HtmlItemCreated but, I cant do it there because its being created first then the other one that has the value. This is being created first
private void xrLabel200_HtmlItemCreated(object sender, HtmlEventArgs e)
and then this
private void OrderDate_HtmlItemCreated(object sender, HtmlEventArgs e)
My Issue again is that I need the OrderDate created in the OrderDate_HtmlItemCreated but , its being generated after it has gone through xrlabel200's evernt handler.
I dont know what to do I have tried changing the positions of the handlers etc.. and nothing.. here is a snapshot of the report if anyone can help me out
The OrderDate is at the header, the CardType is a link and thats where I am trying to append the date.. as follows
under
private void xrLabel200_HtmlItemCreated(object sender, HtmlEventArgs e)
{
string cardTypeName = e.Brick.Text;
switch (cardTypeName)
{
case "N/A":
CardTypeID = 0;
break;
case "MASTER CARD":
CardTypeID = 1;
break;
}
//OrderDate.Text is always returning XRLabel3 (which is the name) because it has not been populated
link.HRef = string.Format("mywebsite.aspx?sDate={0}&ctId={2}", OrderDate.Text, CardTypeID);
link.InnerText = e.Brick.Text;
link.Target = "blank";
currentCell.Controls.Clear();
currentCell.Controls.Add(link);
currentCell.Attributes.Remove("onmousedown");
}
Cant you base your code on the contents of the underlying datasource rather than the displayed report contents?
Doing this would mean you have no requirements to process code in a specific order.