Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

Wednesday, March 28, 2012

is it possible to know whether report still executing

Hi friends
i've .net app where display reports from report server using SOAP api.
all works fine. my question is,
i have a export button on my screen to export to different formats.
whats happening is , as you know, when load report it says "report being generated" ,right ?
so our users clicking export button before report is loaded into report viewer control.
is it possible to know whether the report is still being loaded ?
Thanks for your help

Are you using winforms or webforms?

With the winforms ReportViewer control, you can use the RenderingComplete event.

If you are using webforms, there is no client side event that exposes this information I have not tried, but it might be possible to determine when the page finishes loading using the body onload event.

|||

Thanks for that Brian.

Yes , am using a winform with a report viewer control.

i'll give a try using "RenderingComplete" event.

Thanks for your help

|||

Hi prk,

i wanted a help from u, how are u uploading files to the reporting server.

i wanted it to programmatically instead of manual upload, all the help from this FORUM i got is that, i should use SOAP API. which i am not able to do it.

I am new to .NET technology. if u have any samples with SOAP API please send it to me

sureshk@.dcons.com / sureshbabu_krish@.yahoo.com

|||

Thanks Brian

That worked nicely :)

|||Suresh
i've not done that part.at the moment all reports created by report builder by our end users. and i just use soap api to load reports .
anyway to help you on this ,you need to give web reference to 2 services. one is for report management and the other one is report execution end points. these references create a proxy class for you in ur project. thats using SOAP api.
see following books online link on how to add web reference
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.SQL.v2005.en/rptsprg9/html/b1217843-8d3d-49f3-a0d2-d35b0db5b2df.htm

once you add web reference now you can access report server within ur .net app.
check following examples in books online
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.SQL.v2005.en/samp9/html/33e026d8-3750-436f-a5aa-1d5f98a41eef.htm

following should help you in what u want. it talks abt how to add reports to report server programmatically
http://msdn2.microsoft.com/en-us/library/microsoft.wssux.reportingserviceswebservice.rsmanagementservice2005.reportingservice2005.createreport.aspx

let me know how you are going with this.
Best of luck

is it possible to know whether report still executing

Hi friends
i've .net app where display reports from report server using SOAP api.
all works fine. my question is,
i have a export button on my screen to export to different formats.
whats happening is , as you know, when load report it says "report being generated" ,right ?
so our users clicking export button before report is loaded into report viewer control.
is it possible to know whether the report is still being loaded ?
Thanks for your help

Are you using winforms or webforms?

With the winforms ReportViewer control, you can use the RenderingComplete event.

If you are using webforms, there is no client side event that exposes this information I have not tried, but it might be possible to determine when the page finishes loading using the body onload event.

|||

Thanks for that Brian.

Yes , am using a winform with a report viewer control.

i'll give a try using "RenderingComplete" event.

Thanks for your help

|||

Hi prk,

i wanted a help from u, how are u uploading files to the reporting server.

i wanted it to programmatically instead of manual upload, all the help from this FORUM i got is that, i should use SOAP API. which i am not able to do it.

I am new to .NET technology. if u have any samples with SOAP API please send it to me

sureshk@.dcons.com / sureshbabu_krish@.yahoo.com

|||

Thanks Brian

That worked nicely :)

|||Suresh
i've not done that part.at the moment all reports created by report builder by our end users. and i just use soap api to load reports .
anyway to help you on this ,you need to give web reference to 2 services. one is for report management and the other one is report execution end points. these references create a proxy class for you in ur project. thats using SOAP api.
see following books online link on how to add web reference
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.SQL.v2005.en/rptsprg9/html/b1217843-8d3d-49f3-a0d2-d35b0db5b2df.htm

once you add web reference now you can access report server within ur .net app.
check following examples in books online
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.SQL.v2005.en/samp9/html/33e026d8-3750-436f-a5aa-1d5f98a41eef.htm

following should help you in what u want. it talks abt how to add reports to report server programmatically
http://msdn2.microsoft.com/en-us/library/microsoft.wssux.reportingserviceswebservice.rsmanagementservice2005.reportingservice2005.createreport.aspx

let me know how you are going with this.
Best of luck|||

Hi;

I am working on report view of a web form. I am looking for some event can fire after a report rendering. I only find a RendingComplete event of report viewer in a window form. But I could not find a similarly enent in the web form. Could some one help me?

Jennifer Xu

Monday, March 26, 2012

is it possible to have variant condition clause in procedure?

i want to use OLEDB to build a COM for my app

in the case, i want to execute a select statement which the where-clause is variant.

ex,

select * from db1 where code='abc'

select * from db1 where name='mike'

As it's very difficult to change sql-command in oledb, i want to build a procedure like this,

create procedure viewDB
@.filter CHAR(20)

as

select * from db1 where @.filter

go

but failed!

i tried EXEC(select), but i cant get the variants when building a oledb consumer

No, you cannot pass the whole WHERE clause as a parameter. You could pass only values. In your case if this is predefined set of the types of conditions, then you could create additional parameter in your SP and pass type of the condition there. then, inside of SP, first check type of the query using IF statement and based on it call specific SQL

IF @.MyTYPE='A'

select * from db1 where code=@.filter

ELSE

select * from db1 where name=@.filter

|||

oh, yeah! why i didnt come up with this smart idea, haha

but i found a better solution, bind the columns manually!

|||What is that? Is it constracting SQL statement dinamically inside of SP?|||

no, it's not that!

is easy!

build a SP like this:

create procedure test
@.p char(40)
as
exec( 'select * from testdb where ' + @.p )
go

when executing this sp in sql-server, we can get the columns correctly! but, when using the ole-wizard to build a oledb consumer , the columns disappear. the fact is, the columns lay there steadily, it's ole-wizard didn't bind the columns for us, haha

so let's DIY

|||

But this is worst way to do. It is a pure SQL injection. If I pass next string in your parameter then it will be executed with the different result

Assuming I am passing next value in a parameter

1=1; SHUTDOWN --

Then it will execute your SELECT and then it will shutdown server completely. I could execute DELETE statement or something else. This is how hakers could get control of your server

|||

oh, thanks for telling me that!

but, what if i remove the string after the semi-colon?

my plan is to create a procedure, and use a ATL oledb consumer to access it, if i dont expose the SP name, i think the hackers wont hack me this way

|||They do not need to know your SP name. All the nee to do is to pass value like that to the parameter from your application and job is done. For example, if your screen accepts input for the parameter from outside then screen will accept this value and code will be executed. Another drawback of the dynamic SQL is that it is slower. It means your SP will be recompiled each time when you call it and new execution plan will be prepared.|||

really thanks this piece of infomation!

so, 'select * from table where col=@.p' is safe right?

ok, i will try to re-code my SP

|||

i fond it is almost impossible to code my SP like you suggestted, because my condition clause is so complicate.

i figured out this new plan, and i want to get some advice from you, thx

create procedure proc
@.p1 varchar(10),
@.p2 varchar(10),
...
@.pn varchar(10)

as

if @.p1 is not null
begin
select * into retTable from table where col1= @.p1
--select * into tmpTable from table where col1= @.p1
end
if @.p2 is not null
begin
if object_id('tmpTable) is not null
drop table tmpTable
select * into tmpTable from retTable where col2=@.p1
if object_id('retTable') is not null
drop table retTable
select * into retTable from tmpTable
end

if @.p3 is not null
begin
if object_id('tmpTable') is not null
drop table tmpTable
select * into tmpTable from retTable where col3=@.p3
if object_id('retTable') is not null
drop table retTable
select * into retTable from tmpTable
end

...
...

go

BUT, i wonder if it's efficiency !

could you give me some suggestion or a better solution, thx

|||

I see that code for the second and third IF statements is the same. Does it mean that it suppose to be something like below? It is not an actual code that could work, but shows an idea. If idea is correct then you could pass array of values as one parameter into stored procedure using XML string and then use it inside of the IN clause. If this is what you need, then I will post a code that shows how to pass arrfay of values into SP and how to use it there

if @.p2 is not null
begin
if object_id('tmpTable) is not null
drop table tmpTable
select * into tmpTable from retTable where col2 IN (@.p1, @.p3)
if object_id('retTable') is not null
drop table retTable
select * into retTable from tmpTable
end

|||

well, it should be 'col3' in the 3rd IF statement

so, u mean my idea wont work actually right?

what do u mean pass a parameter using XML string? how can i parse it in the SP?

|||

Here is my article about how touse XML to pass array of values into SP.

http://support.microsoft.com/kb/555266/en-us

I will try to think about ideas how to do this in your case and will let you know

|||

now i have a problem about injection attack!

could you tell me if the following code safe.

procedure sp_a
@.p CHAR(40)
as
select * from tab1 where col1=@.p
go

|||Yes, it is safe if you do not do anything else inside if this SP. Just small suggestion. If you can, select just the fields you need and avoid using *. It will impove performance

Is it possible to fire a WinForms app from SSRS?

Heya,

Imagine I've got a report with an 'Edit' button to the right of each record.

When the button gets clicked, I'd like to fire a WinForms app on the remote computer.

Is this possible? I'm thinking that I'd have to use the ReportViewer control, but I'm not sure...

Thanks for the insight.

Justin

One way you can accomplish this is to add hyperlink navigation to your "Edit" textbox. It can call a web page and pass in information identifying the data the user wants to edit. You can then either edit that information on a web page and redirect back to a refreshed view of the report. If you want a WinForms app, you can have that web page fire off a .net application (like we do with Report Builder), an embedded activex control, or an external application.

Thanks, Donovan.

Friday, March 9, 2012

Is it easy to upgrade from MSDE to Full blown SQL v2000

Hi,

Noob here....

Got server running app approaching 2gig limit using MSDE version of SQL. I've purchased the full version and just checking if there is anymore to it than inserting the CD and letting it find the MSDE version and upgrade it.

Also, don't remember getting a keycode with the CD - is this right?

Thanks for help :)

Kenny

(bump)

anyone?

|||

I have gone from 2000 msde to 2000 developers edition and never had a problem.

Do a backup of your databases and give it a try.

|||

I wish I had the same easy experience. So far my upgrade from MSDE 2k to full SQL never gives me the "Upgrade" option. I have to install a new instance.

This is in the course of migrating a SharePoint Services installation from the default MSDE database to SQL.

As this test server had SharePoint portal uninstalled and SQL 2k developer uninstalled, then SharePoint Services by themselves re installed, I wonder if the install wizard just somehow does not see the MSDE instance.

My co workers think I am making this up.. Any ideas as to why no upgrade?

Is it easy to upgrade from MSDE to Full blown SQL v2000

Hi,

Noob here....

Got server running app approaching 2gig limit using MSDE version of SQL. I've purchased the full version and just checking if there is anymore to it than inserting the CD and letting it find the MSDE version and upgrade it.

Also, don't remember getting a keycode with the CD - is this right?

Thanks for help :)

Kenny

(bump)

anyone?

|||

I have gone from 2000 msde to 2000 developers edition and never had a problem.

Do a backup of your databases and give it a try.

|||

I wish I had the same easy experience. So far my upgrade from MSDE 2k to full SQL never gives me the "Upgrade" option. I have to install a new instance.

This is in the course of migrating a SharePoint Services installation from the default MSDE database to SQL.

As this test server had SharePoint portal uninstalled and SQL 2k developer uninstalled, then SharePoint Services by themselves re installed, I wonder if the install wizard just somehow does not see the MSDE instance.

My co workers think I am making this up.. Any ideas as to why no upgrade?

Is it easy to upgrade from MSDE to Full blown SQL v2000

Hi,

Noob here....

Got server running app approaching 2gig limit using MSDE version of SQL. I've purchased the full version and just checking if there is anymore to it than inserting the CD and letting it find the MSDE version and upgrade it.

Also, don't remember getting a keycode with the CD - is this right?

Thanks for help :)

Kenny

(bump)

anyone?

|||

I have gone from 2000 msde to 2000 developers edition and never had a problem.

Do a backup of your databases and give it a try.

|||

I wish I had the same easy experience. So far my upgrade from MSDE 2k to full SQL never gives me the "Upgrade" option. I have to install a new instance.

This is in the course of migrating a SharePoint Services installation from the default MSDE database to SQL.

As this test server had SharePoint portal uninstalled and SQL 2k developer uninstalled, then SharePoint Services by themselves re installed, I wonder if the install wizard just somehow does not see the MSDE instance.

My co workers think I am making this up.. Any ideas as to why no upgrade?

Monday, February 20, 2012

Is cube browser available as seperate control for use in winforms app?

I love the cube browser in SQL Server management studio and would like to use it in a client app. But I don't want to give end users the SQL Server management studio.

Is it available as a seperate control or is there another one that would be available to me? I have tried the Excel addin for cube analysis but it is not as flexible and a Pivot Table report is pretty static.

Ta

Dirc

It's actually just a slightly modified OWC pivot table.|||

I installed OWC 11 and added a axPivotTable control to my winform. There were so many problems getting it to do anything I gave up.

Using COM controls designed for the web in a winform app seems a bit dodgy anyway....

|||I agree, it's a little odd to work with. And the properties aren't documented that well. But it's a lot better than having to code it yourself :)|||

Hi,

I am also trying to use the OWC control, but I am using it for a web based olap browser that needs to be integrated. If you have some links, material, information regarding the use of OWC, please do forward me the same.

Also, if you are succesful in implementing the OWC, give me some pointers.

thanks

Regards

|||

Found RadarCube NET Windows Forms for MS AS: http://www.radar-soft.com/products/radarwin_msas.aspx

Has similar functionality.

Is Conversion from SQL Server Express to Full SQL Server Required?

If I develop my app in SQL Server 2005 Express, and then want to use a hosting service that only offers full SQL Server 2005, do I have to do some kind of conversion to my DB file, and if so, what might that be? (I notice that there are hosting services that provide SQL Server Express...I'd like to know how much work it would be to be able to use other services.)

Any guidance on this would be appreciated.

Thanks!

it is an easy process to upgrade the database... you have two methods that you can use. the first is to use the detatch/attach method... with this you would just detatch the database on you server and then have the hosting company attach it for you. Or you could just use the backup restore method.... This is the way I would go.

|||In case that your hosting company isn′t that friendly to attach the database for you nor will let you know where you can put your backup files on to restore it from that media (like my hosting company isn′t doing for me :-) ) you can use the Database Import Wizard (which works in my case because my hosting company offers port 1433 to the internet for the server) and create a SSIS package to do the job.

HTH, jens Suessmeyer.

http://www.sqlserver2005.de|||

Glenn, thanks for the input.

I'm assuming in the scenario you describe that I would upload the mdf and ldf files to "my" directory on the hosted service systems, and then the operations you suggest would be performed from there...is that correct?

|||

Jens, thanks for the input.

In the scenario you describe, would I upload my DB to the hosted service first, and then operate the Database Import Wizard? Or is there another set of file moves involved? (Kind of piecing this together from newbie space :-)

|||No, actually not. As I don′t know which server is hostingn my SQLServer database on the hosting server. Even if I would upload my database I would not know the paths to attach the database. I use the DTS Import / Export wizard over the internet, directly importing the data into the "Internet" database.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||I would assume you have a "db" folder or "database" folder that you have access to on your hosted web server and, if so, that's where they'll likely go. Talk to your webhost and ask their advice since they'll be the ones working with you on it.|||

Thanks for input. I appreciate that I'll need more detail and coordination with the hoster; this thread has been useful in providing me with orientation on the basic mechanics.

Grazie!