locked
Lightswitch 2013 and generating reports question RRS feed

  • Question

  • Is there absolutely no way that Lightswitch could launch an Access db?  My lightswitch app is a frontend to a SQL Server database.  I have an Access db that's a frontend to the same SQL database.   My hope is that I can open that Access db and display a report form and allow the user to print reports.

    Lightswitch would not care about the data the Access db contains.  It would just launch the db.  It would be like a command line execution.

    Thanks.


    Thanks.


    • Edited by db_dweeb Wednesday, January 22, 2014 8:20 PM
    Wednesday, January 22, 2014 8:19 PM

Answers

  • I believe I can.  Using this suggestion, I implemented the following code and was able to open the Access db.

            Private Sub PrintReports_Execute()
                'code borrowed from http://social.msdn.microsoft.com/Forums/vstudio/en-US/974ae992-894e-47fe-b41a-4e7715720016/how-can-i-call-system-calculator-inside-lightswitch-app?forum=lightswitch
                If AutomationFactory.IsAvailable Then
                    Dim shell = AutomationFactory.CreateObject("Shell.Application")
                    Dim strCommand As String = "w:xxx/yyy/\MyAccessDB.accdb"
                    Versioned.CallByName(shell, "ShellExecute", CallType.Method, strCommand)
                End If
    


    Thanks.

    • Marked as answer by db_dweeb Thursday, January 23, 2014 2:04 PM
    Wednesday, January 22, 2014 8:43 PM