Showing posts with label dataset. Show all posts
Showing posts with label dataset. Show all posts

Thursday, March 22, 2012

Create a dataset with .Net code and render report from it. Possible?

Hi

I wonder if it is possible to create a dataset in code and then feed it to a Reporting Svcs (RS) report and have it rendered on the data from this dataset.

My collegues does this with Crystal and it would break my heart if I cant do this with (RS)...

I have tried to find a solution but so far, no luck.

Anyone have any ideas?

/F

If you use the reportviewer control in local mode you can do what you say. If you want this sent straight to hard copy that also can be achieved. I'm not sure if that meets your requirement.

Sunday, March 11, 2012

CR in VB.Net

I have one dataset of having values I wants to Create one Report.
How to Create a Crystal Report in Vb.net?You can try Crystal Report available in .NET. It's much easier and has lots of options.|||How to Connect one dataSet to one Crystal Report in VB.net?

CR 10 creating charts

I am using Visual Studio 2005 VB.NET and Crystal Reports 10. I need to create a line graph on a crystal report by sending it a dataset from the vb.net page. I am new to this. Does anyone have any example code or know of any websites that demonstrate how to do this?Please see here (http://www.dev-archive.com/forum/showthread.php?t=409951)

Friday, February 17, 2012

Counting Result Set from SQL Query Before Fill()ing a DataSet

I need to display something like "Results x-y of z." The problem is, I can't figure out how to get the right value for z.

I am using SqlDataAdapter and Fill()ing a DataSet with subset x through y of the result set. How can I get the right value for z?

You are going to have to query the database to get the record number.

Select Count(OneOfYourFields) from YourTable.

You can command.executescalar to get the result

|||

Thank you for the reply.

I am using a Stored Procedure, so this makes things a bit more complicated. I know with MySQL you can use mysql_num_rows() to fetch the number of rows a query will return, without actually grabbing all the data from that query and pulling it onto the web server. Is there any similar functionality in C#/ASP.NET?

|||What ken means is that you need to run a count(*) query to retrieve the number of rows. ExecuteScalar will return the first record in the first row which is all you need since you only need the count. Then just display that number.|||I think I understood what Ken said. However, I am not just selecting from one table, I am executing a complicated Stored Procedure on multiple tables. How can I run a COUNT(*) on the Stored Procedure?|||

Hi,

As far as I know, we cannot run COUNT() on the result set of a stored procedure. The only way I think is to add some SELECT COUNT(*) for each table in the stored procedure and return the count as OUTPUT parameters.