We are trying to print one of our TreeList control using PrintableComponentLink. The code we haev written is as follows:
// Create a PrintingSystem component.
PrintingSystem printSystem = new PrintingSystem();
printSystem.ContinuousPageNumbering = true;
// Create a link that will print a control.
PrintableComponentLink link = new PrintableComponentLink(printSystem);
// Specify the control to be printed.
link.Component = m_TreeListInstance;
ink.Landscape = true;
Now in above code the last line is throwing NULLReferenceException. When we investigated the issue with the Source Code provided we found that the method: DevExpress.Skins.SkinManager.Default.GetSkin(DevExpress.Skins.SkinProductId.Printing,link.PrintingSystem.PreviewFormEx.LookAndFeel)
is returning null. When we called the same method by providing any DevExpress.Skins.SkinProductId other then Printing, it is returning the correct skin but for this Perticular SkinProductId that is "Printing" it is returning null.
It seems we are missing something at our end in relation to skins but we are unable to get that. Can you please tell us in which circumstances this method return null for Printing ProductId? We would appreciate your quick response.
Just for your information we have upgraded version from 7.3.3 to 8.3.3 now. The same code was working fine for 7.3.3.
Please check the version of the DevExpress.BonusSkins.vx.x.dll and DevExpress.OfficeSkins.vx.x.dll assemblies, which you've referenced in your project.
You should use the corresponding 8.3 assemblies. Please try to update assemblies references. If it doesn't help you, please provide us with a sample, illustrating your issue.
We will examine it and do our best to help you.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.