Report Load
Report Load
Report Load
Report Load
Report Load
Report Load Report Load Report Load Report Load Report Load Report Load Report Load Report Load
Report Load Report Load
Report Load
Go Back  Xtreme Visual Basic Talk > > > Report Load


Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2008, 10:17 AM
Jamesanthony's Avatar
Jamesanthony Jamesanthony is offline
Contributor
 
Join Date: May 2003
Location: Dublin
Posts: 502
Default Report Load


Hi all
Can anyone tell me why the Second line loads my report and the First Line wont
My project is in c:\amps\ampstimelogs so the line below has the report

Application("ActiveReport") = "\reports\Print_Invoice.rpt"

crRpt.Load(Application("ActiveReport"),OpenReportMethod.OpenReportByDe fault)

crRpt.Load("c:\amps\ampstimelogs\Reports\Print_Invoice.rpt", OpenReportMethod.OpenReportByDefault)

Thanks
Reply With Quote
  #2  
Old 08-18-2008, 07:00 AM
wayneph's Avatar
waynephReport Load wayneph is offline
Web Junkie

Retired Moderator
* Expert *
 
Join Date: Apr 2004
Location: D/FW, Texas, USA
Posts: 8,393
Default

Maybe your base path isn't what you think it is? The only real difference I see is that in one case you're using a full path, and in the other you're using a relative.

That being said, it's been ages since I've played with Crystal Reports, so it could be a number of other things. Try using "Server.MapPath()" to get a full path into the Application variable. Maybe that will get the report to load.
__________________
-- wayne, MSSM Retired
> SELECT * FROM users WHERE clue > 0
0 rows returned
Reply With Quote
  #3  
Old 08-18-2008, 09:33 AM
Jamesanthony's Avatar
Jamesanthony Jamesanthony is offline
Contributor
 
Join Date: May 2003
Location: Dublin
Posts: 502
Default

Hi
Thanks for reply
However, I cant see how to use Server.Mappath as it asks then for the path
I did try while debugging, in the immedate window to say
?server.mappath("Print_Invoice.rpt") but no luck
Will struggle on
Any Ideas appreciated
In ASP Is there the equivalent to app.path as in VB6 or application.executeablepath in vb.net
Thanks
Reply With Quote
  #4  
Old 08-18-2008, 12:14 PM
wayneph's Avatar
waynephReport Load wayneph is offline
Web Junkie

Retired Moderator
* Expert *
 
Join Date: Apr 2004
Location: D/FW, Texas, USA
Posts: 8,393
Default

In ASP.NET you can use a "~" to represent the application root in most paths. Generally it is used when setting links in Server Side controls. It probably wouldn't work in this instance since you're calling a method as opposed to just setting the property, but it's worth a try.
__________________
-- wayne, MSSM Retired
> SELECT * FROM users WHERE clue > 0
0 rows returned
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Report Load
Report Load
Report Load Report Load
Report Load
Report Load
Report Load Report Load Report Load Report Load Report Load Report Load Report Load
Report Load
Report Load
 
Report Load
Report Load
 
-->