on ‎2022 Sep 19 2:33 AM
Hi,
I set a report with .xsd file as schema of table. and I insert an OLE object with graphic location to load an image.
Here comes the strange thing. Image does not show when I set the data source and export pdf file, every filed shows correctly but image. However, Image shows if I don't set data source and export pdf.
below is how I set the datasource:
void SetXmlDataSource(ReportDocument report)
{
if(!Utils.CheckFileExists(_configuration.Schema))
{
throw new Exception($"File {_configuration.Schema} does not exist");
}
if(!Utils.CheckFileExists(_commandLine))
{
throw new Exception($"File {_commandLine} does not exist");
}
var ds = new DataSet();
ds.ReadXmlSchema(_configuration.Schema);
ds.ReadXml(_commandLine);
report.SetDataSource(ds);
}<br>
Language: C# (.net4.5)
OS Platform: Windows Server 2016 (x64)
SDK: SP32
Crystal Reports Version: Crystal Report 2020
Request clarification before answering.
Wrong, as I said the image is ONLY loaded on Report.load. Refreshing the data DOES NOT reload the image.
To get this to work you must use a formula which points to a database field that redirects to the location of the image, either a hard drive location of another field, you can't load the image directly from a DB field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.