I have created a report viewer that uses a stored produced, pulls the necessary information and displays the correct parameters for each SQL query. This all works fine - no problems at all.
However, I have been given a set of reports that are like linked to Lotus Notes and they therefore dont have a stored procedure within SQL database. I need to incorporate these into the report viewer. I know that because they dont have a stored procedure they therefore do not have any parameters to display...it will just display the report as it is.
So far...I have entered the name of the report and its file path into a table in the SQL database which is then displayed on the drop down list on the report viewer for the user to select from. When the user selects a report that is linked to Lotus Notes, and then selects the "Display Report" button, I encounter a runtime error saying...
Invalid pointer
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Runtime.InteropServices.COMException: Invalid pointer
Source Error:
Line 262: tableLogonInfo = table.LogOnInfo; |
To overcome this...I have so far created an extra column within my table and called it "flag". I have then given the reports linked to Notes a value of "1" and the reports that have a stored procedure a value of "0"...
I was then thinking of doing a possible IF statement of some sort so that when the user does select the non store procedure reports it will just display the report etc...
Am I thinking in the right direction?? Or can anyone provide me with an example of how to go about doing this???
Any help - will greatly be appreciated.
P.s. I hope all this makes sense..
Thanks,
Mic
Replies
Know the answer? Post it — somebody with the same question will find it here.