Data Report changes in print time

I want to make a change on detail of report in print time:
like this:

 
 if field <> '' then  
    Report1.Sections.Item("Section4").Controls.Item("field").Visible = True
 end if

 how I can make something like this?

 thank´s
sartoriusAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
AnswerTheManConnect With a Mentor Commented:
so, my privious connent ENABLES you to do that !
put empty Labels on the Datareport id design time (Label1,Label2,Label3....),
then open the recordset.
loop trought the recordset and check whatever you want, and fill the Labels from your CODE accordingly :

if MyRec.Fields("fldTTT")>2 then DataReport1.SectionX.Label2.Caption=185

after that - print the report.
0
 
dhnkleyCommented:
What sort of report are you using,
If Crystal Reports you can code in a formula for the visibility of the field based on the data.
0
 
Éric MoreauSenior .Net ConsultantCommented:
dhnkley: this person is using the Data Report in VB6!

sartorius: Can't you set the value to nothing (or empty string)?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
sartoriusAuthor Commented:
I'm using Data Report and I want to control like level record on print detail.
0
 
AnswerTheManCommented:
you can always put empty Labels on your DataReport and fill them before printing with whatever text you want.
That's including reading from DB into Vb CODE and manipulating the text before updating those Labels.
0
 
sartoriusAuthor Commented:
But I want manipulate the text when it is printing. Like dbase style :

do while.not.eof()

   if field <> '' then
      text.enable=true
   else
      text.enable=false

   next....

enddo

 
0
 
AnswerTheManCommented:
sorry. i don't understand.
what do you mean in saying "*WHEN* it is printing"
???
0
 
sartoriusAuthor Commented:
Record level.
After print next record maybe I can change the field.
0
 
sartoriusAuthor Commented:
I want say before print...
0
 
sartoriusAuthor Commented:
I want do in DataReport the same I can in Crystal Reports in formula field.
Like,
if...then... etc..

0
 
sartoriusAuthor Commented:
Thank you.

This works well.
0
All Courses

From novice to tech pro — start learning today.