Page 1 of 1
Setting Height of different databands inside panel.
Posted: Fri Jan 03, 2014 6:35 am
by shivkrsingh
Hi,
I have multiple databands on different panels. I want to align data of each databand. It should behave like a row. how can do this. I have attached my sample.
Thanks
Re: Setting Height of different databands inside panel.
Posted: Fri Jan 03, 2014 8:19 am
by HighAley
Hello.
The answer on this question was done on the
next topic. You should make some changes in that code.
Thank you.
Re: Setting Height of different databands inside panel.
Posted: Fri Jan 03, 2014 9:18 am
by shivkrsingh
hi,
I had done accordingly but it takes height of highest data and applied that height to all rows. whether it has only one line. it should be according to highest data of each row. not same height for all rows.
thanks
Re: Setting Height of different databands inside panel.
Posted: Fri Jan 03, 2014 10:38 am
by Alex K.
Hello,
In this report you need check the max height for each line, save it and set in second pass.
Thank you.
Re: Setting Height of different databands inside panel.
Posted: Fri Jan 03, 2014 10:56 am
by shivkrsingh
hello,
I know this but for every row we have to create a variable to save height. and we don't know exactly how much rows are there. Is there any scenario in which we can just get height of one printing row and set it before printing and so on for others???
thanks
Re: Setting Height of different databands inside panel.
Posted: Fri Jan 03, 2014 12:37 pm
by Alex K.
Hello,
As a way, you can add the additional array or hashtable(for example where key is Line and value is height) in which save the max height for each line. And in second pass set these values.
Thank you.
Re: Setting Height of different databands inside panel.
Posted: Mon Jan 06, 2014 10:14 am
by shivkrsingh
hello,
I have can you please help me with an example or its link related to hashtable.
thanks
Re: Setting Height of different databands inside panel.
Posted: Mon Jan 06, 2014 11:27 am
by Alex K.
Re: Setting Height of different databands inside panel.
Posted: Tue Jan 07, 2014 10:00 am
by shivkrsingh
Hello,
I am trying to read height of all rows of databand by the given code
protected void Page_Load(object sender, EventArgs e)
{
Hashtable ht = new Hashtable();
StiReport report = new StiReport();
report.Load(Server.MapPath("mrt/PrintView.mrt"));
report.Compile();
rptPrintView.Report = report;
StiDataBand dbS1H = (StiDataBand)report.CompiledReport.GetComponentByName("dbS1H");
if (!ReferenceEquals(dbS1H, null))
{
int i = 0;
foreach (var component in dbS1H.GetComponents())
{
StiText text = (StiText)component;
if (!ReferenceEquals(text, null))
{
double colHeight = text.Height;
ht.Add(i++, colHeight);
}
}
}
}
it reads only one row Height. how can I read height of all rows which comes in this databand.
thanks
Re: Setting Height of different databands inside panel.
Posted: Thu Jan 09, 2014 6:49 am
by Alex K.
Hello,
You check the hight in the report template, please try to check it in the rendered report.
Thank you.