SSRS reports from Lightswitch Html Client

I have created a Lightswitch desktop application that list the available reports that are stored in a table and also provides a button that when clicked launches the web browser to the URL for the report on the SQL server. My problem is now I'm trying to
create the HTML client for the application and have no experience with Java Script. Does anyone know how to accomplish the something that I did on the desktop application on the HTML client?
Below is the code that I used to open the URL in the browser in the desktop application.
Imports Microsoft.LightSwitch.Threading
Imports System.Runtime.InteropServices.Automation
Namespace LightSwitchApplication
Public Class ListReports
Private Sub RunReport_Execute()
' Write your code here.
Dim uri As New Uri(ReportsSet.SelectedItem.ReportAddress) 'website stored in the ReportsSet.ReportAddress field
If (AutomationFactory.IsAvailable) Then
Dim shell = AutomationFactory.CreateObject("Shell.Application")
shell.ShellExecute(uri.ToString)
ElseIf (Not System.Windows.Application.Current.IsRunningOutOfBrowser) Then
System.Windows.Browser.HtmlPage.Window.Navigate(uri, "_blank")
End If
End Sub
End Class
End Namespace

This may help:
Creating Reports in LightSwitch HTML Client
// Show Loading message
var LoadingDiv = $("<div></div>");
var Loading = $("<h1>&nbsp;&nbsp;&nbsp;&nbsp;Loading Report...</h1>");
Loading.appendTo(LoadingDiv);
LoadingDiv.appendTo($(element));
// Get Report
var HTMLContent = $("<div></div>").html(
"<object width='650px' height='650px' data='../reports/ReportViewer.aspx?SurveyId="
+ contentItem.screen.SurveyId + "'/>"
// Make report appear on top of the Loading message
HTMLContent.css({
"margin-top": "-50px"
HTMLContent.appendTo($(element));
Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book
http://LightSwitchHelpWebsite.com

Similar Messages

  • How to access the C# file in server from Lightswitch HTML Client

    Hi,
    In that LightSwitch HTML Application i have some c# file in the server project.How can i access those C# file in the screens (HTML Client project )
    thanks,
    goblalakrishnan s
    gobalakrishnan S

    Hi,
    with implementing Generic File Handlers (.ashx)
    See follow link:
    http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/174/Full-Control-LightSwitch-ServerApplicationContext-And-Generic-File-Handlers-And-Ajax-Calls.aspx
    regards
    j.nord

  • Lightswitch HTML Client - Detail picker for each related List Item

    I have a doubt in Lightswitch Html Client application.
    Scenario:
    Suppose i have two tables  "Property" and "PropertyVaues".
    A Property can have many PropertyValues is the relationship between them.
    I want to show the data on screen like below:
    Property List:
    XYZ            [___10____(+)]
    MNO          [___abc____(+)]
    PQR           [___30.5___(+)]
    Xyz  is the list item
    assume [___10____(+)]  is the detail picker of
    PropertyValues which allow to select one value related to
    XYZ Property item, and same for other list items.
    Only Related "PropertyValues" for each list item must be available in the detail picker.
    Please help me out if any one has the solution to solve it.
    Or you can give me any other way to accomplish the above scenario.
    Thanks

    Hello Josh,
    I am implementing it on AddEdit screen.
                      (1)                                              
    (2)                           
    Screen description:
    [Note: Some Images are in my next post]
    1. Image(1) shows the list of properties (GSM, Mill Name, CMS). These Properties have its respective property values in drop down.
    2. When i select any value from the dropdown list (eg. 10 from GSM). the value is assigned to all other drop down.
    [shown in image(3) next post]
    (4) Again when suppose i select value for "Mill Name" Property as "Abc", it is assigned to all other drop down.
    [shown in image(4) next post]
    I want that a property value must be assigned to its respective Property only.
    Please help me on this. Or suggest me another way out to accomplish such scenario.
    Thanks
    Ravi Patel

  • Extending Screens for Multi-Select in the LightSwitch HTML Client

    Hi i
    read Mike Droney's article of 
    Extending Screens for Multi-Select in the LightSwitch HTML Client
    But i just want to understand the code, so what is the ‘__isSelected’ property? from where does it come?
    why does the contentItem.value.details have an ‘__isSelected’ property?
    is the value of the contentItem not the screen?
    and also how can i implement the ‘Can Execute Code’ only if one or more check boxes are checked?
    Thanks  

    But i just want to understand the code, so what is the ‘__isSelected’ property? from where does it come?
    why does the contentItem.value.details have an ‘__isSelected’ property?
    is the value of the contentItem not the screen?
    and also how can i implement the ‘Can Execute Code’ only if one or more check boxes are checked?
    The '__isSelected' property is a private member of the class msls.ContentItem related to the backing data for the selected item.  That is to say, it would be a private member if JavaScript actually had encapsulation and information hiding like a typical
    object-oriented language. I like to reference David Herman's description from his book
    Effective JavaScript:
    Often, JavaScript programmers resort to coding conventions rather than any absolute enforcement mechanism for private properties. For example, some programmers use naming conventions such as prefixing or suffixing private property names with an underscore
    character (_). This does nothing to enforce information hiding, but it suggests to well-behaved users of an object that they should not inspect or modify the property so that the object can remain free to change its implementation.
    ...which means that it's generally not recommended to directly get or set backing data properties like __isSelected, instead working with the public property 'selectedItem', although it may work fine in certain cases like this one.
    To make _canExecute fire only when an item in the list is selected to enable a button method, try:
    return (screen.Contacts.selectedItem !== null);

  • Error while Accessing SSRS reports From Sharepoint

    We have recently implemented Kerberos authentication on SSRS web application in QA environment and experiencing some issues.  
    There are two Web Front End servers WFE1, WFE2
    and one APP server in the environment.  SSRS is configured in
    WFE 2 Server.
    When users browse SSRS reports from server WFE1, below error comes up, while report works fine from SSRS (WFE 2) server.  
    SSRS Error:
    For more information about this error navigate to the report server on the local server machine, or enable remote errors.
    Please provide us some assistance in troubleshooting/resolving this issue ( it’s became critical at this point).

    The ULS logs are located on the Hive/14 file servers. The error message you encountered should have given a guid error message. If you search for this within the logs, can you copy the messages here for communal feedback.
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • Runtime Error in VS2012 (Update4) LightSwitch HTML Client

    I have a desktop (Silverlight) application, I upgraded the project to add the HTML Client. Now when I run the HTML Client, it shows this message box on the browser:
    "The application could not be loaded. Please try refreshing the page. Failed to load model: failed to parse the model JSON string. Failure reason: syntax error."
    I started my desktop application in VS2012 Update 2, and now it is in the Update 4. The interesting thing is that when I make new Project and then add HTML Client, I will not receive this error and it works fine.
    It shows this error only on that specific project (Which I started on VS2012 Update2, later Update3 and now Update4) and that project is very big (more than 100 tables and screens), therefore I can not make that from scratch again.
    I have to add HTML Client to my project. I really appreciate if someone can help me.

    "The application could not be loaded. Please try refreshing the page. Failed to load model: failed to parse the model JSON string. Failure reason: syntax error."
    Hi Keysen,
    First you need install Microsoft.LightSwitch.Client.JavaScript.Runtime 2.5.2. This update can be downloaded from the NuGet Gallery, see:
    http://www.nuget.org/packages/Microsoft.LightSwitch.Client.JavaScript.Runtime/
    Because this issue is project specific, you can also turn the build output, in the
    Options window, find Projects and Solutions >> 
    Build and Run. Find Diagnostic in the drop-down for MSBuild project build output verbosity. It will give detailed information why this happens.
    Please let me know if there is anything that I can do to help.
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Testing execution of 6i reports from a HTML portlet

    How can I execute an Oracle 6i report from a portal30 HTML portlet. The HTML command looks something like this "C:/reports_6i_runtime.exe userid=user_account/password@connect_string H:/report_6i.rep" I get the message "page cannot be displayed".
    When I create a shortcut on the desktop and call the shortcut with this command "C:\Desktop\report_6i.rep" it will execute. This is not an option.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Leung ([email protected]):
    It looks like you are trying to call a URL on your local machine. If this is the case, you may need to format your URL as:
    file://c|/blah/
    or something to that effect. I believe it needs to be a proper URL if you are calling it from your local filesystem.
    You may get a better response from the Reports forum.
    <HR></BLOCKQUOTE>
    I did try using "file://" in my HTML, with the same results.
    I was able to get the reports runtime to come up when I executed it from the windows run command line, but it did not accept either parameter I passed.
    The command did not run at all from the browser.
    null

  • Lync 2013 custom SSRS reports from CDR

    Trying to replicate canned Lync 2013 User Activity Report, but with more filtering capability, using SSRS. Necessary to do this way because we're adding details like user names, departments and locations from our Active directory.
    Have been unable to ever find support on WHAT the query or stored proc IS behind the UA report. If I have that code I can incorporate that with our data.
    Any help appreciated!
    Jim Nelson
    James Nelson

    The CDR schema can be found here, which will be helpful for creating your reports:
    http://technet.microsoft.com/en-us/library/gg398570.aspx
    Most queries start from the SessionDetails Table:
    http://technet.microsoft.com/en-us/library/gg398589.aspx
    For hacking up existing SSRS reports to see what procedure or view they call, you'll have better luck asking in the SQL forums.
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question please click "Mark As Answer".
    SWC Unified Communications

  • Save SSRS Report as .PDF in Client Machine

    Hi,
    I am working on a SharePoint 2010 Visual WebPart, the saves a SSRS report as pdf on a button click.  The code is mentioned below:
    HttpWebRequest Req = (HttpWebRequest)WebRequest.Create(URL);
    Req.UseDefaultCredentials = true;
    Req.PreAuthenticate = true;
    Req.Credentials = CredentialCache.DefaultNetworkCredentials;
    HttpWebResponse objResponse = (HttpWebResponse)Req.GetResponse();
    Req.Method = "GET";
    //Specify the path for saving.
    string path = @"C:\test\" + quoteID + @".pdf";
    FileStream fs = new FileStream(path, FileMode.Create, FileAccess.Write);
    Stream stream = objResponse.GetResponseStream();
    byte[] buf = new byte[1024];
    int len = stream.Read(buf, 0, 1024);
    while (len > 0)
    fs.Write(buf, 0, len);
    len = stream.Read(buf, 0, 1024);
    fs.Close();
    stream.Close();
    The code works great, however, when the user clicks the button the file is getting saved directly in the main server when the WebPart is deployed.  So, now I want the user to be able to select the location in there system to save the file.  How
    to enable the "Open save file dialog" and let the user select the location. can someone help me with this ? 
    thanks.
    Regards, Vikram

    You can use below snippet.
     string strURL=path;
            WebClient req=new WebClient();
            HttpResponse response = HttpContext.Current.Response;
            response.Clear();
            response.ClearContent();
            response.ClearHeaders();
            response.Buffer= true;
            response.AddHeader("Content-Disposition","attachment;filename=\"" + Server.MapPath(strURL) + "\"");
            byte[] data=req.DownloadData(Server.MapPath(strURL));
            response.BinaryWrite(data);
            response.End();
    Bala

  • 'Days Elapsed' computed field in lightswitch HTML client

    I am developing a simple lightswitch HTML application to keep track of research experiments. I have a table called 'Experiments' and one of the fields is 'ExperimentDate'. I want to display the number of days that have passed since the date of experiment.
    Is there any way to do this?

    Use a custom control to display 'ExperimentDate' and display the calculation. Use in-built JavaScript datetime functions or add a JavaScript library such as moment.js. Similar to this MSDN article sections:
    Format a Date
    Moment.js
    You can see the use in this
    stackoverflow post.
    var date1 = new Date("02/Feb/2015 00:00:00"),
    date2 = new Date("25/Feb/2015 10:09:00"),
    diff = date2.getTime() - date1.getTime(),
    days = Math.floor(diff / (1000 * 60 * 60 * 24));
    Cheers
    Dave
    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

  • LightSwitch HTML Client pubished on azure get an 400.0 bad request error

    Well, I have this problem: "Request failed with status code '400' and the status text 'Bad Request'." when I run my LightSwitch HTMLClient application that are published in Azure Web Applications.
    I already look everywhere for 3 days and still could not find the answer to this problem.
    I hope someone in this forum can help me.
    Thanks.

    Hi, thank you for respond.
    let's see, the fiddler throws these:
    NOTICE: Don't follow the links, they are dummies
    GET http://myapp.azurewebsites.net/ApplicationData.svc/$metadata
    400 Bad Request (text/html)
    The Request
    GET /ApplicationData.svc/$metadata HTTP/1.1
    MaxDataServiceVersion: 3.0
    Accept: application/xml
    Referer: http://myapp.azurewebsites.net/HTMLClient/default.htm
    Accept-Language: es-MX,es;q=0.8,en-US;q=0.5,en;q=0.3
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
    Connection: Keep-Alive
    Host: myapp.azurewebsites.net
    Cookie: ARRAffinity=354b4b5b87b2f1e4e8b6c19a5566c6e055bf3e4047b54b4d2ea846ba1b33d561; msls-client-parameters=preferredLanguage=es-MX; ASP.NET_SessionId=bkf52whz0rkufhcxmqrfuirm
    The Response
    HTTP/1.1 400 Bad Request
    Cache-Control: private
    Content-Type: text/html
    Server: Microsoft-IIS/8.0
    X-AspNet-Version: 4.0.30319
    X-Content-Type-Options: nosniff
    X-Powered-By: ASP.NET
    Date: Wed, 01 Apr 2015 04:23:39 GMT
    Content-Length: 1647
    Connection: Keep-Alive
    The azure logs, the lightswitch diagnostic and the debugger not show any difference from these.

  • How to establish an Https connection from a html client

    Hi! I�m totally new to Java so my question is rather"stupid". I have an html page that sends a post to a servlet
    <form name="form" action="servlet/ServletLogOn" method="post">
    I want to establish an https connection between the client and the servlet. How is it?
    Thanks in advance.

    Ignore the previous poster's reply - he was obviously mislead by my original post re: JSSE.
    How you install an SSL certificate on your webserver is completely dependent on the webserver you are using. Ususally there is some functionality for doing this from the administrative interface - usually involves pasting some text from the CA's (certificate authority, e.g. Verisign) site into a text box and designating a port number for SSL traffic (use 443, it's internet standard). I've actually only done this for Netscape Enterprise Server - you may want to find a forum for users of your webserver to ask for specifics.

  • Ssrs report from ssas cube , driving me nuts now...

    hi folks:
     This is driving me nuts and I know it's gonna be some small stupid settings.  The question is pretty simple, I want to users to be able to pick up a week from date hierarchy. If I specify a static week, mdx query will run and report shows with
    correct data and format. 
    Now, in the dataset I've created using query designer, I've dragged data hierarchy into the filter and check the parameter box and also put a default value as well.   Technically, when I run this report, I am supposed to see a dropdown list with all
    the available dates but I did not see any dropdownlist and report still runs with default value. 
     Why is this happening? 
    Thanks
     Hui
    --Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

    Hi Hui,
    Just as Gnanadurai said, a report auto runs when all parameters has their own default values. This scenario can also be occurred when there are no available values for the parameters. So if you want to see a drop-down list with all available dates when the
    report runs, we should specify some available values for the parameter. For example, we can specify the available values come from a dataset field. Then the values in the field would be displayed in the drop-down list, we can select some of them to filter
    the report.
    Reference:
    Adding Parameters to Select Multiple Values in a List (SSRS)
    Hope this helps.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • How to call reports from JSP/HTML application

    Hi,
    We have a web application developed in JSP, I'd like to use Oracle Reports writer to generate reports (Since our back office application is developed using Oracle forms and Reports - 6i).
    I don't know how to place a request to Oracle Reports server and view the output. Can someone please help me with this.
    Thanks in advance.
    Best Regards,
    Karthik

    Hello Karthik,
    You have a web application developed in JSP. In that you are calling Reports though URL through your JSP.
    User views the source of the HTML page, in browser which is the result of execution of JSP. So Client will see the
    HTML output, but not the real JSP.
    Still if you donot want to hard code the user/password in file, have a form and ask client to enter user/password.
    Or you can combine your JSP with other Java components , like Java bean or Servlets to get user/password at run time.
    With Regards
    Sachin

  • How to run a 10g Report from form in client using OC4J

    Hi,
    Every time we make a report, in order to test it we have to deploy in application server.
    In our application we make the report is written as a PDF in the server and shown in the client browser using WEB.SHOW_DOCUMENT.
    Is there a way we can do this in the development environment?
    Like this: I create a report (i.e. RDF). Now in my development machine I want the form (we use a Oracle Form as a parameter form, not the Reports para form) to have a button, and when I press this button the report has to run, create the PDF in my machine and show it my client browser.
    How to do it using OC4J??

    Steps to take.
    (1.) In command prompt type RWSERVER SERVER=repserver1 to star the rep server.
    (2.) If you get "Javaw.exe The procedure entry point psoasyn could not be located in the dynamic link library orapls10.dll." error do one of the following
            (a.) Type the full name for the server. D:\OracleDevR2\bin\rwserver SERVER=repserver1
                   or, if it does not work
            (b.) Add D:\OracleDevR2\bin to the system env. variable PATH
    (3.) Start OC4j
    (4.) Now you can access the jobs using URL like:
        http://192.161.11.143:8890/reports/rwservlet/showjobs?server=repserver1
          where 192.161.11.143 is your machine's IP address.

Maybe you are looking for

  • Change Heading of the New Tab added through EEWB

    hi, I am working on transaction 'CRM_DNO_MONITOR' (this is the display business transaction from CRMD_ORDER). I added a field to the transaction by EEWB. The name of the last tab was 'CUSTOMER FIELDS'. A new tab is added and the same name 'CUSTOMER F

  • Grouping of messages in the Mail

    Good afternoon! Mail on OS X includes letters with the same subject and outputs in the form of dialogue. How make when watching letters do not show messages with the same subject? Sorry for the poor English (Russian Federation).

  • Amount comes multiple times against document number

    Hi, I have a query in my report that where the A/c Document numbers have the multiple line items, it goes in loop..means it print the value multiple times like: - 5500004344...............4500 5500004345...............5000 5500004345...............51

  • HT3529 How do I insert a pdf file into my message?

    How do I insert a pdf file into my message? please help!

  • Apple TV best connection

    Hello, I have 3 apple tv's 3rd generation connected to wifi. I also have 3 airport express being used as extenders to boost the signal in my house. My question is would I get a faster connection if I connected a apple tv to a airport express via ethe