Hi.
I was following tutorial, how to create a simple reportview in lightswitch html and have encountered problems.
Changes I did from the tutorial: https://www.syncfusion.com/kb/2975/how-to-create-your-first-reportviewer-in-lightswitch-html
Now for the problems:
If I create Global.asax and add the code provided, the start debug application does not even start, it reports an error.
If I do not create Global.asax, it does not report an error, it runs, but the viewer does not load. It shows a red 100% width and 450px high square with error: CustomControl error … ej is not defined.
Any help would be appreciated.
Jure
Hi Jure,
Thanks for using Syncfusion products.
We have tabulated based on query and refer the below for more details.
Query |
Response |
In adding references I was not able to find System.Web.WebHost, even after adding WebApi Nuget. The only similar was System.Web.Http.WebHost |
It seems the dependent assemblies from ASP.NET WebApi nuget package are not added in your application. Could you please ensure whether you have added the WebApi nuget package properly in your application? Please download the WebApi Nuget from below link, https://www.nuget.org/packages/Microsoft.AspNet.WebApi |
If I create Global.asax and add the code provided, the start debug application does not even start, it reports an error. If I do not create Global.asax, it does not report an error, it runs, but the viewer does not load. |
We could see that attached error image file. It seems that mentioned error occurred might be, “System.Web.Http” namespace not defined in your “Global.asax” file. Please ensure that the mentioned namespace is added in your active server page (asax) file. |
It shows a red 100% width and 450px high square with error: CustomControl error … ej is not defined. |
This error may be raised due to, ej.web.all.min.js script is not referred properly in your application page. Could you please ensure the css/script is properly referred in your application? If you still face any issue, could you please share the sample with replication procedure with us? It will helpful to further analyze this issue and provide solution earlier. |
We have prepared a sample for your requirement and it can be downloaded from the following location.
SSRS sample1:
http://www.syncfusion.com/downloads/support/directtrac/131644/ReportViewerSample-465465182.zip
SSRS sample 2:
And also you can find the locally installed ReportViewer sample from the following location.
<<Installation Drive>>:\ [ProgramFilesFolder]\Syncfusion\EssentialStudio\12.4.0.24\ LightSwitch HTML\Samples
Please let us know if you need further assistance on this.
Regards,
Nithya B
Thanks for a quick response. I needed some time to retest the whole thing.
I reformatted my secondary PC, just to be sure. Installed VS Community 2013, 2013 SDK, Lightswitch Extensibility Toolkit and WebApi Nuget 5.2.2 (during install it reported it found newer versions, but installed nonetheless).
I tested your SSRS Sample1 in debug and it works. I even uploaded it to my web hosting: http://nefos.info/ReportViewerSample/htmlclient/ (acts/show the same as in debug), my new application does not, the same error as before: http://nefos.info/Application1/htmlclient/
Then I created a new application in C#, mentioned above. Did all the steps shown in the tutorial. I also compared all (to my ability) references and code in sample application.
Differences between SSRS Sample 1 and new application/tutorial:
As requested, I am providing application .zip url. Was not able to compress it to 30 MB.: https://www.dropbox.com/s/y28flad5246k7ch/Application1.zip?dl=0
I am unable to find the error and would be very grateful for help.
Jure
Hi Jure,
Thanks for the update.
Query |
Response | |
When u must add code in”ReportViewerSample.lsml” – “EJ ReportViewer”- »Edit Render Code« in properties, it always crashes Visual Studio. On both computers. Instead, I added the code via »Write Code« - »ScreenContent_render« and pasted the same code from sample. I hope that is OK? |
We are glad to inform you that we have fixed reported issue “Visual studio restarts when clicking Edit Render Code” internally and this fix will be available in Volume 1 2015, which is expected to be available in March 2015. If you wish to avail a custom patch for this issue, we request you to create a Support Incident (Ticket) to get changes about the reported issue. Please log on to our DirectTrac Support System using the below link to create support incidents.
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
| |
When adding references I do not find »web.routing« anywhere, not even in your sample application. Seems to work without it.
default.htm; do not know if they are relevant, just spotted the difference line 30: (<link rel='nofollow' href="content/responsive-css/ejgrid.responsive.css" rel="stylesheet" />) was added in sample, but was not specified in tutorial line 64-66: extra code, not provided. |
The mentioned assemblies and script file are not required for the ReportViewer. | |
Other Syncfusion references I used from sample, did not find them in add references menu. |
You can get the locally installed Syncfusion assemblies from the following location.
%userprofile%\AppData\Local\Syncfusion\LightSwitch\x.x.x.x\HTML\Reference Assemblies | |
I do not find »web.webhost« anywhere, only »web.http.webhost«. I assume it is the same thing, because it is in your sample application. |
Sorry for the inconvenience caused. We have wrongly included “web.webhost” in our UG documentation. We have created task for updating our ReportViewer Online UG documentation. We will let you know once our Online UG documentation updated successfully. | |
my new application does not, the same error as before: http://nefos.info/Application1/htmlclient/ |
We could see that, you have referred ej.web.all.min.js scripts in your application, but “ej.web.all.min.js” script file are not included in “scripts/ej” folder in your application. We request you to add the script files by manually copy paste them to the preferred location or add the scripts from the online link. The below code illustrate the how to add scripts from Online link,
We have modified your sample and it can be downloaded from the following link. http://www.syncfusion.com/downloads/support/directtrac/general/Application1_Modified-1091369638.zip |
Please let us know if you have any other questions.
Regards,
Nithya