View Single Post
  #2  
Old September 2nd, 2004, 04:47 PM
Smit-Dog
external usenet poster
 
Posts: n/a
Default

So nobody has experienced this weirdness with the Access reporting rendering
engine?

My current brute force workaround is to programatically open the report
first in design mode, set the values of labels (had to convert text boxes to
label controls in order to set them at design time), save the report, close
it, then finally open it in preview mode.

It's a hack to be sure, but it's simple (couple of extra lines), and does
not degrade performance. But it bugs me that this has to be done. My nickname
for Access is now "Hack-sess".

"Smit-Dog" wrote:

I have a report with a bunch of unbound text box controls. The report is
opened, and then I explicitly populate a few text boxes with data:

DoCmd.OpenReport "rptSchool", acPreview, , "(GUID=""" & strGUID & """)"

With Report_rptSchool.Controls
.Item("txtBldgAge").Value = Round(intBuildingAge, 0)
.Item("txtBldgSizeGSF").Value = Format$(lngBuildingSize, "#,##0")
.Item("txtSiteSize").Value = Round(dblSiteSize, 2)
End With

This works great if the Filter property = "", or if the Filter property is
set to a single field criteria during the Report_Open event, i.e.
"(([ConstellationID] in (6)))".

If the Filter property is set to multiple criteria in the Report_Open even,
the unbound text boxes are somehow "invisible". Example: (([ConstellationID]
in (6)) and ([FacilityTypeID] in (3)))

By invisable, I mean that the text box is actually there, and the value is
actually set, but for some reason the Access report rendering engine "blanks"
out the values for these text boxes. I set the foreground and font colors of
the text boxes to cyan/red respectively, and I can see the text boxes on the
report, it's just that the values are invisible. Checking the text box value
properties at runtime with the debug window, it does return the value, so I
know the value is being set in code. And if the Filter ="", it works fine,
and if the Filter = (([ConstellationID] in (6))) or Filter =
([FacilityTypeID] in (3)), it works fine. It just when the Constellation and
FacilityType are combined in the Filter property.

This is driving me batty. Does anyone have a clue what the Access report
engine is doing here?

Thanks!!!

- Bill