Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
39 views3 pages

Procedimientos Sin para Metros

This document describes procedures for generating Crystal reports without parameters. It defines three web forms that allow filtering Crystal reports based on: 1) A year, start date, and end date passed to the selection formula. 2) A year and company name passed to the selection formula. 3) A start and end date passed to the selection formula after converting them to dates.

Uploaded by

Henry Amaya
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views3 pages

Procedimientos Sin para Metros

This document describes procedures for generating Crystal reports without parameters. It defines three web forms that allow filtering Crystal reports based on: 1) A year, start date, and end date passed to the selection formula. 2) A year and company name passed to the selection formula. 3) A start and end date passed to the selection formula after converting them to dates.

Uploaded by

Henry Amaya
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

PROCEDIMIENTOS SIN PARAMETROS

Partial Public Class _Default Inherits System.Web.UI.Page Protected Sub btnMostrarReporte_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnMostrarReporte.Click CrystalReportViewer1.ReportSource = Nothing Dim ao As Integer = DropDownList1.Text Dim fechaI As String = TextBox2.Text Dim fechaF As String = TextBox3.Text Dim strformula As String strformula = "{Orders.OrderDate} in Date (" & ao & "," & fechaI & ",01) to date ( " & ao & "," & fechaF & ",30)" CrystalReportViewer1.SelectionFormula = strformula CrystalReportViewer1.ReportSource = Server.MapPath("CrystalReport5.rpt") End Sub End Class

Partial Public Class WebForm2 Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click CrystalReportViewer1.ReportSource = Nothing Dim ao As Integer = ListBox1.Text Dim Companyname As String = TextBox1.Text Dim strformula As String strformula = "Year({Orders.OrderDate})= " & ao & " And {Customers.CompanyName} ='" & Companyname & "'" CrystalReportViewer1.SelectionFormula = strformula CrystalReportViewer1.ReportSource = Server.MapPath("CrystalReport6.rpt") End Sub End Class

Partial Public Class WebForm3 Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click CrystalReportViewer1.ReportSource = Nothing Dim fechaI As String = CDate(TextBox1.Text) Dim fechaF As String = CDate(TextBox2.Text) Dim strformula As String strformula = "{Orders.OrderDate} in Date (" & Year(fechaI) & "," & Month(fechaI) & "," & Day(fechaI) & ") to date ( " & Year(fechaF) & "," & Month(fechaF) & "," & Day(fechaF) & ")" CrystalReportViewer1.SelectionFormula = strformula CrystalReportViewer1.ReportSource = Server.MapPath("CrystalReport7.rpt") CrystalReportViewer1.DataBind() 'www.elquille.info/vb/crystal/crystal_04.htm End Sub End Class

You might also like