parameter crystal report

bjr149

New member
Joined
Oct 4, 2005
Messages
2
Programming Experience
Beginner
im have an audit table in my db, and i want the user to be able to put in 2 dates and i return the recrds that happened in between then. I have the stored procedure working just fine. Im a little confused on the asp.net part of it. i have the version of cr that comes with visual studio 2003. im not using the crystal viewer becuase that stupid error control comes up so i said forget that. so what i do is have a bunch of reports right now that i jsut export diretly to pdf. now i need to create some parameter reports. the problem for me is im trying to call the stored procedure from within the GUI provided with crystal reports, but i cant get past the add command spot it keeps telling me vairbale doesnt exist when i try to put in a parameter. im not really sure how to create this on the fly with the parameters, i dont really care how i do it i just know i ahve to get it to work asap! has anyone else done this and maybe can give me an example? i was thinking i could just call a stored proc to populate a dataset, then set the ds to the report reportdsource. But i would like to just go directly from stored to report if possible? Thanks for the help
 
I have a date selection form. One date/time picker for start date, one for end date. On that form I set global variables to the selected values.

public variables Module:
VB.NET:
    Public dStartdate As Date
    Public dEndDate As Date
StartEndDates form accept button code:
VB.NET:
             dStartdate = editStartDate.Text
            dEndDate = editEndDate.Text

It is easy to pass crystal reports the date variables to be used however, record selection for example.

The parameters in the report are called StartDate & EndDate
Whenever you need to pass a value to a report parameter:
VB.NET:
        Dim MonthlySales As New rptSalesReport

        MonthlySales.SetParameterValue("StartDate", dStartdate)
        MonthlySales.SetParameterValue("EndDate", dEndDate)
.


hope this helps,
 
Back
Top