Showing posts with label program. Show all posts
Showing posts with label program. Show all posts

Monday, March 12, 2012

passing a new query to a report

hi all,

ok, here is my problem. my employer has tasked me to create fairly complex program.. and with it he wants a reporting system. now, i have been given permission to use VB Express, SQL Server 2005 Express with Advanced Features, and the SQL Server Express Toolkit for my application. my employer would prefer not to have to spend the money on visual studio professional (although, in truth it would make my life so much easier as reports are integrated into the IDE, via crystalreports), so i HAVE to do it the way of viewing all reports through ie.

now (after much toil) i have finally figured out how to display the reports in an internet explorer window (which i can also run from my application), and the report displays no problem! when i finally managed this i was through the bloody moon. now, what i would like to do is one of two things...

1) display a report based on a dynamic query from my vb.net form, so i can filter the results how i want

or

2) simply define a static query from within the report, create a couple of parameters in the report, and supply the parameters to the report from the vb.net form, via maybe the url of the report?

i have been thinking on this for a while and i have not been able to come up with anything, im hoping someone here will have gone through a similar problem and will be able to help me out

if anyone could provide advice, tutorials, links on how to go about accomplishing this i would be eternally grateful!!!

regards

adam

after quite a bit of resarch i found it is in the MSDN library, you just have to search sql server reporting services.

this only allows passing of parameters... but if anyone knows how to pass a completely new query it would be greatly appreciated!

http://msdn2.microsoft.com/de-de/library/ms153586.aspx

hope this helps somebody!

regards

adam

Saturday, February 25, 2012

pass a value other than a recordset from a stored proc

Ok I need to pass a value bask the my program that isnt the result of a quer
y
"but is the outcome of a query"
for instance:
if exists (SELECT email, phone
FROM users
WHERE (email = N'jim@.jones.com')
or (phone= N'1234567'))
return the vale true
else
return the value false
thanks
marcel> if exists (SELECT email, phone
> FROM users
> WHERE (email = N'jim@.jones.com')
> or (phone= N'1234567'))
> return the vale true
> else
> return the value false
if exists (SELECT email, phone FROM users WHERE (email =
N'jim@.jones.com') or (phone= N'1234567'))
return 1
else
return -1
"Marcel" <Marcel@.discussions.microsoft.com> wrote in message
news:16F8A659-1E78-4FE5-9C33-B6273C87575D@.microsoft.com...
> Ok I need to pass a value bask the my program that isnt the result of a
> query
> "but is the outcome of a query"
> for instance:
>
> if exists (SELECT email, phone
> FROM users
> WHERE (email = N'jim@.jones.com')
> or (phone= N'1234567'))
> return the vale true
> else
> return the value false
>
> thanks
> marcel
>|||You can either use Output variables or return values? The usage of
these depend on your programming language:
That=B4ll be in C#:
SqlParameter param =3D cmd.Parameters.Add("@.SomeOutputParam",
SqlDbType.Int);
param.Direction =3D ParameterDirection.Output;
param =3D cmd.Parameters.Add("@.SomeOutputParam", SqlDbType.VarChar);
For the return value that=B4ll be:
SqlParameter returnValue =3D
sqlCommand.Parameters.Add("@.ReturnValue",SqlDbType.Int);
returnValue.Direction =3D ParameterDirection.ReturnValue;
return (Int32)returnValue.Value;
HTH, Jens Suessmeyer.

Pass a parameter to an url in the default webbrowser

hi

i would like to launch an crystal report file from my vb.net program. This report has 1 parameter field (ID). I would like to give this parameter directly in the URL.

at the moment i use something like this but the parameterwindow still appears.

System.Diagnostics.Process.Start("http://Server/Reports/Report.rpt?ID="&Id)

anyone has a solution?

tnx in advance!
GeertI think there is method to suppress parameterwindow
If there is method like enablepopupmenu then set it to false|||tnx but will supressing the window pass the value? i believe not...

or is there a workaround this problem? like loading the report en then export it?

Monday, February 20, 2012

Partitionning a Table

Hi guys,

I am creating a program, and for that i implements function to partionate a Table (which are too big).
In Oracle it's simple :
ALTER TABLE myTable SPLIT PARTITION ....

But for MS Sql Server 2005, I encounter some problems.

Do you have an idea ?
How can i partitionate a Table without make TSQL Functions ?
Is it possible ?
how can I split Tables simply.

Thanks ;)

I don't think you can...

this article describes how to do it using a function:

http://msdn2.microsoft.com/en-us/library/ms186307.aspx

|||thanks ;)