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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing Confirmation 1

Status
Not open for further replies.

Auguy

Programmer
May 1, 2004
1,206
US
Does anybody have an idea of how to do the following in Reprting Services 2000, VB.net and SQL? I have an invoice report that uses a stored proc to retrieve the invoices to print based on user specified parameters. This works just fine. My problem is how to set an invoice printed flag in the SQL database. If I select the records based on the user specified parameters after or before the report is run there is a slim chance that I could get a different set of records. Is there a way to pass a list of identity values to the report(there may be up to a hundred)? Can the report pass back a table? Maybe I just need some guidance in the flow of the logic as in how to approach this situation?

Auguy
 
As far as I know, SQL Server Reporting Services can NOT update the database.

You could try by passing in values to a stored Procedure data set, but I doubt it will work.

If it does, though, let us know. Always willing to learn something new. @=)



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Maybe this will give you some ideas; it is how I print invoices.

1) I populate a table on SQL Server with the invoices selected based on the entered parameters.

2) I then run the report for only the invoices in that table.

3) Then, I run a stored procedure from VB that updates the invoice printed flag using the values from that table. The reason I do this in a separate stored procedure from 2) is that I want the user to confirm in VB that the invoice printed before I update the flag.

I clear out the table each time before I run the initial selection into it.

Andrea
 
Thanks Andrea. I was thinking of something very similar to what you suggested. How are you handling multiple users with this table? Is this a temporary table?

Auguy
 
Auguy,
It's a permanent table. We only have one person in our company that runs invoices, so I don't worry about multiple users. But you could probably add another column to the table for user ID and handle it that way.
Andrea
 
Thnaks again. I will probaly use that approach.

Auguy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top