Images: uploaded images don't display in reports

Sep 29, 2011 at 2:58 PM
Edited Sep 29, 2011 at 5:18 PM

Reset...

After reviewing our original thread and looking at images after deployment I now see that the mime type is not being set. Below is my itemgroup definition. Any ideas?

 

	<ItemGroup>
		<ReportFiles Include="$(ReportFilesPath)\*.rdl" />
		<ResourceFiles Include="$(ReportFilesPath)\*.png">
			<MimeType>image/png</MimeType>
		</ResourceFiles>
		<ResourceFiles Include="$(ReportFilesPath)\*.gif">
			<MimeType>image/gif</MimeType>
		</ResourceFiles>
		<ResourceFiles Include="$(ReportFilesPath)\*.jpg">
			<MimeType>image/jpeg</MimeType>
		</ResourceFiles>
		
		<!--The Include is the Name of the DataSet to create-->
		<ReportDataSourceToDeploy Include="Core">
			<ConnectionString>Data Source=$(SQLServer);initial catalog=$(DataSourceDb);Integrated Security=True</ConnectionString>
			<Folder>$(TargetDataSourceFolder)</Folder>
			<Provider>SQL</Provider>
			<OverWrite>True</OverWrite>
			<WindowsUser></WindowsUser>
			<WindowsUserPassword></WindowsUserPassword>
		</ReportDataSourceToDeploy>
	</ItemGroup>

Coordinator
Sep 30, 2011 at 12:30 PM

Hi

Could you please include the section that is making the call to the task?

When I saw your original post there was error with how you were passing in the list of images which you required to up load.

Regards

Steve

Sep 30, 2011 at 2:52 PM
Edited Sep 30, 2011 at 3:00 PM

Thanks, corrected and now working... batching on metadata '%' wasn't working, changed to batch using '@' and mime type is being set.

Originally:

 

	<Target Name="AddResources" DependsOnTargets="ValidateDeploymentSettings;GetServerUrl">
		<AddResource ReportServerURL="$(TargetServerUrl)" Folder="$(TargetReportFolder)" Files="%(ResourceFiles.Fullpath)" />
	</Target>

 

Worked after changing to:

 

	<Target Name="AddResources" DependsOnTargets="ValidateDeploymentSettings;GetServerUrl">
		<AddResource ReportServerURL="$(TargetServerUrl)" Folder="$(TargetReportFolder)" Files="@(ResourceFiles)" />
	</Target>

<blush>Thanks again as the answer was in your original reply.</blush>
I'd have to see the difference in what is passed to the task to understand why the different from of batching makes a difference to whether or not the mime type is added to the uploaded image.

/jhd
John Dhom