Tuesday, March 27, 2012
External stored procedure, performance?
I should begin to write a DLL library for Sql2000 server.
The functions I like to implement are mathematical functions, like standard
deviation, and similar, nothing really complex. Often I have to use more
then one standard deviation inside the sama function, using subset of a
record set.
Of course I can use sql2000, that implemets standard deviation and basic
mathematical function, so the question is: is it opportune to write a DDL to
improve performance, or is it worse, or just the same?
thanks a lot for any kindly advice
cesareI think the key words here are "using a subset of a recordset". Based on
that I would implement it in T-SQL, or on the application side but not in an
XP. The cost of connecting back to the SQL Server to grab a subset of rows
is going to be big, especially if you perform this std dev calc several
times in a row.
"Cesare" <cvairetti@.mcgestioni.it> wrote in message
news:uO9XdpvjGHA.1640@.TK2MSFTNGP02.phx.gbl...
> Hi everybody,
> I should begin to write a DLL library for Sql2000 server.
> The functions I like to implement are mathematical functions, like
> standard
> deviation, and similar, nothing really complex. Often I have to use more
> then one standard deviation inside the sama function, using subset of a
> record set.
> Of course I can use sql2000, that implemets standard deviation and basic
> mathematical function, so the question is: is it opportune to write a DDL
> to
> improve performance, or is it worse, or just the same?
> thanks a lot for any kindly advice
> cesare
>sql
Friday, March 23, 2012
Extent of Dundas functionality
supplied by Dundas in my web application. My question is this:
Is the chart control available for use on web pages not created via MS
RS? I will be running MS RS and MS SQL on one machine and IIS on
another. In my web app I have need to make some simple bar charts on
one page.No, the Dundas chart that shipd with Reporting Services is only available in
the context of a report. If you would like programmitic control over the
chart in your application, you would need to license it seperately.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"MarkMurphy" <murphy@.murphysw.com> wrote in message
news:e061eb57.0406180948.687427ca@.posting.google.com...
> I'm planning to implement MS RS and to take advantage of the charting
> supplied by Dundas in my web application. My question is this:
> Is the chart control available for use on web pages not created via MS
> RS? I will be running MS RS and MS SQL on one machine and IIS on
> another. In my web app I have need to make some simple bar charts on
> one page.sql
Wednesday, March 21, 2012
Extended stored procedure, performance?
I should begin to write a DLL library for Sql2000 server.
The functions I like to implement are mathematical functions, like standard
deviation, and similar, nothing really complex. Often I have to use more
then one standard deviation inside the sama function, using subset of a
record set.
Of course I can use sql2000, that implemets standard deviation and basic
mathematical function, so the question is: is it opportune to write a DDL to
improve performance, or is it worse, or just the same?
thanks a lot for any kindly advice
cesare"Cesare" <cvairetti@.mcgestioni.it> wrote in message
news:et2MIqvjGHA.4304@.TK2MSFTNGP03.phx.gbl...
> Hi everybody,
> I should begin to write a DLL library for Sql2000 server.
> The functions I like to implement are mathematical functions, like
> standard
> deviation, and similar, nothing really complex. Often I have to use more
> then one standard deviation inside the sama function, using subset of a
> record set.
> Of course I can use sql2000, that implemets standard deviation and basic
> mathematical function, so the question is: is it opportune to write a DDL
> to
> improve performance, or is it worse, or just the same?
>
Extended stored procedures are so dangerous to the stability of the database
server that they should be used very, very carefully.
In SQL 2005 CLR integration provides a safe way to extent the SQL engine
with custom calculations.
David
Extended stored procedure to implement sequence
Hello,
I want do implement an extended stored procedure to implement an oracle sequence in sql server 2000. I need that because i have a script with more than 75000 lines, full of inner selects (for oracle) of the kind:
insert into table1 (col1_1, col1_2, col1_3)
(select col2_1, col2_2, some_sequence.nextval from table2)
I need to port this script to run in sql server. I have a table to implement sequences, in my sql server db, of the kind:
table mysequence (
sequence_name varchar(100),
sequence_id decimal
)
I need a function that will replace 'some_sequence.nextval' for a function that reads mysequence table AND updates it. What happens is that sql server doesn't let me use a update statement inside a function. Well, I was thinking of a extended stored procedure approach, which would update mysequence table and would be called inside a function. Is that possible? Is there any code in C to implement this kind of thing?
I would appreciate any kind of help!
Thanks,
Henrique Faria
If you can change your query can I ask why you can't change it to just
insert into table1 (col1_1, col1_2)
(select col2_1, col2_2 from table2)
i.e let sql generate the identity value?
|||You could do it using an extended stored procedure. But there are lot of stability, reliability, performance, and scalability issues to consider. Your best bet is to use the identity column in SQL Server to generate the sequential values.sqlWednesday, February 15, 2012
Exporting SQL Server 2005 Reporting Services reports to PDF
Hi All
I would like to implement the functionality offered by SQL Server 2005 Reporting Services that
exports the report to PDF, but I want to do it in my C# 2005 application.
Can I do this? How?
Please help.
khuzwayom
Sure. See code here. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1715591&SiteID=1
>L<
|||Thank you so much Lisa, Iwill try your code tomorrow.
Don't you import anything or add any references?
Thank You
khuzwayom
|||>>
Don't you import anything or add any references?
<<
I've fully-namespaced all the instancing of objects in that sample, I'm pretty sure -- so you will probably have no problem figuring out what references are required. If you do, holler...
>L<
|||Lisa,
I have a question with this particular line and not sure how to use it my project.
http://localhost/reportserver/?/Report+Project1/TestCity&rs:Command=Render&rs:format=EXCEL)
In my project based on the values sent by a ddl i am displaying 2 kinds of reports. and they are being stored in the report server. and when clicks on the Export link button in the report viewer control, i want to save that file as an PDF. So how should i do it?
Dim ox As System.Net.HttpWebRequest = _
System.Net.HttpWebRequest.Create _
(http://192.168.0235/Statements/StatementMain&rs:Command=Render&rs:format=PDF)
i tried using ur code snipet and got the following error
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
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.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Source Error:
Line 123: ' the line above may not work for you, you may have to provide credential information with more work Line 124: Line 125: Dim oy As System.Net.HttpWebResponse = ox.GetResponse() Line 126: Dim raw As System.IO.FileStream = New System.IO.FileStream("c:\Documents and Settings\Karen\Desktop\p.pdf", IO.FileMode.Create) Line 127: ' for a PDF, change the extension in the line above, along with changing its
any help will be appreciated.
Regards
Karen
|||I think your problem is simply figuring out the right URL, Karen.
I don't think you should be using http://192.168.0235/Statements, although it is hard for me to say exactly what the right URL is for you.
Here is what I think you should do:
1) check your Reporting Services configuration. There are two web server applications set up for RS. One is the Report Manager site, one is the Report Server site.
By default, the former is http://<server>/Reports, and the other is http://<server>/ReportServer. The latter is the one we want to use.
OK so far? I don't know the web site aliases or virtual directories on your box, but the web application we want to talk to is the Report Server.
2) "Visit" that site interactively in your browser. It does not look like Report Manager. You should see browable directories, instead.
3) In your browser, drill down to the report that you want to use from the ReportServer root. You can actually run the report interactively this way. This should give you most of the URL that you need.
4) Finish off the URL with parameters as shown in my sample code for your programmatic pull.
If this doesn't help, then please check the RS docs -- search using the term "URL access". You will find this described in detail.
HTH,
>L<
|||Lisa,
Is there is a way i can capture the event when the user clicks on the export button?
Regards,
Karen
|||Karen, this might be capturable in the ReportRefresh event, but just in case you're trying to do this to find out what the URL is... that is really the wrong way to go about the task... I hope the instructions I wrote earlier make sense to you, if not where are you stuck?
>L<
|||Lisa, thanks a lot for your answer, what i am really trying to do is let the user view the report using the report viewer control and after he checks whether the data is correct on the reports, then i wanted to capture the export button event and save the report link to the database instead of letting the user save it somewhere else. Any ways i will try looking into the reportrefresh event to see if i can do it.
Regards
Karen
|||Sorry, Karen, we've been having this discussion on another thread and it looks likeReportRefresh will *not* work. I suggested a couple of other events that might solve the other guy's need to capture this event, but I'm not going to refer you there because I really don't think that this is pertinent to what *you* are "really trying to do".
You are using the reportviewer as a preview and then capturing the PDF after user validation, fine. My point is that capturing the export event is not the right way to go about the second action. Having a separate button on the form that indicates "yes, go ahead and save the PDF, the results are correct", *outside* the reportviewer control is the way to go about it.
When your server receives that user response it can then save the PDF whereever you want it to go, using the code discussed here previously, and the proper URL access.
Anyway, that's my opinion...
>L<
|||Hi Lisa,
We are using the Render method to generate report in pdf format.
Currently around 2 documents (2 pdf files are being generated).
How can we merge the files generated into just 1 pdf file?
I tried merging the byte[] returned. The output displays only the last pdf eventhough the size of the new document equals sum of the size of the other 2 documents.
|||Hi AS2007,
The short answer to your question is "a PDF document has a specialized format, which includes a prolog or header that describes the whole document. So you can not just put two of them together like that. But it is possible to do it, certainly from a C# app. You just need to go back to first principles. (Think about : What is a PDF, really?)"
Here's the long answer:
The right way would be to take the output of the two reports, whether as EMFs or a PDF or whatever, and push them out to postscript, from whence they can be converted to a PDF using freely-available tools.
I am going to quote myself from another forum <sigh> because I've answered this question a whole bunch of times for programmers in different environments.
There is other stuff that I don't say in this particular post about how to dynamically check for a PostScript driver setup, and dynamically add such a setup if necessary, brand it to your app, etc. But all that is standard Windows stuff. There is nothing specific about RS in any of it.
HTH,
>L<
-
Is this using the ReportViewer control (client-side) or server side?IAC -- here is what I know on this issue,which is not particular Reporting
Services specific:1) It is easy to move multiple source files into a PDF file if the source
files are in postscript.2) Most printing engines can write postscript files simply by specifying a
postscript print driver3) postscript drivers come with the OS.
4) It is easier to manage this type of activity client-side than
server-side, for many reasons.Here is some advice for you:
You can find a demo app with code for printing reports without UI, using the
ReportViewer control, on this page. http://www.gotreportviewer.com/I expect it can be adapted to go to a ps printer driver and given target
file information (or the ps driver setup can be set to go to a file target
explicitly -- but that doesn't seem thread safe to me).Then you can use standard postscript to PDF capabilites to convert the
string of files you just wrote out. I use Ghostscript to do this, you don't
need Adobe and you don't need any UI for this step either.You can learn about Ghostscript here http://www.ghostscript.com/awki There
is a overview of command-line switches here
http://ghostscript.com/doc/8.54/Use.htm#Options -- for your purposes, pay
particular attention to the ability to create a commandfile listing all the
switches as well as all the files you wish to process in this run (more
flexible than listing the files directly on the command line if your list
may be long). You may prefer to use the API directly (DLLs rather than
command-line). It's quite extensive.>L<
"Rob" <Rob@.discussions.microsoft.com> wrote in message
news:BB990321-62C2-4EEC-9535-9C870DE7BC6A@.microsoft.com...
> Is it possible to render multiple reports and then export them to 1 PDF
> file?
> If so, how can this be accomplished?