CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
web_forms
getting_started
data_presentation_controls
dotnetnuke
data_access-sql_server_sql_server_express_and_sqldatasource_control
security
client_side_web_development
novell-support-groupwise-6x-clients
data_access-data_access_and_objectdatasource_control
asp-net_ajax-asp-net_ajax_control_toolkit
novell-support-netware-6x-install-upgrade
asp-net_ajax-asp-net_ajax_discussion_and_suggestions
novell-support-netware-6x-administration-tools
master_pages_themes_and_navigation_controls
configuration_and_deployment
novell-support-netware-client-winnt-2x-xp
novell-support-groupwise-7x-clients
asp-net_ajax-asp-net_ajax_ui
novell-support-edirectory-netware
community-free_for_all
visual_studio_2005
novell-support-groupwise-6x-install-setup
data_access-xml_and_xmldatasource_control
control-cancel
novell-support-iprint
advanced_asp-net-crystal_reports
data_access-xml_web_services
microsoft-public-access
novell-community-chat
state_management
novell-support-netware-6x-abends-hangs
dotnetnuke-getting_started
novell-support-groupwise-6x-gwia
-net_languages-c
novell-support-identity-manager-engine-drivers
novell-support-groupwise-discontinued
advanced_asp-net-architecture
opensuse-org-suse-linux-support-install-configure-administration
dotnetnuke-custom_modules
novell-support-groupwise-7x-install-setup-admin
novell-support-netware-6x-storage-media
novell-support-groupwise-6x-agents
installation_and_setup
data_access-access_databases_and_accessdatasource_control
windows-hosting_open_forum
visual_web_developer_2005_express
novell-support-groupwise-6x-web-access
novell-support-netware-6x-server-backup
macromedia-dreamweaver
novell-support-netware-5x-administration-tools
novell-support-ifolder
novell-support-bordermanager-install-setup
novell-support-imanager
microsoft-public-dotnet-framework-aspnet
novell-support-netware-5x-install-upgrade
novell-support-cluster-services
novell-support-bordermanager-proxies
novell-support-newsflash
advanced_asp-net-sql_server_reporting_services
microsoft-public-dotnet-languages-csharp
web_parts_and_personalization
about_this_site-feedback_on_this_website
ibm-software-websphere-portal-server
novell-support-netware-dns-dhcp
novell-support-zenworks-desktops-4x-app-launcher
-net_languages-visual_basic_-net
advanced_asp-net-custom_server_controls
novell-support-bordermanager-vpn
novell-support-ndps-neps
microsoft-public-sqlserver-programming
novell-support-netware-webserver
community-jobs
novell-support-netware-4x
advanced_asp-net-mobile_and_handheld_devices
internet_explorer_web_controls
novell-support-zenworks-desktops-4x-install-setup
novell-support-edirectory-linux
novell-support-groupwise-7x-gwia
development_tools-web_matrix_general_discussions
microsoft-public-access-formscoding
macromedia-flash
community-announcements
portal_starter_kit
novell-support-zenworks-desktops-4x-management-agent
novell-support-zenworks-patch-management
novell-support-native-file-access
microsoft-public-access-queries
microsoft-public-access-forms
novell-support-groupwise-7x-web-access
novell-support-netware-small-business-6x
data_access-active_directory_and_ldap
novell-support-edirectory-windows
novell-support-groupwise-7x-agents
novell-support-ichain
data_access-oracle
novell-support-zenworks-desktop-management-6x-imaging
novell-support-groupwise-7x-wireless
novell-support-netware-5x-abends-hangs
advanced_asp-net-localization
novell-support-zenworks-desktop-management-7x-imaging-server-nw-win




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > visual_studio.vs_2005_web_application_projects Tags:
Item Type: Date Entered: 6/5/2007 12:47:42 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 21 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
"kotor2000" <>
NewsGroup User
Can't access a file6/5/2007 12:47:42 PM

0

Hi,

    I'm working on a web application  in VB.NET 2005 that creates dynamic crystal reports. I use the built-in version of Crystal Report and when a user want to print the report, a window is opened asking the number of pages to print and then the report is exported in .pdf to allow the user to print it himself.

I decided to export the report in pdf myself to C:\WINDOWS\Temp et redirect the user to this file. I used the following code:


<code>

Protected

Sub Page_Load(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMe.Load

 

Dim dfdoCustomers AsNew _

CrystalDecisions.Shared.DiskFileDestinationOptions()

 

Dim szFileName AsString = ("C:\WINDOWS\Temp\Rapport2.pdf")

dfdoCustomers.DiskFileName = szFileName

 

With RemplirDataSet()  '// Function that returns report document object

.ExportOptions.ExportDestinationType = _

CrystalDecisions.Shared.ExportDestinationType.DiskFile

.ExportOptions.ExportFormatType = _

CrystalDecisions.Shared.ExportFormatType.PortableDocFormat

.ExportOptions.DestinationOptions = dfdoCustomers

.Export()

 

EndWith

Response.Redirect(szFileName)

 

 

EndSud
</code>

I'm redirected to the error page "Can't find server or DNS error".
Rapport.pdf is in the folder.

I thought it could be a rights problem, but all possible users have the necessary rights on the folder and I can't find any ASPNET user to add.

Any help would be appreciated, thank you.
Kotor2000


Kotor2000
"kotor2000" <>
NewsGroup User
Re: Can't access a file6/5/2007 3:03:59 PM

0

Found out! i did the following :

Dim dfdoCustomers AsNew _

CrystalDecisions.Shared.DiskFileDestinationOptions()

 

Dim szFileName AsString = Server.MapPath("~\exports\" & Session.SessionID.ToString & ".pdf")

dfdoCustomers.DiskFileName = szFileName

 

With RemplirDataSet()

.ExportOptions.ExportDestinationType = _

CrystalDecisions.Shared.ExportDestinationType.DiskFile

.ExportOptions.ExportFormatType = _

CrystalDecisions.Shared.ExportFormatType.PortableDocFormat

.ExportOptions.DestinationOptions = dfdoCustomers

.Export()

 

EndWith

 

'Response.Redirect(szFileName)

Response.ClearContent()

Response.ClearHeaders()

Response.ContentType =

"application/pdf"

Response.WriteFile(szFileName)

Response.Flush()

Response.Close()

 

'delete the exported file from disk

System.IO.File.Delete(szFileName)
</code>


Kotor2000
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:













dotfuscator and ,net framework 2 web app projects

website project and web application project

web deployment project outputs too many files from web application project

relatedfiles for webapp project

asp.net runtime error: there is no build provider registered for the extension ''

web application projects released (may 8, 2006)

web.config parsing error in web app projects with iis

debugging performance

web application projects install error

problem to create a new windows user from appliaction level in win 2003 server

using webresource with wap projects

help with simple data access!!!

migrated 2003 web project crashes

wap windows 2000 with iis 5

event server handler in aspx files

images not displayed in debug mode

remembering website password

web application project and asp.net folders

problem with mixed vb/cs website

right click view in browser missing

migrating web site --> web application

treeview on masterpage does not show

web project don't support "profile" after intalling sp1

ensureserverrunning() not working with web application project

vs80-kb915364-x86-enu.exe installtion problem

tutorials for visual studio 2005 web application using c# and sqlserver database

wap web form designer no longer wires-up new controls

app_data folder not working as it should...

can we extend the precompiled & deployed application in asp.net

publishing wap referencing user control project

6 people, one project...please advise

reformatting html in vs.2005

setting protocol for a wsdl web reference?

no convert to web application option

where to specify inherits

app_code folder missing in projects

"the project-to-project reference with guid"?

flexible printing of web pages?? help!!

large web application architecture?

web application project debugging .aspx at compile time

?? can i remove the virtual directory from the development server ??

<applicationsettings> vs <appsettings>

newbie : step to publish crystal report file to intranet web

why cannot use a project namespace in a web project in vs2005 ??

migration problem while using wap

event handler not added to code behind file

wap, app_globalresources and vs 2005 sp1

embedding scripts in the web application dll

why not all lowercase for asp.net tags

vs 2005 moudule in vs2003

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT