Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Exporting/emailing schedule (Read 3485 times)
dimmer
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jun 27th, 2007
Exporting/emailing schedule
Oct 25th, 2007 at 12:57pm
Print Post  
Hi

I have a requirement to email a copy of a schedule to various users outside our organization.  I noticed in the General Information section of the Guide under Output that it's apparently possible to 'Export parts or whole calendars as images', but am having trouble figuring this out.

Would you be able to point me in the right direction or suggest an alternative way  (I noticed in some previous posts that you had mentioned that you may add support to export to Excel)

Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Exporting/emailing schedule
Reply #1 - Oct 25th, 2007 at 4:09pm
Print Post  
Hi,

Call the Calendar.CreateImage method to get an image of the calendar, and then the Image.Save method to save it as an image file.

Excel support won't be available soon. We can easily add PDF support to the Report class if that will do for you.

Stoyan
  
Back to top
 
IP Logged
 
dimmer
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jun 27th, 2007
Re: Exporting/emailing schedule
Reply #2 - Oct 25th, 2007 at 5:36pm
Print Post  
Creating the image works okay.  I've saved it as a .jpg and then attached it to the email.

However, I'm trying to create a report now to see how it looks and keep getting a blank page.  I have populated the calendar on a form from a database, and now am trying to create a report for the month from a button on the same form...

Dim rep as Report

With rep
.schedule = Me.calendar.schedule
.preview = ("1/10/2007", "31/10/2007")
End With

Thanks for any suggestions
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Exporting/emailing schedule
Reply #3 - Oct 26th, 2007 at 5:02am
Print Post  
You have to insert the columns you would like to have in your report. For example, the following code prints a report with two columns, containing the header text and start date of the items respectively. The width ratio of the columns is set to 5:2.

Code
Select All
Dim c As ReportColumn = r.CreateColumn()
c.Property = "HeaderText"
c.Width = 5
r.Columns.Add(c)

c = r.CreateColumn()
c.Property = "StartTime"
c.Width = 2
r.Columns.Add(c) 


Also make sure that Options.AbsoluteColumnWidth is set to False.

Meppy
  
Back to top
 
IP Logged
 
dimmer
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jun 27th, 2007
Re: Exporting/emailing schedule
Reply #4 - Oct 26th, 2007 at 11:05am
Print Post  
Aaaah, okay, thanks for showing me.  One more question...

Is it possible to capture and export the images that are created after calling the calendar.printpreview method?

I have already set the Scale that I need for the different views depeding on the user's screen resolution, and then I call calendar.printpreview to view the pages.  I might want to export these images rather than using the CreateImage method if it's possible.

Thanks again for the help
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Exporting/emailing schedule
Reply #5 - Oct 26th, 2007 at 12:23pm
Print Post  
Unfortunately I can't think of a way to do this. You may use one of the CreateImage overloads that accepts a scaling factor as argument.

Meppy
  
Back to top
 
IP Logged
 
dimmer
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jun 27th, 2007
Re: Exporting/emailing schedule
Reply #6 - Oct 26th, 2007 at 1:22pm
Print Post  
Okay thanks Meppy.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint