in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

Code not executes when layout is loaded

Last post 11/15/2008 10:12 PM by Juan Carlos Pazos. 0 replies.
Page 1 of 1 (1 items)
Sort Posts:
Previous Next
  • 11/15/2008 10:12 PM

    Code not executes when layout is loaded

     Hi

    I  create a report that has some code behind the BeforePrint event for 3 labels, in two of the the code is for validate a date and in the other is for join to fields and present the result in the report. All works fine.

    My problem is that I provide tthe layout of the reports in case they want to change the report layout. So I save the report from the designer as Report.repx

    In the window that calls the report I have this in a Try Catch fist try load the layout in case that can not be found, then the report of the application is loaded. Again this works fine.

    Using loReport As New ListadoGuias
    Try
    Dim FilePath As String = Application.StartupPath & "\Reportes\ListadoGuias.repx"
    loReport.LoadLayout(FilePath)
    loReport.Name = "Listado de guías para envíos"
    loReport.ExportOptions.PrintPreview.DefaultFileName = "Listado de guías para envíos"
    loReport.ShowPreviewDialog()

    Catch
    loReport.Name = "Listado de guías para envíos"
    loReport.ExportOptions.PrintPreview.DefaultFileName = "Listado de guías para envíos"
    loReport.ShowPreviewDialog()

    End Try
    End Using

    The problem is that the code is not executed from the layout and I really need the reports executes the code in order to show the data correctly.

    I try using Scripts, but I can not this to work.

    Hope you can help me.

    Regards

Page 1 of 1 (1 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED