Showing posts with label details. Show all posts
Showing posts with label details. Show all posts

Friday, March 23, 2012

Retrieving url parameters

I have a 2 reports - Product Master and Product Details. I have the ProductID parameter being passed properly from the Master via the URL to the Details Report, but the Details report doesn't seem to be picking up the paramater from the URL and keeps prompting for the ProductID.

What settings should I be configuring in my Details report to say - "Get the parameter from the URL"?

I've tried multiple configs within the Report Parameters dialog box but I seem to be missing something...

?

In the first report, on the navigation tab for the textbox:

Choose the Report action, choose a report or enter a path to the report and then click the parameters button. Provide the values you want. you can use an expression here which is something like Parameters!ParameterName.Value which will pass to the drill-through report the same value as was passed to the original report.

Hope that helps,

-Lukasz

Retrieving the Tables Relationship from SQL Server Database Diagrams

Hi All,

Currently i am defining a simple relationship between
Customers->Orders->Order Details through the Database Diagrams feature in
the SQL 2K. Using the Server Explorer, i can see the Database Diagrams, but
when i try to "drop" the Database Diagrams into the page, it gives the error
message.

I would like to know the procedures to retrieve the database relationships
from Database Diagrams and manipulate them through ADO.NET

I prefer to "convert" already defined relationship using SQL Server Database
Diagrams into XSD file or probably there is another method to "read" those
relationship and manipulate them.

Thank you very much for all your helpI suspect the diagrams are just a view onto the underlying schema. Meaningless without the system tables. Sorry, I know I'd like to use them in that way.|||Hi,

So i need to rebuild the relationships again using XSD because the "Database Diagrams" only related the SQL tables only in SQL Server only ? So there is no workaround for this ?

thanks

hadi|||Having said that you can still get the relationships from ADO, it doesn't need the diagrams to do that. If you're really struggling you could look at ADOX

Saturday, February 25, 2012

Retrieve Image from SqlServer

hi all

i hav a database with some images...images r stored in binary data form

i want to retrieve that image from database and display it in a details View

im inserting images to database like this

public

void OnUpload(Object sender,EventArgs e)

{

int len = Upload.PostedFile.ContentLength;byte[] pic =newbyte[len];

Upload.PostedFile.InputStream.Read (pic, 0, len);

SqlConnection connection =newSqlConnection ("integrated Security=SSPI;Persist Security Info=False;Initial Catalog=dbAsoftWeb;Data Source=ASP");try

{

connection.Open ();

SqlCommand cmd =newSqlCommand("insert into tblStock " +"(Image, Image_Data,[DESC],PRICE,BAL_QTY,PV) values (@.pic, @.text, @.lblProd, @.lblPrice, @.lblPV, @.lblQty) ", connection);

cmd.Parameters.Add(

"@.pic", pic);

cmd.Parameters.Add(

"@.text", Comment.Text);

cmd.Parameters.Add(

"@.lblProd", txtProdName.Text);

cmd.Parameters.Add(

"@.lblPrice", txtPrice.Text);

cmd.Parameters.Add(

"@.lblPV", txtPV.Text);

cmd.Parameters.Add(

"@.lblQty", txtQty.Text);

cmd.ExecuteNonQuery ();

}

finally

{

connection.Close ();

}

im able to get the image in to form but i want to display it in a detailsview

how cani do it..can any one explain me

thanks in advance

Hari

Hi

Check those articles:

Image_In_DetailsView

Image_in_Details_View_part_2

Hope it helps.