Hi All,
I'm new to Reporting. Just wondering how to call a Sub Procedure from Report Textbox Action to use Ajax?
Here's the scenario:
- Parent Aspx Page With the sub procedure to be called.
- Asp: Placeholder added to Parent Page
- User Control (with Report viewer) Added to Placeholder
- Report with Textbox that has action to call Parent Sub Procedure to change the user control on Asp: Placeholder?
Condition: It will be done using Ajax, when changing user control based on field.value. Is this possible? (My preferred solution)
(Optional)
If I'll be using navigateurl it will do postback and also we don't want to add some info to url (querystring) which is the field.value.
We prefer updating session ids with the field value that is why I need to pass the field.value to a procedure to update session ids first before calling the correct user control to be loaded based on updated session ids.
Any info will be greatly appreciated.
Thanks in advance,
RJ
I'm new to Reporting. Just wondering how to call a Sub Procedure from Report Textbox Action to use Ajax?
Here's the scenario:
- Parent Aspx Page With the sub procedure to be called.
- Asp: Placeholder added to Parent Page
- User Control (with Report viewer) Added to Placeholder
- Report with Textbox that has action to call Parent Sub Procedure to change the user control on Asp: Placeholder?
Condition: It will be done using Ajax, when changing user control based on field.value. Is this possible? (My preferred solution)
(Optional)
If I'll be using navigateurl it will do postback and also we don't want to add some info to url (querystring) which is the field.value.
We prefer updating session ids with the field value that is why I need to pass the field.value to a procedure to update session ids first before calling the correct user control to be loaded based on updated session ids.
Any info will be greatly appreciated.
Thanks in advance,
RJ
6 Answers, 1 is accepted
0

KS
Top achievements
Rank 1
answered on 09 May 2014, 12:24 PM
Hi,
Use navigate to URL and add values in the query string - http://www.telerik.com/forums/navigating-with-parameters.
Just see if requests work within the update panel - http://www.telerik.com/help/reporting/asp-net-report-viewer-ajax.html.
-KS
Use navigate to URL and add values in the query string - http://www.telerik.com/forums/navigating-with-parameters.
Just see if requests work within the update panel - http://www.telerik.com/help/reporting/asp-net-report-viewer-ajax.html.
-KS
0

RJ
Top achievements
Rank 1
answered on 15 May 2014, 07:23 PM
Hi KS,
It seems like telerik reports only supports query string which we really don't want to do coz users can type directly on url and they can see the report right away.
the process that I want to achieve is not possible with telerik report. It will always have postback when you add action. It can't call any method or procedure from my parent aspx or ascx.
It seems like telerik reports only supports query string which we really don't want to do coz users can type directly on url and they can see the report right away.
the process that I want to achieve is not possible with telerik report. It will always have postback when you add action. It can't call any method or procedure from my parent aspx or ascx.
0

KS
Top achievements
Rank 1
answered on 20 May 2014, 02:12 PM
Hi RJ,
There are no postbacks on navigation to URL. Try using user function to make the URL for the action, and add the keys in the session. I am not sure I understand the part with calling methods from the page. Maybe the support team can help you, if you open a ticket.
-KS
There are no postbacks on navigation to URL. Try using user function to make the URL for the action, and add the keys in the session. I am not sure I understand the part with calling methods from the page. Maybe the support team can help you, if you open a ticket.
-KS
0

RJ
Top achievements
Rank 1
answered on 28 May 2014, 10:35 AM
Hi KS,Do you have Snippet of user function code that will use the clicked value of the textbox that has action to update session variable.
Also how can I get other Fields which is not assign to a textbox to update other session variable?
I have tried the navigateurl to test if the textbox clicked value will be passed to query string but to my surprise its giving Fields.Fieldname not the value.
e.g.: txtID.value gives Fields.ID not the value of the ID.
e.g.: = "http://www.yourdomain.com/myreportviewer.aspx?MyKey=" + txtID.Value
This will result to:
= "http://www.yourdomain.com/myreportviewer.aspx?MyKey=" + Fields.ID
The code:
Dim UrlAction1 As New Telerik.Reporting.NavigateToUrlAction()
UrlAction1.Url = "http://www.yourdomain.com/myreportviewer.aspx?MyKey=" + txtID.Value
txtID.Action = UrlAction1
Thanks
Also how can I get other Fields which is not assign to a textbox to update other session variable?
I have tried the navigateurl to test if the textbox clicked value will be passed to query string but to my surprise its giving Fields.Fieldname not the value.
e.g.: txtID.value gives Fields.ID not the value of the ID.
e.g.: = "http://www.yourdomain.com/myreportviewer.aspx?MyKey=" + txtID.Value
This will result to:
= "http://www.yourdomain.com/myreportviewer.aspx?MyKey=" + Fields.ID
The code:
Dim UrlAction1 As New Telerik.Reporting.NavigateToUrlAction()
UrlAction1.Url = "http://www.yourdomain.com/myreportviewer.aspx?MyKey=" + txtID.Value
txtID.Action = UrlAction1
Thanks
0

KS
Top achievements
Rank 1
answered on 28 May 2014, 04:10 PM
Hi,
Just create a user function that gets all fields that will be used, and add then in the Session. This user function can be used in the designer to set the URL... the code seems to be OK, but it depends on when and where is executed.
-KS
Just create a user function that gets all fields that will be used, and add then in the Session. This user function can be used in the designer to set the URL... the code seems to be OK, but it depends on when and where is executed.
-KS
0

RJ
Top achievements
Rank 1
answered on 02 Jun 2014, 06:26 AM
Nevermind. You cant even create a snippet of the user function your saying.
Thanks anyways.
Thanks anyways.