471,317 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,317 software developers and data experts.

Printing and Exporting

Hi,

Couple of queries:

I am using asp.net 2.0

1. What is the best method of allowing a client to print the details of
a webform? My Webform has a number of components and a primary GridView
for displaying the results.
Should I consider using Crystal Reports or some other reporting
alternative?

2. The client needs to be able to export the query information to file.
Is this possible using ASP.NET and the clients web browser and if so,
how can I achieve this?

Thanks in advance for the help.

Regards,

Steven

*** Sent via Developersdex http://www.developersdex.com ***
Feb 8 '06 #1
5 1152
Hi,

"Steven Blair" <st**********@btinternet.com> wrote in message
news:ue**************@TK2MSFTNGP09.phx.gbl...
Hi,

Couple of queries:

I am using asp.net 2.0

1. What is the best method of allowing a client to print the details of
a webform? My Webform has a number of components and a primary GridView
for displaying the results.
Should I consider using Crystal Reports or some other reporting
alternative?
If you print directly from the page you have to be extra careful regarding
grids, you may not see the entire grid. also you have no control over header
& footer of the page.
I would go for CR , even more I prefer to export the CR to pdf and give this
pdf to the user, the user has more control over what to do with it, either
print it or store it.
2. The client needs to be able to export the query information to file.
Is this possible using ASP.NET and the clients web browser and if so,
how can I achieve this?


You can export your data in the format you need, either pdf, CSV , excel ,
access, etc . all you do is generate the file in the server and send this
file back to the user.


--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 8 '06 #2
Thanks for the reply.

I think I am going to use CR, but I have a problem regarding filtering
my queries.
My query is returned via a view, but before the report is generated, I
need to append a where clause to it before it is executed.

Have you any idea on how to do this?

*** Sent via Developersdex http://www.developersdex.com ***
Feb 9 '06 #3
Hi,

"Steven Blair" <st**********@btinternet.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Thanks for the reply.

I think I am going to use CR, but I have a problem regarding filtering
my queries.
My query is returned via a view, but before the report is generated, I
need to append a where clause to it before it is executed.

Have you any idea on how to do this?

No clearly, no

What I do when I need to modify the rpeort source is that I use the push
method ( I think that is the correct name) I generate a Dataset with the
data from the DB, I transform it and using ReportDocument.SetReportSource(
theDataset) I assign it.
This also prevent any problems with the login auth you may have.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 9 '06 #4
This is what I have tried to do so far, but getting a login box
appearing all the time:

1. I created the file DataSet1.xsd and mapped my columns to this.
2. On my rpt file, I selected the new DataSet and dragged a couple of
columns onto the report.
3. In my C# code I done the following:

//path and ds populated
ReportDocument CrystalReport1 = new ReportDocument();

CrystalReport1.Load(reportPath);
CrystalReport1.SetDataSource(ds)

crystalReportViewer.ReportSource = CrystalReport1;

I cannot get the the login box to disapear, and whats equallt
frustrating is the fact the login box has the servername populated as
"DataSet1" and the Database field is readonly and blank :|

This is extremly frustrating.

All I want to to do is query the Database using a View, which I need to
filter at runtime (using a where clause) and display it.

*** Sent via Developersdex http://www.developersdex.com ***
Feb 9 '06 #5
Hi,
"Steven Blair" <st**********@btinternet.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
This is what I have tried to do so far, but getting a login box
appearing all the time:


Haa, that perky window :)

What source did you use when you created your report?

You should use a dataset too, what I do is I create a piece of code that
execute the SP , fill a dataset (using a dataadapter) and then save it to
disk (with WriteSchema).
after that you assign this dataset to your report.

That should solve the problem.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 9 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Curious Angel | last post: by
1 post views Thread by Sundar | last post: by
1 post views Thread by Sandy | last post: by
2 posts views Thread by Larry L | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.