Showing posts with label event. Show all posts
Showing posts with label event. Show all posts

Wednesday, March 7, 2012

How to Add an event to CRI controls

Hi all,

I am trying to develop a CustomReportItem similar to Matrix control. Is it possible to add some "OnClick" sort of events to a section of this CRI (As a drilldown button of matrix control allows to expand the respective column).

Please help me if there can be any solution.

I think it not possible to do that.

Report is web page , is not the application window.

sort the date, you can add a sort report parameters,

different parameters, show different matrix.

|||

Are you asking about design time or runtime?

While the CRI runtime control can generate drillthrough actions based on an image map, currently you cannot fully simulate the matrix group toggle behavior. You would rather need to work around it with report drillthrough actions and encoding the toggle state in parameter values.

-- Robert

|||

Hi Robert,

Thanks for ur response

I am asking it for runtime. How can I encode the toggle state in parameter values and how will it help to solve my problem? Please explain, as I am new to this tool.

|||

For every toggle icon, you could use a boolean report parameter to encode its state (e.g. expanded = true, collapsed = false). Another option is to encode the state of multiple toggles into an integer parameter (by using it as a bitfield) or maybe as string parameter.

For the CRI runtime control you would need to pass the parameter values as custom property values so that you can see the current toggle state (i.e. report parameter values) from within your CRI runtime code. Then you would need to draw the toggle icons as part of the image generated by the CRI runtime control. In addition you need to generate an image map over the toggle icon with a drillthrough action that drills to the same report with a report parameter value that has the opposite value of the currently drawn toggle state.

For example, if there is only one toggle and the toggle icon drawn is shown as expanded (with a report parameter representation as =True), you would add an image map area with a drillthrough action that passes the report parameter with the boolean value =False.

-- Robert

Sunday, February 19, 2012

How to access underlaying DataView of SQLDataSouce in its Selected event

I need access to the underlying DataView associated with a declaratively defined SQLDataSource. Ideally, I need this access in the SQLDataSource'sSelected event. I know that I can use the SQLDataSouce.Select()method to return the underlying DataView object. But, there is a GridView control bound to the datasource so I don't want to explicity call Select() since it will end up being called again implicity by the gridview itself. I have seen that this can be done with an ObjectDataSouce as follows:

void odsDataSouce_Selected(object sender, ObjectDataSourceStatusEventArgs e) {
DataView oDV = (DataView)e.ReturnValue;
}

Is there any way to accomplish the same thing with a SQLDataSouce? It seems hard to believe that the query results are not exposed to the Selected event.

Thanks!

have a look through my posts to see how to get the underlying data table, and this all rows/columns|||

sbyard,

I saw your post about how to use a sqldatasource programmatically but that still involves using the select() method. In my situation a gridview is bound to the datasource so the select is implicit. I need access to the data in an event such as the selected event.

Thanks

|||

You cannot get to the underlying data the way that you want to. However...

By the time the selected event is raised, the grid will be populated, so you can iterate the rows and columns.

If you want to process the data BEFORE it is bound, then you wil have to create your own data table and fill this manually, process the data, then bind it. This is what we were mostly doing in ASP.NET 1.1 anyway.

|||Thanks for your help.