Sales Invoice Report RTC (code 206)
ceccomil
Member Posts: 25
Hi everybody, I'm new in this forum. Really I'm new also in NAV...
Recently I tried to modify the report 206, for adding a company image but I can't understand why it doesn't work.
Really I saw that in report 206 depending on setting Sales setup the company logo should be visible at left, right or center, but unfortunately in my case wasn't visible.
By the way I cancelled the 3 picture box in the sections view and I have added a new picture box with source expression set to: MyCompInfo.Picture. In Globals I added a Variable called MyCompInfo based on record "Company Information".
On prereport I added "MyCompInfo.CALCFIELDS(Picture);"
Running report in classic version it's correct!
During design in VS2008 I added a textbox, in the body section, with value set to: "=System.Convert.ToBase64String(Fields!MyCompInfo_Picture.Value)"
Save
compile
and run... but instead of viewing report with a text box populated by the 64Basestring I saw a simple "#Error" ???
I hope any one can help me to understand why my Picture seems to be NULL...
Thanks in advance and sorry form my English!
Cecco
Recently I tried to modify the report 206, for adding a company image but I can't understand why it doesn't work.
Really I saw that in report 206 depending on setting Sales setup the company logo should be visible at left, right or center, but unfortunately in my case wasn't visible.
By the way I cancelled the 3 picture box in the sections view and I have added a new picture box with source expression set to: MyCompInfo.Picture. In Globals I added a Variable called MyCompInfo based on record "Company Information".
On prereport I added "MyCompInfo.CALCFIELDS(Picture);"
Running report in classic version it's correct!
During design in VS2008 I added a textbox, in the body section, with value set to: "=System.Convert.ToBase64String(Fields!MyCompInfo_Picture.Value)"
Save
compile
and run... but instead of viewing report with a text box populated by the 64Basestring I saw a simple "#Error" ???
I hope any one can help me to understand why my Picture seems to be NULL...
Thanks in advance and sorry form my English!
Cecco
0
Comments
-
You need to read the record from database first... ;-) have you used MyCompInfo.GET before you call the CALCFIELDS? 8)0
-
Yes, I tried to put
MyCompInfo.Get;
MyCompInfo.CALCFIELDS(Picture);
On both "OnPreReport" and "OnInitReport", but only in the Classic it works fine
0 -
1. In Classic client. Add PictureBox control in sections with DataSetFieldName=CompanyInfo_Picture.
2. Select “View / Layout”
3. Add textbox with following values in Body:
Value: “=Convert.ToBase64String(Fields!CompanyInfo_Picture.Value)”
Name: “CompanyPicture”
Visibility Hidden: “True”
Color: “Red”
4. Add the following code to the Report properties.
Shared PictureData as Object
Public Function GetPicture() as Object
Return PictureData
End Function
Public Function SetPicture(NewData as Object)
if NewData>""
PictureData = NewData
end if
End Function
5. Add textbox to Page Header. Note! This textbox has to be placed above the Picture control added in next step.
Value: “=Code.SetPicture(ReportItems!CompanyPicture.Value)”
Visibility Hidden: “True”
Color: “Red”
6. Add picture control to Page Header with these Values
Value: “=Convert.FromBase64String(Code.GetPicture())”
Source: “Database”
MIMEType: “image/bmp”
7. Save and Compile
8. Run report
Regards,
ClausClaus Lundstrøm | MVP | Senior Product Manager | Continia.com
I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)0 -
Hi Claus and thanks for your help, but unfortunately it doesn't work... :-(
I don't know what is the problem, but I think it's appens before processing the report.
If I leave Visibility.Hidden = false on TextBox "CompanyPicture" during the preview (instead of viewing the 64baseString with incomprensible ascii chars sequence) in the place where I puted the textBox appears an "#Error" string.
If you want I can send you my report "206.fob"
Best Regards
Cecco0 -
Yes please, I sent you my e-mail address in a private message.
Regards,
ClausClaus Lundstrøm | MVP | Senior Product Manager | Continia.com
I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)0 -
After speaking with Cecco, I have realized that the guide I had on my blog for how to use the Picture stored in Company Information table, only worked in some case. So I have now updated the blog post with an updated "How to", that works for all sceanarios that I'm aware of.
Please find the updated blog here: http://blogs.msdn.com/nav-reporting/archive/2009/02/05/how-to-add-a-company-picture-to-a-report.aspx
Regards,
ClausClaus Lundstrøm | MVP | Senior Product Manager | Continia.com
I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)0 -
Speaking of the sales invoice report... Would it be possible to provide us with a complete tutorial about how to create this report from scratch? There's a pageloop, a copyloop, pictures, code behind the report, and other things. It would be a big help if we could understand how to make that work from start to finish, especially the connection between the C/SIDE report object and the RDLC layout. What do we need to do in the C/SIDE report, and what do we need to do in the RDLC, what is the correlation between the various elements.0
-
Thankyou Claus, tomorrow i'll check your new blog information.
I think What DenSter says it's very interesting...
Regards
Cecco0 -
DenSter wrote:Speaking of the sales invoice report... Would it be possible to provide us with a complete tutorial about how to create this report from scratch? There's a pageloop, a copyloop, pictures, code behind the report, and other things. It would be a big help if we could understand how to make that work from start to finish, especially the connection between the C/SIDE report object and the RDLC layout. What do we need to do in the C/SIDE report, and what do we need to do in the RDLC, what is the correlation between the various elements.
I second this! =D>Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
I third! using the new report designer has been driving me bonkers!
The new report design tool in VS is driving up the wall, and I can't find good documentation on it, anywhere. There are a few tutorials which are helpful, however nothing that covers enough basics in my opinion.
So far its been trial and error.
t0 -
We currently working on a 2 days training course for our new reporting capabilties in NAV 2009.
When the course is ready I will update this thread.
Regards,
ClausClaus Lundstrøm | MVP | Senior Product Manager | Continia.com
I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)0 -
Thanks Claus, I think it safe to say that it will be well received...
t0 -
=D> Great!
Cecco0 -
A 2 days training course, about our new Reporting capabilities, is now set to release to Partners Source on the 22nd of July 2009. I believe you should be able to download it when available.
Regards,
ClausClaus Lundstrøm | MVP | Senior Product Manager | Continia.com
I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)0 -
as i think, if you follow that stapes correctly every thing including spelling on
http://blogs.msdn.com/b/nav/archive/200 ... eport.aspx
on the step 8
8. Now lets add this to the report. We need to add the Company Picture first as a TextBox to the body of the report. This will enable us to use it in the Page Header. We add this Textbox in top of the Body.
you will put not on the body simply you must create new raw above the existing row on the body and put that in the row. believe me it will work.
you know the logic is correct that you add the code on the property window like "set" and "get" function. but why you see the X image inisted of the logo. that is you must put the text box inside the new row. ok =D>
Michael B.0 -
Hi! I realize you posted this a few years ago, but do you remember if you ever found a solution? I am new to NAV and I am also getting the same issue. The image isn't being displayed (red X instead) and the ToBase64String textbox shows "#Error" when it is visible. I followed the same tutorial and everything. Anything you remember would be great. Thanks!0
-
Ok, well I found the solution with a coworker's help. If anyone else has this same problem and none of the other posts fix it, here is what I did:
In the directions I followed (http://blogs.msdn.com/b/nav/archive/200 ... eport.aspx) it says:
5. Now we should add a Picture Box on the Sections with SourceExpr: CompanyInfo.Picture.
Since it didn't specify where to drop it in sections, I just dumped it in there randomly. Turns out that was my problem. Instead, we moved the picture box to the top of sections (if you look closely at the example, he puts it in the header). Problem solved!!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions

