Printing image from internet on RTC report
zeon
Member Posts: 130
Hi,
Is it possible to use/print an image (jpeg) from the internet directly on a RTC report?
TIA
Is it possible to use/print an image (jpeg) from the internet directly on a RTC report?
TIA
0
Answers
-
Hi,
I know it can be achieved to insert Pictures on your local drive using Picture Control.
To be honest i wouldn't do this anyway, you dont know how long the Picture is gonna stay on the site or the URL.
Better Copy it and Import it into a BLOB Field in the Database.Austrian NAV/BC Dev0 -
The reason for linking directly to the url is that the image is already used for the customers web shop, and therefore the image will not be deleted. I just wanted to use the same resource as the web shop in stead of importing the picture to the db.0
-
Hi Zeon,
Try this code (nav 2013), it looks like what you want.OBJECT Report 80000 Internet Logo - Simple Test { OBJECT-PROPERTIES { Date=04/10/13; Time=[ 9:38:16]; Modified=Yes; Version List=amazan; } PROPERTIES { EnableExternalImages=Yes; } DATASET { { 1000000000;;DataItem; ; DataItemTable=Table2000000026; DataItemTableView=SORTING(Number) ORDER(Ascending) WHERE(Number=FILTER(1..2)); OnAfterGetRecord=BEGIN CASE Number OF 1: InternetImage := 'http://www.microsoft.com/spain/prensa/resources/ContentImages/Contents/2012/10/fotoCentro_dynamics-nav.jpg'; 2: InternetImage := 'http://i.microsoft.com/global/en-us/dynamics/PublishingImages/AA_A_Shell/logo-microsoft-dynamicsV3.png'; END; END; } { 1000000001;1;Column;Internet_Image ; SourceExpr=InternetImage } } REQUESTPAGE { PROPERTIES { } CONTROLS { } } LABELS { } CODE { VAR InternetImage@1000000000 : Text; BEGIN { amazan - 04-10-13 - Internet Logo Simple Test } END. } RDLDATA { <?xml version="1.0" encoding="utf-8"?> <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition"> <DataSources> <DataSource Name="DataSource"> <ConnectionProperties> <DataProvider>SQL</DataProvider> <ConnectString /> </ConnectionProperties> <rd:DataSourceID>42f3b91c-3aa1-4335-9d4d-60bd73690f8e</rd:DataSourceID> </DataSource> </DataSources> <DataSets> <DataSet Name="DataSet_Result"> <Fields> <Field Name="Internet_Image"> <DataField>Internet_Image</DataField> </Field> </Fields> <Query> <DataSourceName>DataSource</DataSourceName> <CommandText /> </Query> <rd:DataSetInfo> <rd:DataSetName>DataSet</rd:DataSetName> <rd:SchemaPath>Report.xsd</rd:SchemaPath> <rd:TableName>Result</rd:TableName> </rd:DataSetInfo> </DataSet> </DataSets> <Body> <ReportItems> <Tablix Name="Tablix1"> <TablixBody> <TablixColumns> <TablixColumn> <Width>3in</Width> </TablixColumn> </TablixColumns> <TablixRows> <TablixRow> <Height>1.42in</Height> <TablixCells> <TablixCell> <CellContents> <Image Name="Image1"> <Source>External</Source> <Value>=Fields!Internet_Image.Value</Value> <Sizing>FitProportional</Sizing> <Style> <Border> <Style>None</Style> </Border> </Style> </Image> </CellContents> </TablixCell> </TablixCells> </TablixRow> </TablixRows> </TablixBody> <TablixColumnHierarchy> <TablixMembers> <TablixMember /> </TablixMembers> </TablixColumnHierarchy> <TablixRowHierarchy> <TablixMembers> <TablixMember> <Group Name="Internet_Image"> <GroupExpressions> <GroupExpression>=Fields!Internet_Image.Value</GroupExpression> </GroupExpressions> </Group> <SortExpressions> <SortExpression> <Value>=Fields!Internet_Image.Value</Value> </SortExpression> </SortExpressions> <TablixHeader> <Size>3in</Size> <CellContents> <Textbox Name="Internet_Image"> <CanGrow>true</CanGrow> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>=Fields!Internet_Image.Value</Value> <Style /> </TextRun> </TextRuns> <Style /> </Paragraph> </Paragraphs> <rd:DefaultName>Internet_Image</rd:DefaultName> <Style> <Border> <Color>LightGrey</Color> <Style>Solid</Style> </Border> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> </Textbox> </CellContents> </TablixHeader> </TablixMember> </TablixMembers> </TablixRowHierarchy> <DataSetName>DataSet_Result</DataSetName> <Top>0.205in</Top> <Left>0.21542in</Left> <Height>1.42in</Height> <Width>6in</Width> <Style> <Border> <Style>None</Style> </Border> </Style> </Tablix> </ReportItems> <Height>4.20833in</Height> <Style /> </Body> <Code>Public Function BlankZero(ByVal Value As Decimal) if Value = 0 then Return "" end if Return Value End Function Public Function BlankPos(ByVal Value As Decimal) if Value > 0 then Return "" end if Return Value End Function Public Function BlankZeroAndPos(ByVal Value As Decimal) if Value >= 0 then Return "" end if Return Value End Function Public Function BlankNeg(ByVal Value As Decimal) if Value < 0 then Return "" end if Return Value End Function Public Function BlankNegAndZero(ByVal Value As Decimal) if Value <= 0 then Return "" end if Return Value End Function </Code> <Width>6.5in</Width> <Page> <Style /> </Page> <Language>=User!Language</Language> <ConsumeContainerWhitespace>true</ConsumeContainerWhitespace> <rd:ReportID>0eeb6585-38ae-40f1-885b-8d50088d51b4</rd:ReportID> <rd:ReportUnitType>Inch</rd:ReportUnitType> </Report> END_OF_RDLDATA } }
:thumbsup:0 -
Thx, easier than expected.0
Categories
- All Categories
- 75 General
- 75 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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions