TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
dip s
NA
256
82.4k
What is a good Data reporting tool in angular 8 to show reports.
Dec 7 2020 4:00 AM
Hello,
We have a cloud application in angular 8 and mvc 5.
Currently, I am displaying report in angular 8 using crystal report at backend.
I am doing following steps to display data.
1. I am retrieving required data/fields from database to show in report.
2. Setting that data as crystal report source.
3. Converting it to Base64 string and returing it to front end means angular.
ReportDocument reportDocument =
new
ReportDocument();
objcmd.CommandText =
"rpReport"
;
objcmd.CommandType = CommandType.StoredProcedure;
objcmd.Parameters.AddWithValue(
"ID"
, ResultID);
MySqlDataAdapter da =
new
MySqlDataAdapter(objcmd);
DataTable dt =
new
DataTable();
da.Fill(dt);
ReportDocument cryRpt =
new
ReportDocument();
cryRpt.Load(
"C:/Report/PatientReport.rpt"
);
cryRpt.SetDataSource(dt);
cryRpt.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat,
"C:/Report/PatientReport.pdf"
);
byte
[] bytes = File.ReadAllBytes(
"C:/Report/PatientReport.pdf"
);
result = Convert.ToBase64String(bytes);
4. In angular, I am printing this data as follows
const
pdfWindow = window.open(
""
);
pdfWindow.document.write(
"
Patient Report
body{margin: 0px;}iframe{border-width: 0px;}"
);
pdfWindow.document.write(
"
+
encodeURI(result) +
"#toolbar=0&navpanes=0&scrollbar=0'>"
);
But here the problem is data from database contains html tag like , and crystal report does not support these tags. so data does not displayed in tabular format. it gets displayed as simple text.
So is there any other way or tool to display such report. Or display data in tabular format.
Thank you in advance.
,
Reply
Answers (
1
)
How to print base64 string data having table in crystal report
RDLC Expression For currency comparison