[SOLVED] AspNetControl

Answered Closed
0
0

It appears you need to compile the code in the extension and add the resulting DLL into the WiseJ Bin Folder where the other extensions reside.

You then add a reference to the DLL to your project as well as a reference to Microsoft.Reporting.WebForms.

Could we have an example of Report Viewer Wrapped using this new extension?

I have attached my VWG version of wrapped Report Viewer.

Many Thanks

Attachment
  • You must to post comments
Best Answer
2
1

Hi Ewan,

Try the attached sample. It shows how to wrap the ReportViewer  and in general the flexibility of this extension.

 

Best,

Luca

  • You must to post comments
Great Answer
0
0

Hi Ewan,

The issue is fixed in the current build, will be online later on today. The problem was that sometimes the thread firing BeginRequest is different from the thread executing the request in AspNet.

Our tests now work perfectly, elimiated also the refresh when resizing problem.

Best,

Luca

  • You must to post comments
Great Answer
0
0

Hi Ewan,

the base class AspNetControl is not a UserControl and has the attribute [ToolboxItem(false)].

So derived components to appear in the toolbox must have the attribute [ToolboxItem(true)] and may have to be added to the toolbox.

Hope that helps.

Best regards
Frank

  • You must to post comments
0
0

Hi,All.

Late to the party, but I’m starting to convert some VWG apps that use ReportViewer to WiseJ. Most important, also trying to convert a Winforms app that uses C1.Flexgrid…

So would anyone be willing to provide simple but fully working example, or at least a production code sample that would speed up the process for me.

If I can get these working in WiseJ, I will contribute my converted VWG reporting functionality that parses the report RDL file and dynamically creates and fills parameter controls and main report datasets without having to hard code anything.

Basically a generic local mode reporting control that replaces the parameter panel in a server based report.

Thanks

Geoff Sorensen

  • You must to post comments
0
0

Hi guys,

Can I ask/suggest to reconsider the order of answers to a support forum thread? With the pushing upwards of the “great answers”, “best answer” etc, it becomes impossible to follow the flow, at least form me, i.e. somebody who was not involved in the conversation from start, so I haven’t seen the answers before. In the present thread, the answer dates are ordered: November 9/9/14/10/18/18/17/15/15/15/11/10 … With the final being somewhere in the middle and the best answer being on top, which, however was not the final.

Best,
Alex

 

  • Tiago (ITG)
    My guess is the sorting. On the beta forum, each thread was sorted “Oldest First” and now is sorted “Recently Active”. I always change the sort order or else I can’t understand anything at all.
  • Alex Prinias
    It is the sorting indeed, but this “recently active” sorting is applied after pushing to the top the “rated” as good answers and best answers etc. The final algorithm looks like random :)
  • Luca (ITG)
    Yep, unfortunately the option to turn off the best answers to the top is not available. We can change he default to Oldest First, but the best answers are a group of their own, or so it appears.
  • Alex Prinias
    Instead of turning off the pushing of best answers to the top, can you turn off the best answers altogether? Unless you are planning a point system a la StackOverflow and give out free wisej licenses to those forum users with the most best answers ! :-)
  • You must to post comments
0
0

Hi Ewan,

See attached modified sample. The control now has an IsLoading property and fires the event IsLoadingChanged. The code is simple but tricky because the viewer runs inside a frame. I also added a fun animation to test the IsLoadingChanged event.

http://demo.wisej.com/apps/reportviewer.html

The code in the sample shows how to add all sorts of events and properties.

Best,

Luca

  • Ewan Walker
    Hi Luca many thanks. Must be the weekend!
  • Dino Novak
    Hi all, I am trying to run the sample project but I am getting error: “An internal error occurred on the report server. See the error log for more details. (rsInternalError) For more information about this error navigate to the report server on the local server machine, or enable remote errors” Help would be greatly appreciated, DiNo
  • Luca (ITG)
    That sample is connecting to a test sqlserver with reporting services that we use to test stuff. The reporting server engine regularly crashes. I will see if it can be restarted easily. You can change the url in the sample to use your reporting server. Best, Luca.
  • Dino Novak
    Hello Luca, I managed to understand the Wrapper, and I am playing with it now. I managed to change the wrapper so that I can execute local report with playing with ServerUrl parameter, so now local report shows up. if (this.ServerUrl == “file”) { viewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local; viewer.LocalReport.ReportPath = this.ReportPath; } else { viewer.ServerReport.ReportPath = this.ReportPath; viewer.ServerReport.ReportServerUrl = new Uri(this.ServerUrl); viewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; if (!this.IsPostBack && this.UserName != null) viewer.ServerReport.ReportServerCredentials = new ReportViewerCredentials(this.UserName, this.Password, this.DomainName); } but I am missing options to adjust specifics for local report set report parameters: ReportParameter rptParam = new ReportParameter(“rptParameter”, “some text”); reportViewer1.LocalReport.SetParameters(rptParam); I would need to have option to set ReportDatasource, this can be done in wrapper, but I need to do it on the Window itself as I need to show multiple reports: ReportDataSource myReportSource1 = new Microsoft.Reporting.WebForms.ReportDataSource(“rptDatasource”, datasource); reportViewer1.LocalReport.DataSources.Add(myReportSource1); //reportViewer1.LocalReport.Refresh(); reportViewer1.Update(); So that it is refreshed after paramaters on the page are updated What do I need to enable this? Thanx, DiNo
  • Geoff Sorensen
    Hi,All. Late to the party, but I’m starting to convert some VWG apps that use ReportViewer to WiseJ. Most important, also trying to convert a Winforms app that uses C1.Flexgrid… So would anyone be willing to provide simple but fully working example, or at least a production code sample that would speed up the process for me. If I can get these working in WiseJ, I will contribute my reporting functionality that parses the report RDL file and dynamically creates and fills parameter controls and main report datasets without having to hard code anything. Basically a generic local mode reporting control that replaces the parameter panel in a server based report. Thanks Geoff Sorensen
  • You must to post comments
0
0

Hi Luca

I have added a script  to the ScriptManager  to capture the isLoading event from the report Viewer client api by making use of the WrappedControl.ID

How do I fire an event back to C# when isLoading is false in such a way that I can raise an event in C# to indicate Rendering is complete?

(See the attachment on my original post to see how it was dome in VWG)

Thanks for your help

Ewan

 

 

  • You must to post comments
0
0

Hi Luca

If you have a long running report you still get the session timeout message, presumably because you are not interacting with the Iframe just waiting for the report to complete. (Using AysncRendering)

Thanks for your help

Ewan

  • Luca (ITG)
    That’s correct. If there is no interaction with the application for a time longer than the session timeout, the session will time out. You need to increase the session timeout, or manage Application.SessionTimeout.
  • You must to post comments
0
0

Hi Luca

Were changes made Wise.Web to support this as I get this error now in the Iframe

See attached

Ewan

Attachment
  • Luca (ITG)
    Yes. See 1.3.8 in dev builds in the release notes. The issue was that the session cannot be restored by a HttpModule because with the asyn handler BeginRequest and even PreProcessHandler may come in from a different thread. So the page host must restore the session on the actual thread.
  • Ewan Walker
    Thanks Luca Works really well I can move from report viewer 11 through to 14 by simply changing the referenced webforms dll and the references in the web config
  • You must to post comments
0
0

Hi Ewan,

I have attached the revised sample application.

The latest AspNetWrapper class already exposes the ScriptManager object. You can use to set any parameter including AsyncPostBackTimeout.

Best,

Luca

  • Ewan Walker
    Hi Luca is the latest AspNetWrapper Class loaded to the extensions download page as it is still dated 8/11/2016?
  • Luca (ITG)
    Ops, sorry. It’s a different process from the main build. Should be fine now.
  • You must to post comments
0
0

Hi Luca

Thank you for sorting this out.

One more suggestion: It work be good to expose some of the script manager properties in the ASP net wrapper such as

AsyncPostBackTimeout

as this needs to be set for long running reports in order for them to not time out.

Thanks for your help

Ewan

  • You must to post comments
0
0

Hi Luca

Having tested your example with some of my server reports I have noticed the following:

  1. In IE 11 you have to press the page icon twice to change the page (once in Chrome)
  2. In IE 11 if you have linked parameters picking one does not cause the others to update unless you press refresh report
  3. After you have changed parameter values having run the report once you have to press refresh report twice to get the report to redisplay.
  4. If you are just working within the report window you get the session timeout message.

So it appears that something is preventing report viewer from running independently (I have set AsyncRendering to true).

These issues were not present in the VWG wrapper.

This issue seems to be, having looked into this further that OnInit is not firing reliably.

Thanks for your help

Ewan

  • You must to post comments
0
0

Hi Luca

Just one further question how do you add user controls to the design surface or window?

In VWG once the project had been compiled they were listed in the toolbox.

Thanks for your help

Ewan

  • You must to post comments
Showing 13 results