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

Managing item and data in reports Events - HELP

4 Answers 55 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vittorio Morellini
Top achievements
Rank 1
Vittorio Morellini asked on 03 Dec 2009, 04:45 PM
I'm using Telerik Q2 2009 Reporting
I want to calculate a count(*) via oql.
I want to use detail itemdatabound of a group footer.
I want to put the result in a textbox I've added in the footer.
I tryed everything but always I got an error,

For example:

Telerik.Reporting.Processing.

DetailSection section = sender as Telerik.Reporting.Processing.DetailSection;

 

Telerik.Reporting.Processing.

ReportItem commessaItem = (Telerik.Reporting.Processing.ReportItem)section.ChildElements.Find("txtIdCommessa", false)[0];

 


My textbox is called txtIdCommessa, but I try also with:

Telerik.Reporting.

DetailSection section = sender as Telerik.Reporting.DetailSection;

 

Telerik.Reporting.

TextBox commessaItem = (Telerik.Reporting.TextBox)section.Items.Find("txtIdCommessa", false)[0];

 


and i've got an error.

Is it possibile to set value in the event of section
also the command:

txtConteggioUtenze.Value =

"Test";
 
does not print nothing.

Can anyone suggest me the object to use to handle the value of a text box or the event to use ?
do I have to use the item events to manage their values ?

I'm attaching also the report.cs to have support

 

4 Answers, 1 is accepted

Sort by
0
Chris Gillies
Top achievements
Rank 1
answered on 04 Dec 2009, 01:52 PM
What is the error that you receive. As far as I can tell your code looks correct and pretty much covers this topic from the documentation: How do I access items from report and calling application.
One thing to note is that you should use the processing object to set the value not the definition (if txtConteggioUtenze is definition).

Cheers
0
Vittorio Morellini
Top achievements
Rank 1
answered on 04 Dec 2009, 02:25 PM
txtConteggioUtenze is a textbox on the report.

I use processing item to set the value, I want to print a vakue in the textbox called txtConteggioUtenze
Actually i do not have an error, I have no response from the event and nothing is print
Sorry, I'm not able to reach the link you posted,can you check it ?

Debugging the report not all the instructions are evaluated, but some istructions are not reacheable. Is it normal ?

The first time I run the report nothing is printed, the second time the text box is filled in both the event:
itemdatabinding
itemdatabound

like the event is already passed to print the value, but if I use itemAdd the program does not run in the event.
Any other suggest ?

Thanks,
Vittorio 
0
Vittorio Morellini
Top achievements
Rank 1
answered on 04 Dec 2009, 02:52 PM
are you telling that I have to set the value of the commessaitem reportItem I've extracted ?

because commessaItem is the key of the oql query

the result I want to put in the textbox: txtconteggioutenze  using its value

Maybe this is the problem, I have to set the value of the reportItem base
is it true ? 
0
Vittorio Morellini
Top achievements
Rank 1
answered on 11 Dec 2009, 04:02 PM
Now It's solved, using the link you suggested me I've understood the problem and how to use the processing item and the Report Events.

King Regards
Tags
General Discussions
Asked by
Vittorio Morellini
Top achievements
Rank 1
Answers by
Chris Gillies
Top achievements
Rank 1
Vittorio Morellini
Top achievements
Rank 1
Share this question
or