Posted by MERIEL on January 4, 2009 at 11:07pm
I want to distribute an application with reports integrating image logo. Where I have to put the image for the MAC or PC application and how to define the path of the image ?
best regards
=====
Reply by Jan Schenkel on January 5, 2009 at 6:23am
The filename of an image item works similar to how it works in Revolution: it can either be an absolute path, or a relative path - relative in function of the 'defaultFolder' global property. So assuming you have
- a WIndows app "MyApp.exe", residing in the directory "C:\Program files\MyApp"
- a logo image "MyLogo.gif", residing in a subdirectory "C:\Program files\MyApp\images"
Then it can be as simple as setting the filename to "images/MyLogo.gif"
Jan Schenkel
--
Quartam Reports & PDF Library for Revolution
www.quartam.com
=====
Reply by MERIEL on January 5, 2009 at 12:53pm
What about the Mac to distribute an image in the Myapp.app package ?
=====
Reply by Jan Schenkel on January 5, 2009 at 8:24pm
A quick test showed that the defaultFolder is initially set to the folder containing the MyApp.app package; but if it doesn't interfere with anything, you can set the defaultFolder yourself when the app starts up.
To get 'inside' the MyApp.app bundle, you could use something along the lines of:
##
put the effective filename of this stack into tPath
set the itemDelimiter to slash
delete item -1 of tPath
-- tPath should now be something like: .../MyApp.app/Contents/MacOS/
set the defaultFolder to tPath
##
HTH,
Jan Schenkel
--
Quartam Reports & PDF Library for Revolution
www.quartam.com
=====
Reply by MERIEL on December 16, 2009 at 12:20pm
Hello,
In the new version of my application, I want the user be able to change the logo on a report (on Mac or PC). How I can do this ?
Best regards
Laurent MERIEL
www.dilm.fr
=====
Reply by Jan Schenkel on January 5, 2010 at 10:52pm
Hi Laurent,
My apologies for the late reply - I was on holiday for the past three weeks, and had no internet connection.
At the moment, your only option is to force the user to use an image of the same size (or at least the same aspect ratio) as the image item on the layout, and save that image where the static image file is located. So one solution would be to let the user 'paste' an image into your application, and then you move the 'default' logo image file out of the way and export the user's image in its place.
Of course, I do have plans for dynamic image items, but as I'm still working on the plans for the year 2010, I can't give you a firm date. Quartam Reports version 2.0 is currently penciled in for Q3 and improved image handling is definitely in the planned feature list.
Best regards,
Jan Schenkel
--
Quartam Reports & PDF Library for Revolution
www.quartam.com
=====
Reply by Josep M on June 14, 2010 at 11:53am
Hi Jan,
I trying to use the SpecialFolderPath(documents) but seems that don't work. Exist some way to use these global vars?
Or I must to put inside the app and refer it using as you said the "DefaultFolder"
Salut,
Josep
=====
Reply by Josep M on June 14, 2010 at 12:52pm
Well. DefaultFolder also don't work or I don't know how to do...
How I specify a relative path in the sourcecode for a image?
Salut,
Josep
=====
Reply by Josep M on June 14, 2010 at 1:56pm
OK. Working now with "defaultFolder" but with "SpecialFolderPath"?
Salut,
Josep
=====
Reply by Jan Schenkel on June 16, 2010 at 7:28am
Hi Josep,
When you use a relative path (such as "images/smurf.jpg") then the revENgine tries to find the file from the directory specified in the defaultFolder global property. So if you have no other location for images, it may be enough for you to set the defaultFolder to specialFolderPath("documents") before printing the report, and revert the defaultFolder to its original value afterwards.
Jan Schenkel
--
Quartam Reports & PDF Library for Revolution
www.quartam.com
=====
Reply by Josep M on June 16, 2010 at 8:03pm
OK. Thanks.
Any new about the new release of Quartam Reports
![Smile :)](./images/smilies/icon_e_smile.gif)
Salut,
Josep