From: JB on

--
JB


"gerry" wrote:

> since ths is outside of your web app you either hard code it just like
> that - "c:\DotNetAppl\NetAppl\rptFolder\Report1.rpt"
> or stick the folder path in your web.config and pull it from there
>
> personally I would put these reports within your web app so that your
> current code works as-is.
> that way your site is self contained and can run on any server without any
> special permissions or 3rd party intervention - there is not much ( zero ? )
> chance you will be able to do this through a hoster.
>
>
>
>
>
> "JB" <JB(a)discussions.microsoft.com> wrote in message
> news:30659C28-6364-4E29-BF06-190FD150B0E9(a)microsoft.com...
> >
> > --
> > JB
> >
> >
> > "gerry" wrote:
> >
> >> did you verify that reportPath contains the proper value and that the
> >> file
> >> exists and that permissions are correct ?
> >> It may just be the way it posted but it looks like there are a number of
> >> spaces in there : "~/appStart^/^rptFolder/rptOne.rpt"
> >>
> >>
> >> "JB" <JB(a)discussions.microsoft.com> wrote in message
> >> news:6AB78E14-E4C4-473A-9964-5C4EAABFE711(a)microsoft.com...
> >> > Hello Community
> >> >
> >> >
> >> .
> >>
> > Hello Jerry
> >
> > Thanks for your response. I would like to clarify the question:
> >
> > Lets say the location of the Crystal Report file on the file system
> > c:\DotNetAppl\NetAppl\rptFolder\Report1.rpt
> >
> > However the virtual direcory is \Inetpub\wwwroot\NetAppl\rptFolder\
> >
> > How can I point reportPath to
> > c:\DotNetAppl\NetAppl\rptFolder\Report1.rpt ?
> >
> > Thnaks
> > Jeff
> >
> >
>
>
> .
>
Hello Gerry

Thanks for the tip. I did just that because when the error message said
file
not found. But out of curiousity if I did use web.config what section would
I put
that file system path in?

Jeff
From: gerry on
web.config :

<appSettings>
<add key="ReportFolder" value="c:\DotNetAppl\NetAppl\rptFolder\" />
</appSettings>


in your project : reference System.Configuration
in your code :
using System.Configuration;
. . .
string ReportFolder = ConfigurationManager.AppSettings ["ReportFolder"];
. . .
reportPath = ReportFolder + "Report1.rpt ";



"JB" <JB(a)discussions.microsoft.com> wrote in message
news:33A48774-047C-4AE5-8198-206DC968820D(a)microsoft.com...
>
> --
> JB
>
>
> "gerry" wrote:
>
>> since ths is outside of your web app you either hard code it just like
>> that - "c:\DotNetAppl\NetAppl\rptFolder\Report1.rpt"
>> or stick the folder path in your web.config and pull it from there
>>
>> personally I would put these reports within your web app so that your
>> current code works as-is.
>> that way your site is self contained and can run on any server without
>> any
>> special permissions or 3rd party intervention - there is not much ( zero
>> ? )
>> chance you will be able to do this through a hoster.
>>
>>
>>
>>
>>
>> "JB" <JB(a)discussions.microsoft.com> wrote in message
>> news:30659C28-6364-4E29-BF06-190FD150B0E9(a)microsoft.com...
>> >
>> > --
>> > JB
>> >
>> >
>> > "gerry" wrote:
>> >
>> >> did you verify that reportPath contains the proper value and that the
>> >> file
>> >> exists and that permissions are correct ?
>> >> It may just be the way it posted but it looks like there are a number
>> >> of
>> >> spaces in there : "~/appStart^/^rptFolder/rptOne.rpt"
>> >>
>> >>
>> >> "JB" <JB(a)discussions.microsoft.com> wrote in message
>> >> news:6AB78E14-E4C4-473A-9964-5C4EAABFE711(a)microsoft.com...
>> >> > Hello Community
>> >> >
>> >> >
>> >> .
>> >>
>> > Hello Jerry
>> >
>> > Thanks for your response. I would like to clarify the question:
>> >
>> > Lets say the location of the Crystal Report file on the file system
>> > c:\DotNetAppl\NetAppl\rptFolder\Report1.rpt
>> >
>> > However the virtual direcory is \Inetpub\wwwroot\NetAppl\rptFolder\
>> >
>> > How can I point reportPath to
>> > c:\DotNetAppl\NetAppl\rptFolder\Report1.rpt ?
>> >
>> > Thnaks
>> > Jeff
>> >
>> >
>>
>>
>> .
>>
> Hello Gerry
>
> Thanks for the tip. I did just that because when the error message
> said
> file
> not found. But out of curiousity if I did use web.config what section
> would
> I put
> that file system path in?
>
> Jeff