INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

RDLC Export will render on development but not production

RDLC Export will render on development but not production

(OP)
I'm using a rdlc reportviewer to render a report directly to excel. the below code works on my development but not once I publish the app. can't figure out what the problem is. I get no errors

any help would be appreciated

Thanks

Dim warnings As Warning() = Nothing
Dim streamids As String() = Nothing
Dim mimeType As String = Nothing
Dim encoding As String = Nothing
Dim extension As String = Nothing
Dim bytes As Byte()
Dim fs As New FileStream("c:\Export_Reports\MyReport.xls", FileMode.OpenOrCreate)

rv1.ProcessingMode = ProcessingMode.Local
rv1.LocalReport.ReportPath = Server.MapPath("~/Reports_rdlc/MyReports.rdlc")
Dim dsReleased2 As sp_1 = sp()
Dim datasource As New ReportDataSource("sp_1", dsReleased2.Tables(0))
rv1.LocalReport.DataSources.Clear()
rv1.LocalReport.DataSources.Add(datasource)

bytes = rv1.LocalReport.Render("Excel", Nothing, mimeType, encoding, extension, streamids, warnings)
fs.Write(bytes, 0, bytes.Length)
fs.Close()

RE: RDLC Export will render on development but not production

(OP)
Yeah, I finally figured that out.... how do I get this to work on the client machine ? I've been searching and really can't find a straight answer.

Thanks

RE: RDLC Export will render on development but not production

The straightforward answer: you can't. You cannot access the client PC for security reasons
You will have to create a folder on a server drive that the provider let's you access.

Another issue is that if you are allowing users to write a file to the filesystem, you will need to generate unique file names, otherwise they will be overwritten. That is not a big deal because you can come up with some sort of naming convention like username + filename + extension.

RE: RDLC Export will render on development but not production

(OP)
Okay, makes sense....Thanks for your help

RE: RDLC Export will render on development but not production

Glad to help. Post back if you have any other questions.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close