Friday, February 24, 2012

Can I Update a SQL Database...

We have a SSRS report that needs to update a specific table in the SQL db it
is using to let us know when an invoice has been printed, and we'd like to
flag that specific invoice (or set of invoices). Is this possible?
I had thought about creating a stored procedure that gets called that really
doesn't return any required data, but could update the db, or custom code.
What would be the better approach? I've never connected/written to a db via
custom code before so any articles/samples you may know about and can provide
links to would be greatly appreciated.
Michael COn Oct 11, 11:44 am, Michael C <Micha...@.discussions.microsoft.com>
wrote:
> We have a SSRS report that needs to update a specific table in the SQL db it
> is using to let us know when an invoice has been printed, and we'd like to
> flag that specific invoice (or set of invoices). Is this possible?
> I had thought about creating a stored procedure that gets called that really
> doesn't return any required data, but could update the db, or custom code.
> What would be the better approach? I've never connected/written to a db via
> custom code before so any articles/samples you may know about and can provide
> links to would be greatly appreciated.
> Michael C
I have to agree that the idea you mentioned would be the best
alternative for performance and ease of change; however, if you want
to go the custom code route, here's a link that might be helpful.
http://msdn2.microsoft.com/en-us/library/ms155798.aspx
Of course, you would place the custom code in Layout view >> Report
drop-down >> Report Properties... >> Code. As far as I know, it
accepts pretty standard VB.NET code w/a few minor limitations. Hope
this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Thanks E!
As it turns out (I guess I miss understood the request) I need to try and
capture only the ones that are actually sent to the printer! Now I'm back to
square one with no idea how I'm going to do that. Any suggestions of how to
capture a print command in SSRS?
Michael C.
"EMartinez" wrote:
> On Oct 11, 11:44 am, Michael C <Micha...@.discussions.microsoft.com>
> wrote:
> > We have a SSRS report that needs to update a specific table in the SQL db it
> > is using to let us know when an invoice has been printed, and we'd like to
> > flag that specific invoice (or set of invoices). Is this possible?
> >
> > I had thought about creating a stored procedure that gets called that really
> > doesn't return any required data, but could update the db, or custom code.
> > What would be the better approach? I've never connected/written to a db via
> > custom code before so any articles/samples you may know about and can provide
> > links to would be greatly appreciated.
> >
> > Michael C
>
> I have to agree that the idea you mentioned would be the best
> alternative for performance and ease of change; however, if you want
> to go the custom code route, here's a link that might be helpful.
> http://msdn2.microsoft.com/en-us/library/ms155798.aspx
> Of course, you would place the custom code in Layout view >> Report
> drop-down >> Report Properties... >> Code. As far as I know, it
> accepts pretty standard VB.NET code w/a few minor limitations. Hope
> this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>

No comments:

Post a Comment