Hi!
I am evaluating how far i can go in implementing repoting features of SRS in
my program.
I want to be able to write a Windows form (in C#) that has a grid/list
containing all the reports that I have made. The list may have been
previously enterd into the database along with other information needed to
run the particular report.
I want to be able to select in the grid/list(e.g. using a check box) which
reports to run, and what format to render each individual report, as well as
other parameters.
Is the Report Manager that extensible? Is it possible to create this sort of
replacement for Report Manager from C#?
I am using VS2005 and SRS 2005.
Thanks in advance!It is absolutely possible... I have written a report for a customer which
searches the reporting services met data database and returns a list of
reports which match the search criteria the customer wants.. It creates a
report which displays the report name, directory and description... Each
report name is a hot link to run the report... This was done in a report!~
Using a programming language you can do anything you wish... There is a
ReportViewer control ( Search for ReportViewer in Books on line.) that you
can use..
There are sample programs in the SQL directory /90 subdirectory which will
help get you started...
Reporting Services is also just a DotNet Web service, with an entire API
which can you call from your program as well.. It is the same API that MS
uses in the Report Manager..
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"PacMan" wrote:
> Hi!
> I am evaluating how far i can go in implementing repoting features of SRS in
> my program.
> I want to be able to write a Windows form (in C#) that has a grid/list
> containing all the reports that I have made. The list may have been
> previously enterd into the database along with other information needed to
> run the particular report.
> I want to be able to select in the grid/list(e.g. using a check box) which
> reports to run, and what format to render each individual report, as well as
> other parameters.
> Is the Report Manager that extensible? Is it possible to create this sort of
> replacement for Report Manager from C#?
> I am using VS2005 and SRS 2005.
> Thanks in advance!
Showing posts with label program. Show all posts
Showing posts with label program. Show all posts
Monday, March 26, 2012
replacement for report manager
Wednesday, March 21, 2012
Replace DB Files while Offline ... Potential Problems?
I have created a program using SQL-DMO to replace an SQL Server 2000 database by setting it OFFLINE, replacing the .MDF and .LDF and then setting the database back ONLINE.
SQL Server does permit replacing the files while offline. And when the database is back online, everything seems to have worked perfectly with the new database files.
My questions is ... What potential problems (if any) exist with this process replacing a database?
Other methods I have considered:
- Detach, replace DB files, re-attach
- Delete old database, attach-using-new-DB-files
Thanks for your input!!The problem you've followed to detach, rename and re-attach is fine. As the SQL server doesn't remember the previous database names and when you detach the name &* details will be cleared from sysdatabases table.
By any reason if there is a mismatch of filenames with .MDF and .LDF then you will have issue of re-attachign the database.
BTW can you explain why you need to this on regular basis?|||Thx for the reply,
Because I am just updating the same SQL database with 2 new database files (.mdf and .ldf) with the same file names, I figure setting the database offline in order to do the 'file replacement' would be more efficient than detaching the database.
You mentioned that the process of (Detach)-(Rename)-(ReAttach) is fine.
However, I am using the process of (Set Offline)-(Replace .mdf/.ldf)-(Set Online). Would there be any problems when this method is used?
This 'database replacement' process is needed because databases sometimes gets corrupted for various reasons, and it needs to be 'sent in' to repair. The fixed database is sent back to the user and replaces their corrupted database.
Thanks again.|||more efficient? the dettach and reattch sp's are real fast.|||As long as you carryon such rename operations during SQL offline then you will not have any issues, otherwise SQL will flag inconsistency with mismatche of files.
Any reason and investigation on why the database is corrupted?
If you can fix the problem then you can reduce round-robin method. ;-)|||The 'data corruption' problems I had previously mentioned, are only at the data-level (caused by errors in the client program) and not at the database-level. Sorry for the confusion.
And when I say 'more efficient', I had some quicker response times setting a database OFFLINE/ONLINE then DETACH/RE-ATTACH. Also in code (SQL-DMO), setting a detabase offline/online is as simple as setting a boolean flag to true/false, whereas the detach/attach method requires full path names to the .MDF and .LDF.
Thx again for your responses.|||User mappings can be lost in this sort of operation. Does the client have to re-add those?
Hopefully this is not terribly important data. Especially if the database has to be 'sent in' for repairs. Sorry, but it just rubs me the wrong way.|||Thanks for the excellent reminder... a custom database USER and ROLE is used. All 'repairs' are applied to on the same database received (which will also be the same one sent back to the client). I will definately keep this in mind when testing.
And yes, it rubs me the wrong way as well... but that is another story :)
... and I plan to add backups and restores to avoid this whole process of 'sending and receiving' of an entire database.
Thx again!
SQL Server does permit replacing the files while offline. And when the database is back online, everything seems to have worked perfectly with the new database files.
My questions is ... What potential problems (if any) exist with this process replacing a database?
Other methods I have considered:
- Detach, replace DB files, re-attach
- Delete old database, attach-using-new-DB-files
Thanks for your input!!The problem you've followed to detach, rename and re-attach is fine. As the SQL server doesn't remember the previous database names and when you detach the name &* details will be cleared from sysdatabases table.
By any reason if there is a mismatch of filenames with .MDF and .LDF then you will have issue of re-attachign the database.
BTW can you explain why you need to this on regular basis?|||Thx for the reply,
Because I am just updating the same SQL database with 2 new database files (.mdf and .ldf) with the same file names, I figure setting the database offline in order to do the 'file replacement' would be more efficient than detaching the database.
You mentioned that the process of (Detach)-(Rename)-(ReAttach) is fine.
However, I am using the process of (Set Offline)-(Replace .mdf/.ldf)-(Set Online). Would there be any problems when this method is used?
This 'database replacement' process is needed because databases sometimes gets corrupted for various reasons, and it needs to be 'sent in' to repair. The fixed database is sent back to the user and replaces their corrupted database.
Thanks again.|||more efficient? the dettach and reattch sp's are real fast.|||As long as you carryon such rename operations during SQL offline then you will not have any issues, otherwise SQL will flag inconsistency with mismatche of files.
Any reason and investigation on why the database is corrupted?
If you can fix the problem then you can reduce round-robin method. ;-)|||The 'data corruption' problems I had previously mentioned, are only at the data-level (caused by errors in the client program) and not at the database-level. Sorry for the confusion.
And when I say 'more efficient', I had some quicker response times setting a database OFFLINE/ONLINE then DETACH/RE-ATTACH. Also in code (SQL-DMO), setting a detabase offline/online is as simple as setting a boolean flag to true/false, whereas the detach/attach method requires full path names to the .MDF and .LDF.
Thx again for your responses.|||User mappings can be lost in this sort of operation. Does the client have to re-add those?
Hopefully this is not terribly important data. Especially if the database has to be 'sent in' for repairs. Sorry, but it just rubs me the wrong way.|||Thanks for the excellent reminder... a custom database USER and ROLE is used. All 'repairs' are applied to on the same database received (which will also be the same one sent back to the client). I will definately keep this in mind when testing.
And yes, it rubs me the wrong way as well... but that is another story :)
... and I plan to add backups and restores to avoid this whole process of 'sending and receiving' of an entire database.
Thx again!
Tuesday, March 20, 2012
Repetitive SQL Tasks
Thanks in advance.
I am new to sql script area.
Below is my ugly program.
Help, please)
There should be a better code to handle these repetitive tasks.
/* DECLARE Part Omitted */
SET @.Job_Code_A = '(Job_Type = ''A'')';
SET @.Job_Code_B = '(Job_Type = ''B'')';
.... And so on
SET @.SQL1 = 'Select Count(*) FROM tblWorkorders WHERE' + @.Job_Code_A;
SET @.SQL2 = 'Select Count(*) FROM tblWorkorders WHERE' + @.Job_Code_B;
..... And so on
EXEC (@.SQL1);
EXEC (@.SQL2);
..... And so on
Why do you need dynamic SQL? You can do:
select o.Job_Type, count(*)
from tblWorkOrders as o
where o.Job_Type in ('A', 'B')
group by o.Job_Type;
|||Thank you for reply.
I need to use three-level depth loops from outer conditions.
Wednesday, March 7, 2012
repairing damaged sql server MDF and LDF files
I found this program on the web...we just had the same
thing happen and I wondered if anyone has used it (I
posted this as a topic)...it's called MSSQLRECOVERY 2.0
and can be found at www.mssqlrecovery.com
Kevin
>--Original Message--
>Hi All,
>My SQL server's data files all corrupted during a severe
power failure, we manage to get back the data files and
reinstall the sql server. but unforunately we failed to
attaching the database back to the server. The error
message indicating it is caused by corrupted MDF or LDF
files.
>Is there a way to perform a file level repair before we
can attach it back to sql server again ?
>Any help is very much appreciated.
>Bernard Gh
>.
>
Hi there,
We have tried that, but the result isn't impressive for us (2 tables out of 20+), perhaps the corruption is too servere for our case. but you can try your luck.
what other program have you tried ?
Bernard goh
"Kevin" wrote:
> I found this program on the web...we just had the same
> thing happen and I wondered if anyone has used it (I
> posted this as a topic)...it's called MSSQLRECOVERY 2.0
> and can be found at www.mssqlrecovery.com
> Kevin
>
> power failure, we manage to get back the data files and
> reinstall the sql server. but unforunately we failed to
> attaching the database back to the server. The error
> message indicating it is caused by corrupted MDF or LDF
> files.
> can attach it back to sql server again ?
>
thing happen and I wondered if anyone has used it (I
posted this as a topic)...it's called MSSQLRECOVERY 2.0
and can be found at www.mssqlrecovery.com
Kevin
>--Original Message--
>Hi All,
>My SQL server's data files all corrupted during a severe
power failure, we manage to get back the data files and
reinstall the sql server. but unforunately we failed to
attaching the database back to the server. The error
message indicating it is caused by corrupted MDF or LDF
files.
>Is there a way to perform a file level repair before we
can attach it back to sql server again ?
>Any help is very much appreciated.
>Bernard Gh
>.
>
Hi there,
We have tried that, but the result isn't impressive for us (2 tables out of 20+), perhaps the corruption is too servere for our case. but you can try your luck.
what other program have you tried ?
Bernard goh
"Kevin" wrote:
> I found this program on the web...we just had the same
> thing happen and I wondered if anyone has used it (I
> posted this as a topic)...it's called MSSQLRECOVERY 2.0
> and can be found at www.mssqlrecovery.com
> Kevin
>
> power failure, we manage to get back the data files and
> reinstall the sql server. but unforunately we failed to
> attaching the database back to the server. The error
> message indicating it is caused by corrupted MDF or LDF
> files.
> can attach it back to sql server again ?
>
repairing damaged sql server MDF and LDF files
I found this program on the web...we just had the same
thing happen and I wondered if anyone has used it (I
posted this as a topic)...it's called MSSQLRECOVERY 2.0
and can be found at www.mssqlrecovery.com
Kevin
>--Original Message--
>Hi All,
>My SQL server's data files all corrupted during a severe
power failure, we manage to get back the data files and
reinstall the sql server. but unforunately we failed to
attaching the database back to the server. The error
message indicating it is caused by corrupted MDF or LDF
files.
>Is there a way to perform a file level repair before we
can attach it back to sql server again ?
>Any help is very much appreciated.
>Bernard Gh
>.
>Hi there,
We have tried that, but the result isn't impressive for us (2 tables out of
20+), perhaps the corruption is too servere for our case. but you can try yo
ur luck.
what other program have you tried ?
--
Bernard goh
"Kevin" wrote:
> I found this program on the web...we just had the same
> thing happen and I wondered if anyone has used it (I
> posted this as a topic)...it's called MSSQLRECOVERY 2.0
> and can be found at www.mssqlrecovery.com
> Kevin
>
>
> power failure, we manage to get back the data files and
> reinstall the sql server. but unforunately we failed to
> attaching the database back to the server. The error
> message indicating it is caused by corrupted MDF or LDF
> files.
> can attach it back to sql server again ?
>
thing happen and I wondered if anyone has used it (I
posted this as a topic)...it's called MSSQLRECOVERY 2.0
and can be found at www.mssqlrecovery.com
Kevin
>--Original Message--
>Hi All,
>My SQL server's data files all corrupted during a severe
power failure, we manage to get back the data files and
reinstall the sql server. but unforunately we failed to
attaching the database back to the server. The error
message indicating it is caused by corrupted MDF or LDF
files.
>Is there a way to perform a file level repair before we
can attach it back to sql server again ?
>Any help is very much appreciated.
>Bernard Gh
>.
>Hi there,
We have tried that, but the result isn't impressive for us (2 tables out of
20+), perhaps the corruption is too servere for our case. but you can try yo
ur luck.
what other program have you tried ?
--
Bernard goh
"Kevin" wrote:
> I found this program on the web...we just had the same
> thing happen and I wondered if anyone has used it (I
> posted this as a topic)...it's called MSSQLRECOVERY 2.0
> and can be found at www.mssqlrecovery.com
> Kevin
>
>
> power failure, we manage to get back the data files and
> reinstall the sql server. but unforunately we failed to
> attaching the database back to the server. The error
> message indicating it is caused by corrupted MDF or LDF
> files.
> can attach it back to sql server again ?
>
Subscribe to:
Posts (Atom)