p4Pratik


Hi,

I would like to know that can I create an .rdl file programmatically based on the user

selection (USING .Net programming) . Please help with some link / examples.

P.S:

I am giving very less number of static reports to the client. I want to give a more of a dynamic report ,

wherein in each case, I will give the user a selection criteria to select the fields from the front end (say

ASP.Net page) and those fields along with the relevant data will be generated in the report and will be

displayed on the user¡¯s screen.

IS THAT POSSIBLE WITH MSSQL 2005 AND .NET 2005

Kind Regards

Pratik





Re: Creating an Windows Rdl on the fly using .net programming

guyinkalamazoo3


Have you looked at Report Builder where you create the data model for the user and they can create their own reports




Re: Creating an Windows Rdl on the fly using .net programming

p4Pratik

Hi,

Sorry I have not . Can you please help me with the url of the same

Secondly, is this ReportBuilder provided by SQL Server 2005 Reporting Services.

Kind Regards

Pratik






Re: Creating an Windows Rdl on the fly using .net programming

guyinkalamazoo3

This is the datasheet on Report Builder: http://download.microsoft.com/download/2/5/b/25b952a2-5cd3-4775-9c2e-79a3655767f6/SQLReportBuilderDatasheet.pdf

Yes, it is included with Reporting Services. In your Business Intelligence Projects (in Visual Studio or running it from SQL Server), there is a Report Model project type. This will help you to create the actual SQL tables, statements, etc and then use friendly names so that the end user who does not know SQL language, can be able to create their own reports.

Hope this helps.





Re: Creating an Windows Rdl on the fly using .net programming

p4Pratik

Hi,

Thank you very much for the link. I will just go through the link and will check it out whether this sorts my purpose.

Sorry for the inconvenience and thank you very much for the helping hand

Kind regards

Pratik





Re: Creating an Windows Rdl on the fly using .net programming

guyinkalamazoo3

You are welcome and I hope that the Report Build is what you are looking for.



Re: Creating an Windows Rdl on the fly using .net programming

p4Pratik

Hi,

Thank you very much for your response.

I would like to ask one more thing continuing to this context. To the best of my knowledge, (if I am not

wrong), these Reports are itself stored separately on a dedicated ReportServer.

(i.e., http://localhost/Reports or http://localhost/ReportsServer) .

However, what if I wanted to access Reports through an ASP.Net application. That means,

supposingly, I have an existing ASP.net application (or shall I say I am creating a new one) and with

that I need to integrate the Reporting Services. Is that possible

Secondly, how do I take care of the values that are selected by the user from the ASP.Net UI.

Meaning, the user will select some fields from the ASP.Net UI, which will be displayed in the

report on-the-fly.

Please help with some of your recommendations. I have stucked up

Thanking You in advance,

Kind Regards

Pratik





Re: Creating an Windows Rdl on the fly using .net programming

guyinkalamazoo3

You would be able to use the Report Manager to view reports or use the built-in VS Report Viewer control to access a report. Reporting Services also has a web service that we utilize to display the Report Services directory structure in our custom software program.

As far as your second question, that I am not sure of.





Re: Creating an Windows Rdl on the fly using .net programming

GregSQL

p4Pratik wrote:

Hi,

Thank you very much for your response.

I would like to ask one more thing continuing to this context. To the best of my knowledge, (if I am not

wrong), these Reports are itself stored separately on a dedicated ReportServer.

(i.e., http://localhost/Reports or http://localhost/ReportsServer) .

However, what if I wanted to access Reports through an ASP.Net application. That means,

supposingly, I have an existing ASP.net application (or shall I say I am creating a new one) and with

that I need to integrate the Reporting Services. Is that possible

Secondly, how do I take care of the values that are selected by the user from the ASP.Net UI.

Meaning, the user will select some fields from the ASP.Net UI, which will be displayed in the

report on-the-fly.

Please help with some of your recommendations. I have stucked up

Thanking You in advance,

Kind Regards

Pratik

Pratik,

You do not want to generate .RDL files on the fly as you originally requested in this thread, and I think you are somewhat confusing those of us who could help you by asking for that.

Now that I've read the rest of your posts, I see that what you really want is:

1. To be able to display SQL reports in an ASP .NET UI

2. To be able to pass parameters to the SQL report from an ASP .NET UI

First I challenge you to conquer number one by setting up a project in Visual Studio (web application or windows application). Set up a datasource and a report viewer to see your report from within your application.

Once you have number one let us know and we'll help out with number two.

By the way, report builder and report manager will most likely not be enough for what you are trying to accomplish. In my experience, neither provide the customization necessary. Report builder is solely for the business professional. It will merely hinder the developer.






Re: Creating an Windows Rdl on the fly using .net programming

p4Pratik

Hi Greg (Please help me if I am wrong with your name),

First of all, please accept my sincere apology for all the confusions.

However, I have not diverted myself from the key issue which is Creating an Windows Rdl on the

fly using .net programming. But the thing was that I was not too sure as to whether this thing

can be achieved or not. Hence I also opted for an alternative and hence the confusion.

Secondly, as suugested by you in Point # 2 re. Passing Parameters from the ASP.UI.

Will that sort out the purpose in my case

Consider this case below:

I have a report say "User Listing" which displays the credentials of users in a columnar format one

below the other. I have specified a list of fields (like User Id, User name, User address1, 2,3, Zip

Code) etc., in a checkedlistbox. The user of this application has the option of selecting the fields he

wishes to display as columns in the report.

Can parameters take care of that requirement

If yes, than in that case do I need to create 6 parameters (one for each field)

Please help!!!!!

As suggested by you, I am now trying to conquer the Step 1 as suggested by you and will get

back to the forum, once done.

Sorry once again for the confusion and inconvenience.

Thanking You

Kind Regards

Pratik





Re: Creating an Windows Rdl on the fly using .net programming

p4Pratik

Hi Greg,

I am awaiting your response in this context

Kind Regards

Pratik





Re: Creating an Windows Rdl on the fly using .net programming

GregSQL

p4Pratik wrote:

Creating an Windows Rdl on the

fly using .net programming. But the thing was that I was not too sure as to whether this thing

can be achieved or not.

Yes, it can be achieved.

p4Pratik wrote:

Will that sort out the purpose in my case

Consider this case below:

I have a report say "User Listing" which displays the credentials of users in a columnar format one

below the other. I have specified a list of fields (like User Id, User name, User address1, 2,3, Zip

Code) etc., in a checkedlistbox. The user of this application has the option of selecting the fields he

wishes to display as columns in the report.

Can parameters take care of that requirement

If yes, than in that case do I need to create 6 parameters (one for each field)

OK so what you are asking for here is displaying any number of columns, ie. the user may choose to display user id and username or user id, user name and user address, etc.

Depending on any additional requirements, you may need to pass parameters. You may want to use visibility of columns, however it will most likely show unwanted whitespace but it is also fairly easy to implement.

You could use the RDL generator to create on the fly RDLs, and it would most likely take care of your needs. However, it is not exactly easy to implement and you need to understand XML.






Re: Creating an Windows Rdl on the fly using .net programming

p4Pratik

Hi,

Thank you very much for your reply. I will now start looking things and will consult you, if I stuck up somewhere.

Thank you very much.

Kind Regards,


Pratik




Re: Creating an Windows Rdl on the fly using .net programming

p4Pratik

Hi Greg,

As advised by you, I have created an RDL on the fly. However I did not use the RDL Generator. Instead I used an XMLTextWriter class of System.XML

namespace to generate the same. The rdl file that is created is as per the standards of SQL 2005 RS (I guess, since I have not added much functionality).

When I add this rdl to any Report Project and Preview it, the data is shown on the screen.

How do I now bind it to an ASP.Net application.

Please help

Thanking You in advance

Kind Regards,

Pratik





Re: Creating an Windows Rdl on the fly using .net programming

GregSQL

Make sure you have Visual Studio 2005 Service Pack 1. I will assume you already have the .NET application developed.

1. Drag and drop a SQL Data Source from the toolbox to the designer in Visual Studio.

2. Configure the data source to connect to the database that you want to connect to.

3. Drag and drop a report viewer to the designer in Visual Studio.

4. Set the report viewer to be a server report.

5. Set the report path to /ReportProject/Report (where ReportProject is the name of your SQL server report project and Report is the name of your report.

6. Build and Publish the project.