Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ReportViewer Custom Field Question

Status
Not open for further replies.
Jul 19, 2005
5
US
Greetings Everyone,

Hopefully this will be a quick question. I'm working on a billing system, and I'm pretty much in the final stages of putting the reports together before deployment. I'm running into an issue with the Reports.

In the past I have used Microsoft Access as my data storage medium. In Microsoft Access when you are building a report you can program a text field to do this =([Enter Date of Letters]) and when you run the report a pop-up box will appear prompting you to enter the date for the letters. The value of that box will then transfer to the Access Report.

Is there a similar way to do this with VB2008 and ReportViewer. I have designed the whole report - except for the ability to put in a custom date. I need the flexibility of something like an inputbox because of the frequency of when we run billing reports.

Can anyone provide any suggestions?

Thank you in advance for your help!

Rich
 
You just add a parameter to your Parameters section of your report for your date, and then code it into your query and map it in your query's parameters section. If you named your parameter @DateOfLetters, then your query would look like:

Code:
SELECT * FROM SomeTable WHERE SomeColumn = @DateOfLetters

I'm not sure about Access though, if that doesn't work, then it will have you name your parameters differently. Someone else may know.
 
Thanks for the reply. In looking at the reply I guess I forgot to add this to the problem.

When we bill - we pull the information by an established billing date. I have a query that works perfectly at pulling that info. The only factor we won't in advance is the date we are sending the letters out. This is the part that I'm looking to add on the fly when we run the report. The date of letters is not something we store in our database since it has no relevance other than to be placed on the letters the day we run the report.

Is it possible to get an inputbox (or something) to run to simply pass a date from the inputbox to the textbox on the report.rdlc with the date we supply?

Again - thanks for the help on this issue!

Rich
 
That's what I am saying. When you add a parameter, it creates a proper control for you in the parameters section of the report.
 
RiverGuy, thanks for the info thus far. I have to say I'm still about as confused as a monkey trying to do an algebra problem...

I created a field in my db for the letter date. I added a query that looks for the billing date and the letter date (dateofletter).

I added a parameter to the report called dateofletter (which is the same name as the field in the database). Currently that is an empty field as nothing gets entered into that field.

Where I am stuck now is getting the report to prompt me to enter the date of the letter...

Sorry to be so difficult on this - spent 3 days trying to find out info on this before posting back...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top