Setting Height of different databands inside panel.

Stimulsoft Reports.NET discussion
Post Reply
shivkrsingh
Posts: 24
Joined: Wed Dec 04, 2013 8:52 am

Setting Height of different databands inside panel.

Post 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
Attachments
Test.rar
(3.64 KiB) Downloaded 282 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Setting Height of different databands inside panel.

Post by HighAley »

Hello.

The answer on this question was done on the next topic. You should make some changes in that code.

Thank you.
shivkrsingh
Posts: 24
Joined: Wed Dec 04, 2013 8:52 am

Re: Setting Height of different databands inside panel.

Post 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
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Setting Height of different databands inside panel.

Post 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.
shivkrsingh
Posts: 24
Joined: Wed Dec 04, 2013 8:52 am

Re: Setting Height of different databands inside panel.

Post 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
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Setting Height of different databands inside panel.

Post 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.
shivkrsingh
Posts: 24
Joined: Wed Dec 04, 2013 8:52 am

Re: Setting Height of different databands inside panel.

Post by shivkrsingh »

hello,

I have can you please help me with an example or its link related to hashtable.

thanks
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Setting Height of different databands inside panel.

Post by Alex K. »

Hello,

Please check the following topic:
http://msdn.microsoft.com/en-us/library ... .110).aspx

Thank you.
shivkrsingh
Posts: 24
Joined: Wed Dec 04, 2013 8:52 am

Re: Setting Height of different databands inside panel.

Post 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
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Setting Height of different databands inside panel.

Post by Alex K. »

Hello,

You check the hight in the report template, please try to check it in the rendered report.

Thank you.
Post Reply