Javier:
We don't store the filenames in the database at all. They are all stored in a
directory with the unique ID as the beginning characters of the filename. My
examples were shortened as an example, but for example for CARLogID 5800, I
would do a Dir /B of files that start with "5800-". So we do a DIR and load
into a temp table. That way the users can add and delete files outside of
RBase, and the database isn't involved at all.
So my program loads the dir into a temp table called tmpCARPhotos. It would
usually load for several CARLogIDs at a time. The temp table has an
autonumbered CARPhotoID column.
In the report, I now have this in the report's Break Header (on CARLogID)
Before Generate EEP. Works great now!
SET VAR vfilename1 TEXT = “BlankJPG.JPG”,vfilename2 TEXT = “BlankJPG.JPG”, +
vfilename3 TEXT = “BlankJPG.JPG”,vfilename4 TEXT = “BlankJPG.JPG”
SET VAR vMin INT = 0, vMax INT = 0
SELECT (MIN(CARPhotoID)), (MAX(CARPhotoID)) INTO vMin, vMax FROM tmpCARPhotos +
WHERE CARLogid = .vPCARLogid
IF vMin > 0 THEN
SET VAR vCount = (.vMax - .vMin + 1)
SET VAR vCount = (IFGT(.vCount, 4, 4,.vCount))
SET VAR vLoop = 1
WHILE vLoop <= .vCount THEN
SET VAR vText =("vFilename" + CTXT(.vLoop))
SELECT CARFilename INTO &vTextFROM tmpCARPhotos WHERE CARLogID =
.vPCARLogID +
AND CARPhotoID = .vMin
SET VAR vLoop = (.vLoop + 1), vMin =(.vMin + 1)
ENDWHILE
ENDIF
Karen
-----Original Message-----
From: [email protected]
To: [email protected]
Sent: Thu, Nov 10, 2022 5:52 pm
Subject: RE: [RBASE-L] - A "null" variable image
<!--#yiv0255468930 filtered {}#yiv0255468930 filtered {}#yiv0255468930
p.yiv0255468930MsoNormal, #yiv0255468930 li.yiv0255468930MsoNormal,
#yiv0255468930 div.yiv0255468930MsoNormal
{margin:0in;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv0255468930
a:link, #yiv0255468930 span.yiv0255468930MsoHyperlink
{color:blue;text-decoration:underline;}#yiv0255468930 a:visited, #yiv0255468930
span.yiv0255468930MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}#yiv0255468930
p.yiv0255468930msonormal0, #yiv0255468930 li.yiv0255468930msonormal0,
#yiv0255468930 div.yiv0255468930msonormal0
{margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:"Calibri",
sans-serif;}#yiv0255468930 span.yiv0255468930EmailStyle20
{font-family:"Calibri", sans-serif;color:windowtext;}#yiv0255468930
span.yiv0255468930GramE {}#yiv0255468930 .yiv0255468930MsoChpDefault
{font-family:"Calibri", sans-serif;}#yiv0255468930 filtered {}#yiv0255468930
div.yiv0255468930WordSection1 {}-->I am trying to figure out how where the
picture names/links are stored.How do you know how many picture placeholders to
assign in the report?If you have a record in Table1 and the corresponding
picture names are stored in Table2 on a 1 to many relationships, which I
believe would the recommended approach, then you can create a parent and a
child table in your report, and I will print only pictures that are available
and not display blank placeholders.I will guess that your application is
probable differentYou can always create a blank picture that is basically a
blank, thin sliver and then, when you get your variables run something like
this:IF vFilename3 IS NULL THEN SET VAT vFilename3 =
‘c:\BlankPic.jpg’ENDIFThis will display the blank picture that should not take
much space.I am not sure how your data is structured in you application and
hopefully, the above is of help. Javier, Javier Valencia, PE913-915-3137
From: 'Karen Tellef' via RBASE-L <[email protected]>
Sent: Thursday, November 10, 2022 1:46 PM
To: [email protected]
Subject: Re: [RBASE-L] - A "null" variable image I'm guessing I have to go
with a "null" image to display. Certainly easier than the code to make the
images visible or invisible. I do not have to collapse the space, only one
part prints on a page and the photos are at the bottom Karen
-----Original Message-----
From: Robert Thompson <[email protected]>
To: [email protected]
Sent: Thu, Nov 10, 2022 2:28 pm
Subject: RE: [RBASE-L] - A "null" variable imageNot sure about a setting,
perhaps someone else is. But if not, you might consider a "default" image that
is a simple white or transparent square. Then predefine all 4 variables to
"Default.jpg" (or what ever). Then if you do not assign an actual image, the
default will always display. No real code changes other than the variable
filename predefault. This would also allow you to display a default image for
information or some other nice option. However if you are wanting to collapse
the print space when both image 3 & 4 are null, this would not help. And as
you stated, the make invisible code would work as well. Robert ThompsonTTC
Inc.219-363-7441 -------- Original message --------From: 'Karen Tellef' via
RBASE-L <[email protected]> Date: 11/10/22 1:53 PM (GMT-05:00) To:
[email protected] Subject: [RBASE-L] - A "null" variable image
Hopefully I can explain this. I have attached a print-screen because my
embedded images don't show in the list emails. Each part we print on this
report can have unlimited (or no) photos saved on disk. We will print no more
than 4 on the page, so I am pulling 4 random photos into my text variables
(vfilename1, 2, 3, 4), and Variable Images are located. Works great except
when I have null variables. As shown on the attached, vFilename1 and
vFilename2 have values and print the photos just fine. But variables
vFilename3 and vFilename4 are NULL (as shown below, my null setting is actually
' ' when printing but I changed to -0- to show you the list). The null ones
have that weird white/red thing. I'm wondering if I am missing a setting for
these. I know I can write code to make controls invisible, but I was hoping
I'm missing something simple. Any clues for me? Karen Variable
= Value Type
------------------------------ ------------------------------
-------
vFilename1 = F:\Quality\123773-A.jpg TEXT
vFilename2 = F:\Quality\123773-B.jpg TEXT
vFilename3 = -0-
TEXT
vFilename4 = -0- TEXT
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/1588128635.1982897.1668106391324%40mail.yahoo.com.--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/636d510f.810a0220.9f9d.04b8SMTPIN_ADDED_BROKEN%40gmr-mx.google.com.--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/1444136802.2005358.1668109576636%40mail.yahoo.com.--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/!%26!AAAAAAAAAAAYAAAAAAAAAG1gU%2BA71stIig71BAFnx9iihQAAEAAAAEoT7VLG%2B2xPhcccRyrrDaQBAAAAAA%3D%3D%40vtgonline.com.
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/2137475133.2092774.1668125082572%40mail.yahoo.com.