Hi
I have below code and i want to send it in HTML format through Email body
string _StrSQL = "SELECT T0.\"TransId\", T0.\"DocNum\", T0.\"DocDate\" " +
"FROM \"ATULAYA_NEW_LIVE\".OINV T0 " +
"INNER JOIN CRD1 T3 ON T0.\"CardCode\" = T3.\"CardCode\" " +
"INNER JOIN INV12 T5 ON T5.\"DocEntry\" = T0.\"DocEntry\" + " +
"where T0.\"CardCode\" = T3.\"CardCode\" and T3.\"GSTRegnNo\" <> '' " +
"and T5.\"LocGSTN\" <> T5.\"BpGSTN\" ";
Thanks

Muhammad Imran AnsariPosted Feb 7, 2025, 10:07 AM
Hello Ramco,
I believe, your issue has been fixed through another question.
Ramco RamcoPosted Feb 7, 2025, 7:03 AM
Hi Muhammad
It is displaying like below but not in table format.
Thanks
Muhammad Imran AnsariPosted Feb 7, 2025, 6:58 AM
To pass
htmlTableto the email body, simply append it to the existingbodyvariable. Here's how you can do it:Ramco RamcoPosted Feb 7, 2025, 6:37 AM
Hi Muhammad
How htmltable be passed to body of Email
Thanks
Muhammad Imran AnsariPosted Feb 7, 2025, 6:31 AM
Your HTML table structure is correct, but it might not display borders properly because of missing CSS styling. The
border="1"attribute should usually work, but some email clients or browsers may require explicit CSS styling. Can you try below code:Ramco RamcoPosted Feb 7, 2025, 6:12 AM
Hi Sreenath
I have below code
Thanks
Sreenath KappoorPosted Feb 7, 2025, 6:09 AM
Hello Ramco,
You need to fetch the results into a DataTable then format the DataTable as an HTML table. Can you please share your current code ?
Ramco RamcoPosted Feb 7, 2025, 6:08 AM
Hi Imran
It is displaying like below but i want Output to be displayed with Table borders
SAPbobsCOM.Recordset oRecordSet = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
oRecordSet.DoQuery(_StrSQL);