You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
4.2 KiB

1 month ago
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Report ScriptLanguage="CSharp" ReportInfo.Created="08/23/2023 10:01:23" ReportInfo.Modified="04/23/2024 23:41:33" ReportInfo.CreatorVersion="2018.3.13.0">
  3. <ScriptText>using System;
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using System.ComponentModel;
  7. using System.Windows.Forms;
  8. using System.Drawing;
  9. using System.Data;
  10. using FastReport;
  11. using FastReport.Data;
  12. using FastReport.Dialog;
  13. using FastReport.Barcode;
  14. using FastReport.Table;
  15. using FastReport.Utils;
  16. using System.IO;
  17. namespace FastReport
  18. {
  19. public class ReportScript
  20. {
  21. private void Picture1_BeforePrint(object sender, EventArgs e)
  22. {
  23. string imgStr= ((String)Report.GetColumnValue(&quot;testRequestes.barcodeImg&quot;));
  24. //MessageBox.Show(&amp;quot;1&amp;quot;);
  25. if (string.IsNullOrEmpty(imgStr))
  26. {
  27. Picture1.Visible=false;
  28. return;
  29. }
  30. byte[] imgData=Convert.FromBase64String(imgStr);
  31. MemoryStream ms = new MemoryStream(imgData);
  32. Image img = System.Drawing.Image.FromStream(ms);
  33. Picture1.Image=img;
  34. }
  35. }
  36. }
  37. </ScriptText>
  38. <Dictionary>
  39. <TableDataSource Name="testRequestes" ReferenceName="Data.testRequestes" DataType="System.Int32" Enabled="true">
  40. <Column Name="patientName" DataType="System.String"/>
  41. <Column Name="sexName" DataType="System.String"/>
  42. <Column Name="age" DataType="System.Int64"/>
  43. <Column Name="sampleTypeName" DataType="System.String"/>
  44. <Column Name="sampleContainerName" DataType="System.String"/>
  45. <Column Name="containerColor" DataType="System.Int64"/>
  46. <Column Name="sampleContainerRemark" DataType="System.String"/>
  47. <Column Name="lisRequestNo" DataType="System.String"/>
  48. <Column Name="barcodeImg" DataType="System.String"/>
  49. <Column Name="patientRegisterNo" DataType="System.String"/>
  50. <Column Name="asbitemNames" DataType="System.String"/>
  51. <Column Name="customerOrgName" DataType="System.String"/>
  52. <Column Name="departmentName" DataType="System.String"/>
  53. </TableDataSource>
  54. <Parameter Name="printer" DataType="System.String"/>
  55. <Parameter Name="hisLog" DataType="System.String"/>
  56. </Dictionary>
  57. <ReportPage Name="Page1">
  58. <GroupHeaderBand Name="GroupHeader1" Width="718.2" Height="103.95" Condition="[testRequestes.sampleTypeName]">
  59. <TextObject Name="Text1" Left="264.6" Top="9.45" Width="160.65" Height="37.8" Text="体检申请单" Font="宋体, 20pt, style=Bold"/>
  60. <TextObject Name="Text2" Left="9.45" Top="56.7" Width="56.7" Height="18.9" Text="姓名:"/>
  61. <TextObject Name="Text3" Left="132.3" Top="56.7" Width="56.7" Height="18.9" Text="性别:"/>
  62. <TextObject Name="Text4" Left="255.15" Top="56.7" Width="56.7" Height="18.9" Text="年龄:"/>
  63. <TextObject Name="Text5" Left="396.9" Top="56.7" Width="94.5" Height="18.9" Text="[testRequestes.departmentName]"/>
  64. <TextObject Name="Text6" Left="43.15" Top="56.7" Width="94.5" Height="18.9" Text="[testRequestes.patientName]"/>
  65. <TextObject Name="Text7" Left="167" Top="56.7" Width="85.05" Height="18.9" Text="[testRequestes.sexName]"/>
  66. <TextObject Name="Text8" Left="292.3" Top="56.7" Width="94.5" Height="18.9" Text="[testRequestes.age]"/>
  67. <TextObject Name="Text9" Left="9.45" Top="85.05" Width="94.5" Height="18.9" Text="[testRequestes.sampleTypeName]" Font="宋体, 9pt, style=Bold"/>
  68. <TextObject Name="Text10" Left="132.3" Top="85.05" Width="198.45" Height="18.9" Text="[testRequestes.customerOrgName]"/>
  69. <TextObject Name="Text11" Left="529.2" Top="85.05" Width="116.05" Height="18.9" Text="[testRequestes.patientRegisterNo]" HorzAlign="Center"/>
  70. <PictureObject Name="Picture1" Left="538.65" Top="28.35" Width="160.65" Height="47.25" BeforePrintEvent="Picture1_BeforePrint" Image=""/>
  71. <DataBand Name="Data1" Top="110.01" Width="718.2" Height="22.9" DataSource="testRequestes">
  72. <TextObject Name="Text12" Left="7.45" Top="4" Width="189" Height="18.9" Text="[testRequestes.asbitemNames]"/>
  73. </DataBand>
  74. <GroupFooterBand Name="GroupFooter1" Top="138.97" Width="718.2" Height="10.9">
  75. <LineObject Name="Line1" Left="9.45" Top="1.45" Width="689.85" Border.Style="Dash"/>
  76. </GroupFooterBand>
  77. </GroupHeaderBand>
  78. </ReportPage>
  79. </Report>