Reputation: 105
I'm trying to load the company's logo in Crystal Reports. In order to do so, I've created another DataTable in my DataSet (apart from the one that contains all details, which I called ReportData) called ReportSetup, which only has one column called LogoData, of System.Byte[] type. I then dragged and dropped the LogoData field into my report and expected it to show my image once I ran a report.
However, although the logo is actually appearing in the report, it only does when the other datatable (ReportDate) has entries. If I don't have any details in my report, the logo doesn't show. When I debug, I can see that the code loading my datatable is being executed, so the right data is being put into the ReportSetup datatable, it's just not being shown. Any idea why?
Upvotes: 1
Views: 528
Reputation: 26262
If the number of logos are 'excessive', you could embed each image in its own section, then add a conditional suppression formula that would react to a parameter.
//add a conditional-suppression formula for each section that contains a logo
//change name to match logo
Local Stringvar companyName:="Acme";
{?CompanyName}<>companyName;
Upvotes: 0
Reputation: 1224
I think you can change the image source in code so you could just add a placeholder logo as an image as @HardCode suggests and then replace it at runtime.
Upvotes: 0
Reputation: 26940
I think you'll need to use a subreport. CR will give you a warning if you have multiple unrelated (unjoined) tables in your datasource. The problem is that CR doesn't know which table to start from.
Upvotes: 0