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

Report with multiple textfields, if some are empty adjust the rest.

5 Answers 36 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
mSchmidt
Top achievements
Rank 1
mSchmidt asked on 13 Nov 2008, 09:53 AM
Hi i have a report where i show multiple information on a specific article.

Sales price :      10,00
Cost price           2,00
Comment:             Hi
Stocked amount: 120


The report looks something like the above just with more fields.
The thing is i dont want to show the comment line (nor the cost price) if they are empty and just making it invisible will make the report look wierd with holes.
So what i want is the stocked amount/comment to move up if something above is set to invisible.

5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 13 Nov 2008, 12:07 PM
Hi mSchmidt,

Take a look at the following forum thread which elaborates on the matter and let us know if further help is needed.

All the best,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
mSchmidt
Top achievements
Rank 1
answered on 14 Nov 2008, 07:41 AM
Thanks.

I guess iam going to go with hiding and adjusting all others, however i am having problem finding an event that fires after the data has been bound to the report. i Tried

 

private void CalculationReport_ItemDataBound(object sender, System.EventArgs e)

 

{

 

    if (decimal.Parse(textBox7.Value) == 0)

 

    {

        textBox7.Visible =

false;

 

        textBox11.Visible =

false;

 

    }

}

However at the time the value is this "=Field.[sales_price]"
Which event should i do this at ?

0
Steve
Telerik team
answered on 14 Nov 2008, 02:10 PM
Hi mSchmidt,

Have you tried using the Text property instead?

All the best,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
mSchmidt
Top achievements
Rank 1
answered on 16 Nov 2008, 11:54 AM
My Telerik.Reporting.Textbox does not have a Text Property.
0
Steve
Telerik team
answered on 17 Nov 2008, 02:00 PM
Hello mSchmidt,

Generally when working with the report events, you need to use the Processing instance of the report items - sample code available in this help article.

Sincerely yours,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
mSchmidt
Top achievements
Rank 1
Answers by
Steve
Telerik team
mSchmidt
Top achievements
Rank 1
Share this question
or