|
-
Oct 27th, 2006, 10:20 AM
#1
Thread Starter
Hyperactive Member
Change the section of a control
Hi
Im using data report to make a report and I need to show one picture by record in details section.
I have read that isn't possible to load dinamically pictures in details section, but my alternative is load my pictures in another section and then move to details section.
I accept sugestions to use another Report Generator, except Crystal reports.
How can I do it?
Another sugestion?
Thanks
Daniel
If you want to be loved, first love who God gave to you.
"Se você quer ser amado, primeiro ame quem Deus te deu"
(Acts 20:35)
-
Oct 27th, 2006, 11:59 AM
#2
Re: Change the section of a control
Why you do not want to use the crystal report , you are saying here expect crystal report so i am asking you this question.
Next code is for dynamically loadthe picture in the data report.
VB Code:
Private Sub DataReport_Initialize()
Set Me.Sections("SectionHeader").Controls("Image1").Picture = LoadPicture(App.Path & "\LH1.jpg") 'Image Name
End Sub
Last edited by shakti5385; Oct 27th, 2006 at 12:10 PM.
-
Oct 27th, 2006, 02:05 PM
#3
Thread Starter
Hyperactive Member
Re: Change the section of a control
Hi
except crystal because I cannot buy crystal. I have crystal 4.1 version, but this version don't load dinamically pictures. Or not?
Thanks for your code, but I need to show dinamically pictures in details section. My idea was to load dinamically pictures in header section and after, move to details section.
Any sugestion?
Daniel
If you want to be loved, first love who God gave to you.
"Se você quer ser amado, primeiro ame quem Deus te deu"
(Acts 20:35)
-
Oct 28th, 2006, 09:43 AM
#4
Re: Change the section of a control
I send you code for the data report not for the crystal report, so if you not have the crystal report then you can use the data report in your project too.
-
Oct 30th, 2006, 09:04 AM
#5
Thread Starter
Hyperactive Member
Re: Change the section of a control
Hi
my problem isn't load a image dinamically in data report. My problem is load a image dinamically in "details" section of data report, one different image per record.
thanks for your reply
Daniel
If you want to be loved, first love who God gave to you.
"Se você quer ser amado, primeiro ame quem Deus te deu"
(Acts 20:35)
-
Oct 30th, 2006, 12:05 PM
#6
Re: Change the section of a control
Can you please tell me that where you are saving your image that is in the databse or in the other folder.
Have you dave the image in the databse?
Last edited by shakti5385; Oct 30th, 2006 at 12:13 PM.
-
Oct 30th, 2006, 12:11 PM
#7
Thread Starter
Hyperactive Member
Re: Change the section of a control
Im loading images from ImageList control directly in VB.
If you want to be loved, first love who God gave to you.
"Se você quer ser amado, primeiro ame quem Deus te deu"
(Acts 20:35)
-
Oct 30th, 2006, 12:29 PM
#8
Re: Change the section of a control
I want to say one thing that as I give you the code in the above post, did you try for it. Using this code you are able to change the image also at the run time. Make a loop for your search record shoe the section according to the searched data, after it search the picture according to the record and load the picture.
This is batter if you try for it. Just make a try then if you get any problem the tell again.
-
Oct 30th, 2006, 12:39 PM
#9
Thread Starter
Hyperactive Member
Re: Change the section of a control
I try your code and it load the image in Picture box dinamically. But...
Making a loop, and loading different images to each step of loop, in the end of loop, when the report is showed, all images are the same, the last image loaded.
If you want to be loved, first love who God gave to you.
"Se você quer ser amado, primeiro ame quem Deus te deu"
(Acts 20:35)
-
Oct 30th, 2006, 12:52 PM
#10
Re: Change the section of a control
I think that you are making some mistake in the code also, also just check the image name in your code is it the same or different, trace the code using the F8 Key then you are able to know properly that how the code is running.
-
Oct 30th, 2006, 01:00 PM
#11
Thread Starter
Hyperactive Member
Re: Change the section of a control
I don't know how to resolve this problem. My code is:
VB Code:
For i = 1 To npasse
rs_impri.AddNew
rs_impri!passes_gaiola = NomeGaiola(i - 1)
Set relatorio_.Sections("details").Controls("image1").Picture = novo_calibra.il2.ListImages.Item(i).Picture
rs_impri.Update
Next
Set relatorio_.DataSource = rs_impri
If you want to be loved, first love who God gave to you.
"Se você quer ser amado, primeiro ame quem Deus te deu"
(Acts 20:35)
-
Oct 30th, 2006, 01:43 PM
#12
Re: Change the section of a control
I don't know how to resolve this problem.
You cannot set a different picture for each detail record. The DataReport.rptImage control is not a bound control, ie it does not have the neccessary properties (DataMember, DataField etc.) to bind each instance to a data source.
-
Oct 30th, 2006, 01:48 PM
#13
Thread Starter
Hyperactive Member
Re: Change the section of a control
Hi
Don't exist another way to make this functionality?
Thanks
Daniel
If you want to be loved, first love who God gave to you.
"Se você quer ser amado, primeiro ame quem Deus te deu"
(Acts 20:35)
-
Oct 30th, 2006, 01:57 PM
#14
Re: Change the section of a control
Don't exist another way to make this functionality?
No. The DataReport is pretty limited. It has no "processing per detail record" capabilities whatsoever.
How complex is your report? Using the Printer object directly might be an option for you.
-
Oct 30th, 2006, 02:04 PM
#15
Thread Starter
Hyperactive Member
Re: Change the section of a control
My report is complex, actually it is printed with Printer Object, but has very bugs and problems. Im converting the report to another more friendly tool.
I have the advantage to know the limit of records, so, I will use only the header section of report, and load images dinamically in this section.
thanks for your reply
Daniel
If you want to be loved, first love who God gave to you.
"Se você quer ser amado, primeiro ame quem Deus te deu"
(Acts 20:35)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|